procmail
[Top] [All Lists]

Re: Where should I put the .procmailrc file?

2002-02-26 13:02:54
At 16:12 2002-02-26 +0000, Trevor Jenkins wrote:
On 26 Feb 2002, mysiarld(_at_)mysiar(_dot_)net <mysiarld(_at_)mysiar(_dot_)net> 
wrote:

> you can just use the main /etc/procmailrc
> file and run procmail in postfix with /etc/procmailrc parameter

I don't use postfix, so I don't know whether postfix has an option to invoke /etc/procmailrc when the message isn't for local delivery, but when procmail is configured as the LDA, it should ONLY be invoked for messages being delievered to LOCAL MAILBOXES ON THE SERVER. If it's a relay host (gateway), the messages shouldn't be locally delivered. But then, people do all sorts of weird things - perhaps it's being dropped into a local user mailbox an the exchange server is retrieving it from there (unlikely, as I doubt exchange has any 'fetch' capability).

Don't know about the poster of the original thread but it isn't clear to
me what happens when both /etc/procmailrc and ~/.procmailrc exist.

You haven't dug very deep.  The answer is found right in 'man procmail'.

When procmail runs as LDA, if the /etc/procmailrc is found, it is executed BEFORE the ~/.procmailrc is - it isn't an either or situation (unless of course /etc/procmailrc performs final delivery of the message for some reason - say discarding spam). Examples of what you'd use /etc/procmailrc for include providing central spam/virus filtering and to provide default procmailrc actions so that certain users wouldn't need to include certain filters in their own procmailrcs.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

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