procmail
[Top] [All Lists]

Problem with delivery to external program (2nd post)

2008-01-03 02:58:22
Hello,

I have a setup where I manage mailing lists with mailman on a server
where I use sendmail and procmail. I want to have the mail I receive for
the mailing list 'xyz' to be processed by an external program before it
reaches mailman. I saw somewhere that I could hand the mail first to
procmail (from /etc/aliases), process it and then have procmail hand it
over to mailman for distribution. I tried but it seems that it doesn't
work. Also, it seems that once mailman distributes the mail for local
mailboxes, they are sent again through procmail. See below what I tried
to do:

I modified my /etc/aliases file and put:

xyz: "/usr/bin/procmail"

Now, my procmailrc file has the following:

# This recipe is to allow the processmail program to modify the body of
#the message when the mail is
# destined to the xyz mailing list
:0 fbw
* H ?? ^TO_xyz(_at_)mydomain\(_dot_)com
| /some/path/processmail

# This recipe is to hand the modified mail to mailman for distribution,
#by looking at the headers to catch
# mails destined to the mailing list xyz(_at_)mydomain(_dot_)com
:0
* H ?? ^TO_xyz(_at_)mydomain\(_dot_)com
| "/usr/local/mailman/mail/mailman post xyz" // when I don't put the ",
it just doesn't work

When I look at procmail log, the conditions are caught, but the
modification done at stage 1 in the body seems to be lost. The mail
distributed by mailman is the original one, without the modifications.

I receive the modified mail only for mailboxes stored locally on my
server. It seems that after mailman processing, the mails are processed
again through procmail for those that are delivered locally,

When I try not to interfere with aliases and have only the processing
bits in procmailrc, it only affects mails delivered locally, not mails
sent to sone other address in the list that are not local mailboxes.

How can I resolve this ?

Thanks,
Stéphane




____________________________________________________________
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>
  • Problem with delivery to external program (2nd post), Stéphane Bruno <=