procmail
[Top] [All Lists]

Re: lists.rc

2002-02-03 13:06:21
At 20:53 2002-02-03 +0200, nimrod cohen did say:
Hi
I'm using procmail to filter mail , lists.rc is the user list
*       :0:
*       * ^TO_user1(_at_)domain(_dot_)com
*       /var/spool/mail/user1

Why the leading asterisks on each line? Please DO NOT "munge" recipes in this fashion - leading space (indentation) is okay, but if you insert stuff like this (and of all chars, the _asterisk_), it gives readers (including some other newbie who might read your post) the impression that you might believe that the extra asterisks are actually _part_ of a valid recipe. They are not.

*       :0:
*       * ^TO_user2(_at_)domain(_dot_)com
*       /var/spool/mail/user2


the problem is with mail for more the one user , when match is found the
script stop only the first user get the mail

Procmail is not an MTA. You're attempting local delivery based on info which is not in the message headers, but is instead in the envelope - information which isn't really passed along to procmail (unless you've modified the procmail invocation in your sendmail.cf). This is a long-standing and very well known limitation of procmail - you really don't use it to pick out individual recipients from a message for final delivery - when invoked as LDA, procmail was told the logname (local username, not email address) of the user for which this email is being delivered.

You might try making use of the $LOGNAME variable:

:0:
* LOGNAME ?? (user1|user2)
/var/spool/mail/$LOGNAME

Of course, this is assuming that this lists.rc file is being included into a global procmailrc at /etc/procmailrc, since if you're running it from a user .procmailrc, that user should have absolutely NO rights to write to some other user's mailbox.

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

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