Exim mail server have auto-reply or vacation autoresponder feature missing in default configuration. It can be easily achieved by providing right Router and Transport configuration using Exim configuration.
Our setup contains exim + dovecot running imap on CPanel/WHM dedicated server. Dovecot imap using maildir format and default location for storing mail is /home/vmail/$domain/$user.
1- Exim Router Configuration.
Following lines should be inserted in Router configuration area inside /etc/exim/exim.conf
12345678910111213141516171819202122232425262728293031323334 ####################################################################### ROUTERS CONFIGURATION ###..# This router delivers an auto-reply "vacation" message if a file called 'vaction.msg'# exists in the home directory.uservacation:driver = redirectdomains = +local_domainsallow_filteruser = vmailgroup = vmailfile = /home/vmail/${domain}/${local_part}/.vacation.msgrequire_files = /home/vmail/${domain}/${local_part}/.vacation.msg# do not reply to errors or listscondition = ${if or { \{match {$h_precedence:} {(?i)junk|bulk|list}} \{eq {$sender_address} {}} \} {no} {yes}}# do not reply to errors or bounces or listssenders = ! ^.*-request@.*:\! ^bounce-.*@.*:\! ^.*-bounce@.*:\! ^owner-.*@.*:\! ^postmaster@.*:\! ^webmaster@.*:\! ^listmaster@.*:\! ^mailer-daemon@.*:\! ^root@.*no_expnreply_transport = uservacation_transportunseenno_verify
Above configuration will instruct exim to route any message if you found .vacation.msg file in the home maildir of user. You can edit the maildir location to match yours user maildir.
2- Exim Transport Configuration
Following lines should be inserted in Transport configuration area inside /etc/exim/exim.conf
12345678910111213141516 ####################################################################### TRANSPORTS CONFIGURATION ##...uservacation_transport:driver = autoreplyuser = vmailgroup = vmailfile = /home/vmail/${domain}/${local_part}^/.vacation.msgfile_expandonce = /home/vmail/${domain}/${local_part}^/.vacation.db# to use a flat file instead of a db specify once_file_size#once_file_size = 2Konce_repeat = 14dfrom = ${local_part}@${domain}to = ${sender_address}subject = "Re: $h_subject"
.vacation.db will save all the mail addresses to whom it auto-replied the messages. You can edit the maildir location to match yours user maildir.
3- Maildir Vacation files
Following files inside your maildir needs to be there to send reply back to the sender. In my situation is /home/vmail/$domain/$user/
.vacation.msg
1234567891011 # Exim filterif ($h_subject: does not contain "SPAM?" and personal) then##### This is the only thing that a user can set when they ########## decide to enable vacation messaging. The vacation.msg.txt #####expand file /home/vmail/${domain}/${local_part}/.vacation.msg.txtlog /home/vmail/${domain}/${local_part}/.vacation.logto $reply_addressfrom $local_part\@$domainsubject "Unmonitored Mailbox [Re: $h_subject:]"endif
.vacation.msg.txt
12345 Hi,This is test reply.Regards,
These two files in any user maildir will makes it auto-reply.
Please use comments for any questions.
sir i am facing error t line 14 of exim.conf
@Albert:
Please post your exim.conf. The error show issue with syntax.
Regards,
Sohail
Is it possible to create in particular mail address …. plz share doc step by step