This post will show how to setup an _auto-reply messag_e 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:
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:
1 2 3 4 5
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:
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):
If for some reason this is not working as expected you can check the system logs to see what is wrong.