procmail
[Top] [All Lists]

Re: Where should I put the .procmailrc file?

2002-02-27 08:04:19
Thanks a lot for your help,

All seems to work except that the mails remain on the server, in the file /var/spool/mail/nobody, they are not forwarded to the adresse that I will to :(

I've used

alias: "|/usr/bin/procmail -m /etc/procmail.rules/alias.rc \"user(_at_)domain(_dot_)com\"" in /etc/postfix/aliases

And
:0
! $1
at the end of my alias.rc

Any idea?

Thanks a lot.

Gilles.


From: PSE-L(_at_)mail(_dot_)professional(_dot_)org (Professional Software Engineering) Reply-To: procmail-users(_at_)procmail(_dot_)org To: procmail-users(_at_)procmail(_dot_)org Subject: Re: Where should I put the .procmailrc file? Date: Tue, 26 Feb 2002 09:47:54 -0800

At 16:45 2002-02-26 +0100, Gilles N wrote:
I've a small question about procmail... I'm using a linux box with postfix as my entry mail server, then I use aliases to forward the mails to an NT Box where MS-Exchange is running. No users accounts are configured on the linux box, it's only a forwarding mail system...

I would like to use procmail to filter the incoming mails (like spam & virus). My question is where should I put the .procmailrc file if I would like to filter ALL incoming mails?

You'd put a filter in /etc/procmailrcs/, then deal with manually invoking it from postfix somehow. I don't use postfilx, but 'man procmail' does discuss how to invoke it from a _sendmail_ rule. I have a link at the top of my disclaimer page about how to configure procmail to be invoked from a sendmail rule.

As long as you're delivering through aliases though, you should be able to ignore rule-based invocation if postfix aliases are anything like sendmail ones, since you should then be able to do something like so:

remoteuser: "|/usr/local/bin/procmail -m /etc/procmailrcs/gilles_spam_filter.rc \"original alias text\""

(all one line of course). If you were originally piping to another prog, the "original alias text" would _NOT_ include the leading pipe symbol.

At the bottom of your gilles_spam_filter.rc, where you've reached the point that you're going to forward the message, you either:

:0 | $1

or

:0 ! $1

depending on whether the arguments you're dealing with are other programs or addresses at a separate server (I don't use this technique for mail forwarding, but I do use it for placing special procmail filters in front of majordomo lists, so I use the first invocation type)

I've read many things about procmail but that always talk about user specific configuration ("the .procmailrc should be located into the /home folder...").

Procmail is most commonly used as an LDA, and that's where the .procmailrc file comes into play. YOU DON'T HAVE LOCAL DELIVERY, SO THIS DOESN'T APPLY.

--- Sean B. Straw / Professional Software Engineering

Procmail disclaimer:

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

_________________________________________________________________
Rejoignez le plus grand service de messagerie au monde avec MSN Hotmail. http://www.hotmail.com/fr

_______________________________________________
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>