procmail
[Top] [All Lists]

Forwarding to Perl file list

2000-08-07 13:42:41

In trying to fine-tune the forwarding with "Old-Postmark:" recipe,
I was sent a line of perl code to hopefully complete the forwarding
processes to 5 or 10 e-mail addresses in a separate text file.

I used a test .txt file with 3 addresses in it, but what happened
was the system just kept chunking out copies of the "Test" e-mail & 
forwarding them to the 1st address in the .txt file.  I went back
in and "#'d" out all the lines to shut off the loop.

What might be needed to end the loop and just cycle through the
addresses ONE time?

Thanks for any assistance.

Eric


# FORWARD TO MULTIPLE E-MAIL ADDRESSES FROM FILE
:0fhw
* ^TOincoming(_at_)mydomain(_dot_)com
| formail -R 'From ' Old-Postmark:
 :0a
! `perl -pe 's/\n/ /g' < /path/file_of_addresses.txt`


(addresses.txt file)
address1(_at_)newdomain(_dot_)com
address2(_at_)newdomain(_dot_)com
address3(_at_)newdomain(_dot_)com


(FROM THE LOG)
Subject: Test
  Folder: /usr/lib/sendmail address1(_at_)newdomain(_dot_)com 
address1(_at_)newdomain(_dot_)com 2049
Subject: Test
  Folder: /usr/lib/sendmail address1(_at_)newdomain(_dot_)com 
address1(_at_)newdomain(_dot_)com 2213
Subject: Test
  Folder: /usr/lib/sendmail address1(_at_)newdomain(_dot_)com 
address1(_at_)newdomain(_dot_)com 2377
(etc., etc. until I shut off the recipe)
  ---- actual addresses changed to eliminate spam from lurkers ----


_______________________________________________
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>