Postfix Vacation Message

Posted on June 26th, 2008 in General,Linux System Administration,Mail by Brandon

The idea of a vacation message is kindof odd to me, but I had one client request it today, so took a look at 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-1.2.7.0-rc2.tar.gz
[root@host ~]# tar -xvzf vacation*
[root@host ~]# cd vacation-1.2.7.0-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.
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.

6 Responses to 'Postfix Vacation Message'

Subscribe to comments with RSS or TrackBack to 'Postfix Vacation Message'.

  1. Tim said,

    on July 14th, 2008 at 4:50 pm

    Wondering if you made any headway on the virtual users front?


  2. on July 30th, 2008 at 6:55 am

    Rather than creating the vacation message file and forward file yourself it might be easier to just run “vacation” to set it up. :-)

    cheers!
    Chris (vacation maintainer)


  3. on August 8th, 2008 at 10:09 pm

    [...] previously written about both Virtual Mail users, and about enabling vacation messages for postfix. The next step was to get vacation working with virtual [...]

  4. Mike said,

    on December 10th, 2008 at 7:32 pm

    Hmm. No worky for me on CentOS 5
    make – make: Nothing to be done for `all’.
    make install –
    ./html2man.pl /usr/man/man1/vacation.1
    /bin/sh: /usr/man/man1/vacation.1: No such file or directory
    make: *** [install] Error 1

  5. Stephane said,

    on August 14th, 2009 at 2:35 am

    This message only means /usr/man/man1/ needs to exist.

  6. benny007 said,

    on February 10th, 2011 at 5:59 am

    Thanks mate. regarding the error the only step you need to add before the make command is:

    mkdir -p /usr/man/man1

Post a comment

Please copy the string DvDRZs to the field below: