PostfixAdmin Vacation/Out of Office Autoresponder
PostfixAdmin Vacation/Out of Office Autoresponder
PostfixAdmin actually comes with a perl plugin that enables a Vacation/Out of Office Autoresponder; for some reason, though, it’s not installed by default. The setup only takes a few minutes and it enables users to manage their own autoresponders, so it’s well worth the time.
This setup assumes that you’ve followed this Postfix Dovecot Mailserver Walkthrough. If not, your mileage may vary. Basically, you’ll need to have PostfixAdmin setup, and be using it to manage virtual mail users.
First, we need to grab some perl library dependancies
Create a user to manage the system:
Update the vacation script with your settings
our $db_type = ‘mysql’;
our $db_username = ‘postfix’;
our $db_password = ‘yourdbpasswd’;
our $db_name = ‘postfix’;
our $vacation_domain = ‘autoreply.yourdomain.com’;
Save and close (CTRL + X)
Update the postfixadmin config file
$CONF['vacation'] = ‘YES’;
$CONF['vacation_domain'] = ‘autoreply.yourdomain.com’;
Add (near the end of the file):
vacation unix – n n – - pipe flags=Rq user=vacation argv=/var/spool/vacation/vacation.pl -f ${sender} ${recipient}
Save and close (CTRL + X)
transport_maps = hash:/etc/postfix/transport
Save and close (CTRL + X)
Create (or update) a transport map to handle the redirected email
autoreply.yourdomain.com vacation
Save and close (CTRL + X)
Postfix uses a hashed file to do the lookups, the postmap command creates that file.
Reload the postfix config to activate the changes
That’s it. Now if you log in to your postfix admin control panel, you’ll be able to manage autoresponders for all the accounts. When users log in to their specific accounts they’ll also be able to manage their own out of office notifications.
hola