procmail
[Top] [All Lists]

Re: Forwarding to Perl file list

2000-08-07 14:46:31
At 13:40 2000-08-07 -0700, Eric Hilding wrote:

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.

Recommendation: consider using INCLUDERC, then from your central .procmailrc file, all you have to do it remark out the one INCLUDERC line, and then the entire recipe is excluded.

# 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`

Uhm, shouldn't you have a check for X-Loop in there? See 'man procmailex', and countless posts to this list. Without verbose details from your logfile (VERBOSE=ON), I'd suspect that this is why you're seeing the multiple messages -- you're probably addressing a copy of it to yourself, and as such, it is hitting this rule on reception of your next copy.

Are you actually getting a mail loop, or is it just that the first address gets multiple copies of each post? You're unclear as to whether you had to disable the recipe because it was actually looping, or because it simply wasn't working as expected.

Next, are you sure that the file does not have CR's in it (\r) (say, if you edited it on a DOS box)? That may cause anomalies.

I transcribed the rule, put a simple line in to catch the immediate loops (just a check for the Old-Postmark), created a text file with addresses, and turned on verbose logging. I got three copies of the message delivered individually to their respective addresses. No dupes. The log even shows the full sendmail invocation as using the individual addresses.

---
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

 Sean B. Straw / Professional Software Engineering
 Post Box 2395 / San Rafael, CA  94912-2395


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