Article
How to detect automatically generated emails - arp242.net
arp242.net
Quoted on this wiki
Every place a page here uses this source, in the order the words come in it.
Turns out that reliably detecting automatically generated emails is not always easy. Here are my observations based on writing a detector for this and scanning about 100,000 emails with it (extensive personal archive and a company archive); it’s been working well for several years (I originally wrote this in 2015). “Defined in RFC 3834.” This is the ‘official’ standard to indicate your message is an autoreply. You should not send a reply if Auto-Submitted is present and has a value other than no.
Defined in RFC 3834. “This is the ‘official’ standard to indicate your message is an autoreply.” Defined by Microsoft
Defined in RFC 3834. “You should not send a reply if Auto-Submitted is present and has a value other than no.” Defined by Microsoft
Defined by Microsoft “You should not send a reply if X-Auto-Response-Suppress contains DR (“Suppress delivery reports”), AutoReply (“Suppress autoreply messages other than OOF notifications”), or All.” List-Id and List-Unsubscribe headers
When you send out an autoreply from an email system you want to take care to not send replies to automatically generated emails. At best, you will get a useless delivery failure. At worst, you will get an infinite email loop and a world of chaos. “reliably detecting automatically generated emails is not always easy.” Defined in RFC 3834.
“not send replies to automatically generated emails.” Turns out that reliably detecting automatically generated emails is not always easy. Here are my observations based on writing a detector for this and scanning about 100,000 emails with it (extensive personal archive and a company archive); it’s been working well for several years (I originally wrote this in 2015).
“At best, you will get a useless delivery failure. At worst, you will get an infinite email loop and a world of chaos.” Turns out that reliably detecting automatically generated emails is not always easy. Here are my observations based on writing a detector for this and scanning about 100,000 emails with it (extensive personal archive and a company archive); it’s been working well for several years (I originally wrote this in 2015).
Many delivery failure messages don’t really indicate that they’re failures. Some ways to check this: “From contains mailer-daemon or Mail Delivery Subsystem” Specific mail library footprints
HTML only “Pretty much all regular mail clients also set a text part.” Delivery failures
HTML only “If an email only has a HTML part and no no text part, it’s a good indication this is an autogenerated email or newsletter.” Delivery failures
X-Mailer starts with MIME-tools. “Even when following all of the above advice you may still encounter an email program that will slip through. This can very dangerous as email systems that simply IF email THEN send_email have the potential to cause infinite email loops.” For this reason I recommend keeping track of which emails you’ve sent an autoreply to and rate limiting this to at most n emails in n minutes per email address. This will break the back-and-forth chain.
When you send out an autoreply from an email system you want to take care to not send replies to automatically generated emails. At best, you will get a useless delivery failure. At worst, you will get an infinite email loop and a world of chaos. “reliably detecting automatically generated emails is not always easy.” Defined in RFC 3834.
Note that checking for the existence of this field is not recommended, as some mails use normal and some other obscure values (this is not very common though). “My recommendation is to not send a reply if the value case-insensitively matches bulk, auto_reply, or list.” A collection of other somewhat obscure headers I’ve encountered. I would recommend not sending an autoreply if one of these is set. Most mails also set one of the above headers, but some don’t (this is not very common).
“At best, you will get a useless delivery failure. At worst, you will get an infinite email loop and a world of chaos.” Turns out that reliably detecting automatically generated emails is not always easy. Here are my observations based on writing a detector for this and scanning about 100,000 emails with it (extensive personal archive and a company archive); it’s been working well for several years (I originally wrote this in 2015).