From LedHed's Wiki
Revision as of 01:02, 3 April 2007 by Ledhed (Talk | contribs)

Jump to: navigation, search

Reference: http://linox.be/index.php/2005/07/13/44/#comment-52886

Creating the Vacation User/Group

groupadd vacation
useradd -s/sbin/nologin -d/nonexistent -g vacation vacation

See [User Management] for more information on creating users in linux


Creating Directories

mkdir -p /var/spool/vacation
cp /tmp/postfixadmin-2.1.0/VIRTUAL_VACATION/vacation.pl /var/spool/vacation
chown -R vacation.vacation /var/spool/vacation
chmod -R 700 /var/spool/vacation


Postfix Intigration

Master.cf

Edit /etc/postfix/master.cf Add these lines at the bottom.

### Postfix Admin Vacation Message
vacation  unix  -       n       n       -       -       pipe
  flags=Rhu user=vacation argv=/var/spool/vacation/vacation.pl

Transport Map

Create a transport map

touch /etc/postfix/transport_maps.cf

Edit transport_maps.cf and add these lines to it. Substitute your information where needed.

user = postfix
password = ********
hosts = localhost
dbname = postfix
query = SELECT transport FROM transport_table WHERE domain='%s'

Edit main.cf and add/change:

transport_maps = mysql:/etc/postfix/transport_maps.cf


MySQL

Down and Dirty

Create a table called 'transport' Create 'domain' field varchar(255) and PKEY Create 'transport' field varchr(255)

Add your FQDN in the 'domain' field and 'virtual:' in the 'transport' field.
Add 'autoreply.yourdomain.com in the 'domain' field and 'vacation' in the 'transport' field.
it should look something like this:

+----------------------+----------+
| domain               | transport|
+----------------------+----------+
| domain.tld           | virtual: |
| autoreply.domain.tld | vacation |
+----------------------+----------+


More to come