procmail
[Top] [All Lists]

firing a script only once with procmail

2000-12-19 09:30:41
My procmail correctly fires a script on the arrival of certain mail.
Now the script reads the multiple recipients on the To: line and
possibly the Cc: and Bcc:.

The problem is that if the email addresses are valid ones for the
local machine then sendmail calls procmail once for each recipient
and of course procmil call my script once each time.
Is there a way to get procmail to only fire the script once for each
actual email - i notice that each original email is idetified by a
specific number like in this excerpt from the logs:

 Subject: e(_dot_)smith(_at_)bizz(_dot_)xyz(_dot_)com
  Folder: cd /home/httpd/xyz;su -c ./mail2sms.pl nobody         867
procmail: Executing "cd /home/httpd/xyz;su -c ./mail2sms.pl nobody"
procmail: [16945] Tue Dec 19 12:36:42 2000
procmail: No match on "^(To|Cc|Bcc).*bizz.xyz.com"
procmail: No match on "^(To|Cc|Bcc)(_dot_)*bizz2(_at_)proteon(_dot_)nl"
procmail: [17008] Tue Dec 19 13:00:05 2000
procmail: Match on "^(To|Cc|Bcc).*bizz.xyz.com"
procmail: Assigning "LASTFOLDER=cd /home/httpd/xyz;su -c
./mail2sms.pl nobody"
 Subject:
  Folder: cd /home/httpd/xyz;su -c ./mail2sms.pl nobody        2559
procmail: [17012] Tue Dec 19 13:00:05 2000
procmail: Match on "^(To|Cc|Bcc).*bizz.xyz.com"
procmail: Assigning "LASTFOLDER=cd /home/httpd/xyz;su -c
./mail2sms.pl nobody"
 Subject:
  Folder: cd /home/httpd/xyz;su -c ./mail2sms.pl nobody        2559
procmail: [17014] Tue Dec 19 13:00:05 2000
procmail: Match on "^(To|Cc|Bcc).*bizz.xyz.com"
procmail: Assigning "LASTFOLDER=cd /home/httpd/xyz;su -c
./mail2sms.pl nobody"
 Subject:
  Folder: cd /home/httpd/xyz;su -c ./mail2sms.pl nobody        2559
procmail: Executing "cd /home/httpd/xyz;su -c ./mail2sms.pl nobody"
procmail: Executing "cd /home/httpd/xyz;su -c ./mail2sms.pl nobody"
procmail: [17018] Tue Dec 19 13:00:05 2000
procmail: Match on "^(To|Cc|Bcc).*bizz.xyz.com"
procmail: Assigning "LASTFOLDER=cd /home/httpd/xyz;su -c
./mail2sms.pl nobody"


All the 2559 entries are a single email - i want procmail to fire the
script only /once/ for say 2559.

Alternatively is this something I need to do in sendmail?

thanx
-- 
Eric Smith
Fruitcom.com Amsterdam
Wire phone : +31 20 528 7340
Mobile: +31 617 232 304
www.fruitcom.com
_______________________________________________
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>