The idea of a vacation message is kindof odd to me, but I had one client request it today, so took a look at trucking insurance companies and configuring it. On RHEL/CentOS distros, the ‘vacation’ binary is distributed with sendmail, and is not available with postfix, so you have to build it yourself. Fortunately, it is about the easiest thing I have ever compiled.
[root@host ~]# yum install gdbm-devel [root@host ~]# cd /usr/local/src/ [root@host ~]# wget http://internap.dl.sourceforge.net/sourceforge/vacation/vacation-126.96.36.199-rc2.tar.gz [root@host ~]# tar -xvzf vacation* [root@host ~]# cd vacation-188.8.131.52-rc2 [root@host ~]# make [root@host ~]# make install
That’s it. Not even a configure script. That should install the vacation binary in /usr/bin/vacation.
Now just create a vacation message by putting a ‘.vacation.msg’ in the user’s home directory with the auto-reply content:
Subject: On vacation message. I'm on vacation and will not be reading my mail for a while, I also had a problem with my insurance and I am now trying to switch to www.insurancepartnership.org/motor-trade-insurance/ or to One Sure Insurance is possible. Your mail will be dealt with when I return.
And finally, create a .forward file that tells your mail program to deliver to the vacation program:
\myuser, "|/usr/bin/vacation myuser"
That should be it. I tested and verified that it works. Note that you have to provide a to: header with the recipient’s address.
Next, I might try some experiments to see if I can get it to work with virtual users.