HowTo setup vacation using postfix on Debian Etch
This post will show how to setup an auto-reply message using vacation on a debian etch server running postfix. This should work in the same way using other email servers, but this was tested with postfix. I’ll assume that you have postfix already running properly on the server. The first step is to install the vacation package. Since vacation is available in etch we can install it just by running:
aptitude install vacation
and this will install vacation version 3.3.0 on the system
The next step is to activate the auto-reply for some user/s. This will require to create a vacation message and to enable it when an email is received for the account. For the first step, using your preferred text editor create a file called .vacation.msg in the home of the user; for example this might look like:
Subject: Re: $SUBJECT
I am on vacation until November 14 and will not be reading my emails
during this time. If you have any urgent messages for me during this
time please call me directly on my mobile.Any occurrence of the string $SUBJECT in .vacation.msg will be replaced by the original subject of the message.
Next you will have to initialize the vacation db, by running:
vacation -I
as the respective user. This will result in the creation of the file ~/.vacation.db
Please ensure that both files .vacation.msg and .vacation.db are owned by the respective user if not, you will have permission problems and this will not work as expected.
Finally you need to trigger the activation of the vacation auto-reply when an email is received by the user. This can be done in different ways, using a .forward file or procmail, etc. For ex. using .forward to keep one copy of the email local and to pipe it also to vacation you would need to create the file (replace username with the actual user name):
\username, "|/usr/bin/vacation username"
If for some reason this is not working as expected you can check the system logs to see what is wrong.
>
Tags: Debian, debian-etch, postfix, vacation

5th November 2008, 15:37
Now if only getting the time to take a vacation were as easy…
Nice writeup
6th March 2009, 00:35
Thanks for the tip!
15th August 2009, 13:52
Thanks again.
24th March 2010, 01:03
im sorry i dont understand (where and how to) the last part what exactly did you mean with:
Finally you need to trigger the activation of the vacation auto-reply when an email is
received by the user. This can be done in different ways, using a .forward file or procmail, etc. For ex. using .forward to keep one copy of the email local and to pipe it also to vacation you would need to create the file (replace username with
the actual user name):
\username, “|/usr/bin/vacation username”
thanks you
24th March 2010, 01:11
Depending on your MTA you will need to configured for your user how to activate this. I exemplified using the default unix .forward method, that should work on most linux based mta’s. hth
24th March 2010, 01:15
also, i think my forwards are in mysql is that wha you mean? do i have to insert into source =’username’ destination= ‘/usr/bin/vacation username’
??
thanks in advance
24th March 2010, 01:18
That is correct.
24th March 2010, 01:24
i couldnt
I’m sorry to have to inform you that your message could not be
be delivered to one or more recipients. It’s attached below.
For further assistance, please send mail to
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The Postfix program
(expanded from ):
unknown user: “/usr/bin/vacation”
24th March 2010, 01:26
your mailer took that as a user not a pipe. Did you add “|”? like
|/usr/bin/vacation username
24th March 2010, 01:34
you’re right i forgot the | but i added it also i added the \ at username without in both cases success
with “\username” i dont receive anything
with “username” i do receive:
I’m sorry to have to inform you that your message could not be
be delivered to one or more recipients. It’s attached below.
For further assistance, please send mail to
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The Postfix program
(expanded from
): unknown user: “|/usr/bin/vacation”
24th March 2010, 01:36
This is not related to vacation and I assume your setup is not handling properly pipes. (try |/bin/true just to be sure).
24th March 2010, 01:41
you’re right it is not handling properly pipes
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The Postfix program
(expanded from):
unknown user: “|/bin/true”
24th March 2010, 02:12
is there a way without using pipes? i checked the configuration (master.cf etc) and it looks like pipes are on but i dont know what or where to check if vacation pipe is
on
i really really!! thank you very much for your time
23rd May 2011, 07:18
awesome as usual – simple, yet effective, thanks!