procmail
[Top] [All Lists]

Re: explination of mailfilter mode please

2002-08-20 01:52:21
"zenn" <zenn(_at_)optushome(_dot_)com(_dot_)au> writes:
can anyone please explain to me the difference between normal and mailfilter
mode (-m)

By default, procmail assumes it's processing mail received by the user
who invoked it.  It therefore reads the /etc/procmailrc file and the
user's .procmailrc file, and sets DEFAULT to the path of the user's
mailspool.

In mailfilter mode, procmail makes to such assumption: procmail
doesn't set DEFAULT and will only parse the rcfile named on the command
line.  Furthermore, if that rcfile is beneath a particular directory,
/etc/procmailrcs/, and passes several security checks then procmail will
change its uid from the invokers to that of the owner of the rcfile.


how would one use procmail in mailfilter mode ?

How?  To quote the procmail usage output:
   Or: procmail [-ptY] [-f fromwhom] -m [parameter=value] ... rcfile [arg] ...

You probably meant to ask the question "what would make you choose
mailfilter mode?"  The simple answer is that you would you use mailfilter
mode when you're not processing messages for a particular user on the
local machine.

For example, at a previous job I used procmail's mailfilter mode to
provide filtering capabilties for the 'webmaster' alias before forwarding
it on the actual people handling those duties.  I also reimplemented the
submission program for a particular listserver via a special rcfile for
procmail's mailfilter mode, thereby eliminating an insecure and mostly
broken setuid root C program from the system.


Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>