Writing an auto responder
Wednesday, November 9, 2005 at 3:55PM OK, mostly these are notes just now, as I do a little research for #1350425. I'm trying to figure out what the 'correct' behaviour for an email auto responder is. MailManager has an auto response system which will send out an email when a ticket is submitted, to acknowledge its receipt. I want to get it right.
There are two problems:
- Do you send an automatic response at all? Is there going to be a human being on the other end to receive it, or are you going to wind up spamming a mailing list, creating mailing loops, sending a message that will bounce?
- If you do decide to send a message, who do you send it to? That might sound daft, but there are a number of header fields which indicate who might wish receipt of a message, including ('From', 'Sender', 'Reply-To', 'Return-Path', 'Resent-From').
Currently MailManager will refuse to send a response if any of the following conditions are met:
- It's a mailing list identified by the existence of any header in ('list-id', 'list-help', 'list-unsubscribe', 'list-owner').
- The Precedence header is set to one of ('junk', 'bulk', 'list').
- There is no Return-Path, or Return-Path is empty.
- The Return-Path starts with any of ('mailer-daemon', 'owner-').
And it will unconditionally send the auto response message to the address in Return-Path. For dropping the message, I agree with everything but point 3 (which I'm not entirely sure about). And I'm not convinced that the algorithm for choosing the reply address is robust enough. So let's start digging into the RFCs.
Reader Comments (3)
This looks really thorough. There's probably no urgency on it though, it looks like we're doing a better job than most mail agents.
Yeah, I've satisfied myself that we do (enough of) the right thing now, so I've closed the bug in question. Turns out it was his MTA (http://www.merakmailserver.com/" rel="nofollow">Merak) not setting Return-Path...
Nice that you're working on auto-reply features. I don't know MailManager, but I've just written a comment indicating three features that are currently missing from a lot of auto-reply setup interfaces, maybe you'll want to read this:
http://braintickle.blogspot.com/2005/11/auto-reply-interface-priorities.html
Cheers,
Philipp