I need to figure out how to get a specific list and procmail to work
together. Awhile back I asked the list for a recipe on rewriting the headers
so that we could replace Bulk precedence on distribution lists that were
time sensitive (thanks for all the replies btw).
What I am unclear on is the order in which this should work. Take for
example the following list configuration in /etc/aliases
#em-notif-dl
em-notif-dl: "|/usr/local/bin/listsoftware -t em-notif-dl"
owner-em-notif-dl: "|/usr/local/bin/listsoftware -t owner-em-notif-dl"
em-notif-dl-request: "|/usr/local/bin/listsoftware -t em-notif-dl-request"
em-notif-dl-search-request: "|/usr/local/bin/listsoftware -t
em-notif-dl-search-request"
em-notif-dl-server: "|/usr/local/bin/listsoftware -t em-notif-dl-server"
em-notif-dl-signoff-request: "|/usr/local/bin/listsoftware -t
em-notif-dl-signoff-request"
em-notif-dl-subscribe-request: "|/usr/local/bin/listsoftware -t
em-notif-dl-subscribe-request"
em-notif-dl-unsubscribe-request: "|/usr/local/bin/listsoftware -t
em-notif-dl-unsubscribe-request"
Also the header of the message I am matching on from the list example above
would look like
Sender: em-notif-dl <em-notif-dl(_at_)fqhn>
With the list Precedence header looking like
Precedence: list
So the procmail rule I would need based on the past feedback would be
:0 fw h
* ^Sender:.*em-notif-dl
* ^Precedence:.*list
|formail -I "Precedence: first-class"
Now the questions I have are:
Handling order. Procmail has been built into sendmail.cf. When an incomming
message reaches sendmail, will sendmail process the aliases file first? Or
will the /etc/procmailrc file with the above recipe be processed first?
I think that the list should process the message first. This way the
procmail recipe can trigger on the ^Sender: and ^Precedence: tags. But where
do I tell the system to send this to procmail after the listsoftware has
processed the message but before handing off the mail to the mail gateways ?
Thanks,
Greg
____________________________________________________________
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