procmail
[Top] [All Lists]

Re: reply recipe peek

2000-03-15 08:06:51

I have been using procmail auto-reply for long but recently came
to wonder about some of its options.

e.g. I had following recipe:

 :0
 * ^(To|Cc):(_dot_)*someone(_at_)somewhere(_dot_)internet
 * B?? ((where|what) is the (form|address))
 |formail -r -i "Subject: auto-reply"|(cat; cat $INFO/faq.txt) \
    | $SENDMAIL -t          

In stead replying to only the mail sender, it also replied to
addresses on the "To:" field (which is a list, and caused some 
loops of course).  Scared of such a wild behaviour, I am using 
the following currently:


Best way to prevent loops is to inject a header for the form
X-loop: <my auto reply system>

Use the presence of this header to ensure the recipe fails.


 FROM=`formail -rt -xFrom:`
 :0
 * ^(To|Cc):(_dot_)*someone(_at_)somewhere(_dot_)internet
 * B?? ((where|what) is the (form|address))
 | formail -rt -i "Subject: auto-reply"|(cat; cat $INFO/faq.txt) \
         | $SENDMAIL -oi -t $FROM

I know I am doing things redundent here and not necessary, but not 
quite sure exactly what does option "-t" do after "formail" and 
after "SENDMAIL" (I read the man page but still not clear ... ;-)

"sendmail -t" causes sendmail to scan the missive for addresses. Therefore 
the To: and cc: headers in the incomimg mail will be used as destinations.

I don't know the effect of -t together with commandline addresses; I'd 
guess it's one of
1       An error. Mail goes nowhere.
2       Not an error. Mail goes to all addresses.


-- 
Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support.
Configuration, networking, combined IBM ftpsites index.


<Prev in Thread] Current Thread [Next in Thread>