I am facing issue with exim configuration for setting auto-reply for single user email account. Currently, my exim configuration for autoreply is as follows and it causes autoreply emails to be sent to all users account instead of one:
In Routers Configuration section:
uservacation:
driver = redirect
allow_filter
hide_child_in_errmsg
ignore_eacces
ignore_enotdir
reply_transport = vacation_reply
no_verify
require_files = /var/spool/exim/.vacation.msg
file = /var/spool/exim/.vacation.msg
user = exim
group = exim
unseen
In Transport Configuration section:
vacation_reply:
driver = autoreply
Can anyone guide me on how to configure exim auto-reply for a single email account?
Best Answer
This means that the router will decline if that file does not exist. If it does exist, it will accept the message and handle it.
This is an argument to the transport, and tells it which file to use for the autoreply.
Since you're using a system-wide autoreply message, you have a global on/off switch with a global message. Clearly you don't want that.
Instead, do this:
That is, drop the
user=
andgroup=
configuration options, add thecheck_local_user
one, and use$home/.vacation.msg
as the file containing users' vacation messages.This way, users can create a file
~/.vacation.msg
to create an autoreply, and they can remove it if they autoreply is no longer required.You may also want to add the
once
configuration to yourvacation_reply
transport, so that if someone sends three emails to a person who is on vacation in short succession, they only get one vacation message. See the documentation on the autoreply transport for details on how to do that.