Set Auto Reply/Vacation Resonder using Procmail


We can set auto reply/vacation responder in multiple ways e.g. Webmail or Procmail. It is very easy to set vacation responder using webmail. However, if your webmail does not support vacation responder, you can achieve the target using procmail.

Step 1: Install procmail if not installed previously.

root@mail: apt install procmail

Step 2: Change directory to user1 where an auto reply message shall be set.
root@mail:cd /home/user1

Create a file .procmailrc in this directory.

root@mail:vim /home/user1/.procmailrc

SHELL=/bin/sh
        :0 h c
            * !^FROM_DAEMON
            * !^X-Loop:
user1@domain.com      
| (formail -r -I"Precedence:junk" \
-A"X-Loop:
 user1@domain.com" ; \
                cat $HOME/message; \
                ) | $SENDMAIL -oi –t
:0

Step 3: Forward emails to procmail
root@mail:vim /home/user1/.forward
|/usr/bin/procmail

Step 4: Create auto-reply message and save it.
root@mail:vim /home/user1/message
##Write your message here. For example..
I shall not be available till next Thursday (August 18, 2019). Please communicate with Mr. XYZ for any emergency.

Now, you will get vacation responder message while sending email to user1@domain.com.

Comments

Popular posts from this blog

Install a Comodo/Sectigo Domain Validation SSL certificate in Zimbra

Adding DKIM record (1024 bit) in Zimbra

Recipient Limit of a Message in Zimbra