My web application sends email fairly often, and it sends 3 kinds of emails: initiated by user, in response to an event in the system, and in automatic response to an email received by the application.
I would like to make sure that the third type of email does not get stuck in an endless loop of auto-responders talking to each other. Currently, I use the header:
Precedence: junk
but Yahoo! mail is treating these messages as spam. This is obviously not ideal, because we would like SOMEBODY to read our auto-response and make a decision on it, just not an out-of-office reply.
What is the best way to send an email without triggering either junk filters or auto-responders?
Precedence: junk? Precedence: bulk? Precedence: list? X-Priority: 2?
RFC 2076 discourages the use of the precedence header. as you have noted, many clients will just filter that off (especially the precedence: junk variety). it may be better to use a null path to avoid auto responder wars:
Ultimately you could use priority to try to get around this, but this seems like going against the spirit of the header. i’d suggest just using the return-path header for this, and avoiding precedence. in some cases you may have to write in some way to drop auto-responders in your application (to avoid getting into a responder war), but i can’t remember a situation in which this happened using an appropriate return-path. (most auto responder wars i recall having to deal with were the result of very badly formed emails)
Note: the
Return-Pathheader is, in short, the destination for notifications (bounces, delay delivery, etc…), and is described in RFC 2821 — because it’s required by SMTP. It’s also one method to drop bad mail (as theoretically all good mail will set an appropriate return-path).