procmail
[Top] [All Lists]

Re: FROM_DAEMON on preventing loops

2008-09-25 16:46:43
At 15:30 2008-09-25 -0400, Skip Morrow wrote:
I am writing a recipe to forward mail to another account.  Virtually every
example I have seen includes use of the FROM_DAEMON conditional statement.
 Reviewing the recipe, it really looks to me that the real work is being
done by the X-Loop: header being added.  My question is, are the
FROM_DAEMON (and FROM_MAILER) conditionals really necessary?

A mailer daemon is more likely to completely encapsulate your message (so the X-Loop is quoted in the body). Also, often, you don't want to FORWARD bounce messages - esp. if they're bounces of your forwarding attempts.

The reason why I ask is that I have seen some emails not get forwarded
(namely from google itself, but they weren't in a loop) and I want to make

Well, check the logs and determine WHY those individual messages were not forwarded. Were they possibly filtered PRIOR to the forwarding recipe?

sure that those conditionals aren't over aggressive and possibly prevent
other emails from being forwarded.  If all I am concerned about is
looping, then couldn't I get rid of those two conditionals?

To simulate just one of MANY scenarios, try tweaking the address you're forwarding to - use a known-bogus userid(_at_)domain(_dot_) Send your local address (the one doing the forwarding) a test message. Now, eliminate the daemon rules and repeat the effort. This would merely simulate what might happen if the receiving server hiccups and decides for some reason that the account over there doesn't really exist. There are a lot of other things which can go weird in the mail delivery process.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail