procmail
[Top] [All Lists]

Re: firing a script only once with procmail - solution

2000-12-19 17:13:18
According to David W. Tamkin on Tue, Dec 19, 2000 at 11:45:43AM -0600:
| I didn't see Lars's post, but Eric quoted him as saying,
| 
| K> The procmailex man page has an example that uses formail for duplicate
| K> message detection based on message id.  This could probably be made to
| K> do what you want.
| 
| Eric responded,
| 
| S> as you say ... I cut and pasted:
| 
| S> :0 Wh: msgid.lock
| S>   | formail -D 8192 msgid.cache
| 
| S> and the problem is solved
| 
| Doesn't look very solved to me; it seems that the MTA is still firing off
| 2559 copies, one for each recipient, and procmail (if that recipe is in
| /etc/procmailrc or somewhere else where it is seen for all copies and all
| copies are being processed in the same working directory) is delivering one
| and trashing the other 2558.

The problem is solved .. perhaps not in the most elegant and resource
efficient way as I (you?) would like - but real world solved nevertheless.
No users are meant to see this mail - only the script is meant to
process this mail /once/.
The convention is that the script reads the To: (and Cc: Bcc:) headers
for a list of recipients.  These are then targets for the script to
send something to - but not email (actually SMS - but could be a snail
mail Christmas Card).  I need to trash the 2558 messages as
you say.  A more elegant solution that I spent quite a few minutes
researching was to stop sendmail calling procamil those 2558 times but
this solution came and for now it is an acceptable solution.

ciao

-- 
Eric Smith
Fruitcom.com Benelux
Wire phone +31 212 72 82
Wireless +31 617 232 304
_______________________________________________
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>