[Sussex] Procmails?

Neil Ford neil at smudgypixels.net
Fri Jan 24 09:22:00 UTC 2003


On Friday, January 24, 2003, at 08:51  am, Angelo Servini wrote:

> Awww.. Akshully folks (sheepish looks), whats the procedure - start to
> finish, on writing a script to:
> 1. Write rules (ie what files to edit)
> 2. log on
> 3. download mail to an inbox folder
> 4. then sort the mail according to rules
>
> in reasonable linxglish please, be gentle to a poor newbie!  :-)
>
Assuming you want to do this with command line based tools...

You'll need fetchmail to collect the mail and procmail or Mail::Audit 
to apply the filtering.

Based on the combo of fetchmail and procmail, the files involved would 
be.

~/.fetchmailrc
~/.forward (to invoke procmail)
~/.procmailrc.

There are clever ways to have fetchmail collect mail on a periodic 
basis (either as a daemon process or via cron) and ways to have 
procmail integrated into your mail delivery system.

man fetchmail and man procmail will give you lots of pointers.

Also check out http://catb.org/~esr/fetchmail/ (ESR's fetchmail 
homepage. Yep, ESR is responsible for fetchmail) and 
http://www.procmail.org for useful pointers too.

If you want sample files, shout. I still think I have mine kicking 
around somewhere.

Neil.





More information about the Sussex mailing list