procmail
[Top] [All Lists]

Re: Maillist problem

2008-05-07 10:00:50
At 14:23 2008-05-07 +0200, Martin Hochreiter wrote:

I am using procmail in a group mailbox for
delivering mails to the users.

Mantra: Procmail is not an MTA.  It is an LDA.

Why not configure the MTA to deliver to the individual users?

----------------- from .procmailrc -----------
:0 c
* ^(To|Cc|Bcc):(_dot_)*test(_at_)xxx(_dot_)xx
! `cat /home/verteiler/gruppen/test.txt`
:0 c
* ^(To|Cc|Bcc):(_dot_)*erstehilfe(_at_)xxx(_dot_)xx
! `cat /home/verteiler/gruppen/erstehilfe.txt`
:0 c
* ^(To|Cc|Bcc):(_dot_)*rufhilfe144(_at_)xxx(_dot_)xx
! `cat /home/verteiler/gruppen/l_rufhilfe144.txt`

The Bcc header will almost NEVER appear on a message.  What MTA are you 
using?  I'd check to see if there's a specific header you can rely on for 
indicating who a message has actually been delivered to.  A not uncommon 
additional header to configure an MTA to insert is X-Envelope-To:

If you're writing to files, you should add the locking flag on the flags 
line on each of those.

You should check out the ^TO_ macro (see 'man procmailrc')

! is a FORWARD operator.  This should invoke the $SENDMAIL 
process.  Instead, you should be using something more like (note the dot in 
the domain portion is escaped):

:0 c:
* ^TO_rufhilfe144(_at_)xxx\(_dot_)xx
/home/verteiler/gruppen/l_rufhilfe144.txt

(as a reformat of what you're presently using, though this doesn't address 
your misuse of Procmail as an MTA).

The problem is that if you
use "erstehilfe(_at_)xxx(_dot_)xx, rufhilfe144(_at_)xxx(_dot_)xx" in the To 
field
of a mail every recipient gets the mail twice (because the script
is called twice for rufhilfe144 and erstehilfe)

More correctly, it gets called once for each of the specified local recipients.

---
  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 homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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