On 6/28/05, Evgeni Vachkov
<evgeni(_dot_)vachkov(_at_)orthogonsystems(_dot_)com> wrote:
What I am trying to achieve is that all [SPAM] mail is delivered locally to
$HOME/spam and not forwarded to any external accounts (from /etc/aliases).
This is really a sendmail question, not a procmail question.
The short answer is that you must not rely on /etc/aliases; you need
/etc/mail/virtusertable instead (or as well).
Create a dummy user (named, in the example below, "procmail") that can
be used to run procmail. Use virtusertable to map the aliases onto
this dummy user like so, one such line for each alias:
aliasname procmail+aliasname
The .procmailrc file for the "procmail" user then becomes the
repository for what would otherwise go in /etc/aliases: sendmail will
run procmail with $1 set to the stuff after the plus sign ("aliasname"
in this example), so in the .procmailrc you'll do something like:
ALIAS=$1
:0
* ALIAS ?? aliasname
! aliasaddress(_at_)otherdomain(_dot_)com
:0
* ALIAS ?? othername
! otheraddress(_at_)thirddomain(_dot_)com
(One recipe block for each possible value of ALIAS.)
Don't forget to rebuild the virtusertable.db file after editing virtusertable.
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail