Basic Rules for Autoreplies
Selecting Which Messages to Reply To
-
Only reply to email with your address in the To/Cc headers (this prevents you replying to mailing list stuff)
-
Do not reply to messages including obvious mailing list headers, or with Precedence: bulk, Precedence: list or Precedence: junk
-
Do not reply to messages with null SMTP sender, or with from addresses such as MAILER-DAEMON etc
-
Do not reply to messages from a sender address to which you have recently sent an autoreply (ie in the last week or day - so if it goes horribly wrong you don't bury the other party under mail).
Crafting Your Reply
-
Send your replies using the null SMTP sender (ie <>) - this makes them appear like bounces, and prevents other systems trying to reply to them.
-
Add a Precedence: junk header to further reduce the chance of other systems replying to your message.
-
Send your autoreply to the envelope sender address1 of the original message - this prevents you trying to send to a list address which may legitimately appear as the From: header. Do not try and interpret explicit Reply-To: etc.
How To Do This In Exim
The following is a recipe posted by Edgar Lovecraft on the
mailing list. It consists of a router, which runs an exim filter file, and an autoreply transport.
Router
##Router##
uservacation:
driver = redirect
allow_filter
hide_child_in_errmsg
ignore_eacces
ignore_enotdir
reply_transport = vacation_reply
no_verify
require_files = <location_to_user_spool_directory>/.vacation.msg
file = <location_to_user_spool_directory>/.vacation.msg
user = exim
group = exim
unseen
Transport
##Transport##
vacation_reply:
driver = autoreply
Per Recipient Filter
This could be hard/symlinked if needed, or even modify the router to always use one file, but dependant on the existance of a per-user .vacation.msg file.
# Exim filter
if ($h_subject: does not contain "SPAM?" and personal) then
mail
##### This is the only thing that a user can set when they #####
##### decide to enable vacation messaging. The vacation.msg.txt #####
expand file <location_to_user_spool_directory>/.vacation.msg.txt
once <location_to_user_spool_directory>/.vacation.db
log <location_to_user_spool_directory>/.vacation.log
once_repeat 7d
to $reply_address
from $local_part\@$domain
subject "This is an autoreply...[Re: $h_subject:]"
endif
What Will Happen If You Ignore These Recommendations
If you send an autoreply to one of the exim mailing lists you will be unsubscribed. If you have caught the list admins in a good mood then this is all that happens.... otherwise....
CategoryHowTo
http://www.exim.org/eximwiki/EximAutoReply?highlight=%28CategoryHowTo%29#head-21fb25712b6f00cb8a2a0997b7ca48231801f7cc