I am currently extending an e-mail system with an autoresponse feature. In a dark past, I've seen some awesome mail loops, and I'm now trying to avoid such a thing from happening to me.
I've looked at how other tools ('mailbot', 'vacation') are doing this, grepped my own mail archive for suspicious mail headers, but I wonder if there is something else I can add.
My process at this point:
'^root@',
'^hostmaster@',
'^postmaster@',
'^nobody@',
'^www@',
'-request@'
'^precedence: junk$',
'^precedence: bulk$',
'^precedence: list$',
'^list-id:',
'^content-type: multipart/report$',
'^x-autogenerated: reply$',
'^auto-submit: yes$',
'^subject: auto-response$'
Auto-response:
to the subject, setting headers Precedence: bulk
and Auto-Submit: yes
to hopefully prevent some remote mailer from propagating the autoresponse any further.Is there anything I'm missing?
Update 2014-05-22
To find if an inbound message is an "out-of-office" or other automatic reply, we use that procedure:
First, Find if header "In-Reply-To" is present. If not, that is an auto-reply.
Else, check if 1 of these header is present:
In my research so far I've come up with these rules.
Return-Path
header is <>
or missing/invalidAuto-Submitted
header is present with any value other than "no"X-Auto-Response-Suppress
header is presentIn-Reply-To
header is missing
Auto-Submitted: auto-generated
header (or auto-replied
as appropriate)MAIL FROM:
command with the null address <>
Precedence: list
messages will cause false positives, at least for my app's configurationAuto-Submitted
Comments welcome and I'll update this answer as this is a good question and I'd like to see an authoritative answer created.
Include a phrase like "This is an automatically-generated response" in the body somewhere. If your message body is HTML (not plain text) you can use a style to make it not visible.
Check for this phrase before responding. If it exists, odds are good it's an automated response.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With