June 22, 2010

Postfixadmin autoreply / out of office on REDHAT / Centos

by Matnet @ 11:02 am in BSD & *NIX

Requirement :

# Requirements - the following perl modules are required:
# DBD::Pg or DBD::mysql
# Mail::Sender, Email::Valid MIME::Charset, Log::Log4perl, Log:ispatch, MIME::EncWords and GetOpt::Std

groupadd -r -g 65501 vacation
useradd -r -u 65501 -g vacation -d /var/spool/vacation -s /sbin/nologin vacation
mkdir /var/spool/vacation

cd /var/www/postfixadmin/VIRTUAL_VACATION
cp vacation.pl /var/spool/vacation/vacation.pl
chown -R vacation:vacation /var/spool/vacation
sudo chmod -R 700 /var/spool/vacation

nano /var/spool/vacation/vacation.pl

our $db_type = 'mysql';
our $db_username = 'postfix';
our $db_password = 'yourdbpasswd';
our $db_name = 'postfix';

our $vacation_domain = 'autoreply.yourdomain.com';

cd /var/www/postfixadmin

nano config.inc.php

$CONF['vacation'] = 'YES';
$CONF['vacation_domain'] = 'autoreply.yourdomain.com';


cd /etc/postfix
nano master.cf

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}


nano main.cf

transport_maps = hash:/etc/postfix/transport

nano transport

autoreply.yourdomain.com vacation

postmap /etc/postfix/transport


/etc/init.d/postfix reload

Done.


Comments
* Name


* Email Address (will not be published)


Site



*Image Validation (?)

Comments

HTML: NO


:: Shout Me ::



:: About Me ::



They call me : Yachiru
Name : Yachiru Kusajishi
Birthday : February 12
Working Field : Shinigami lieutenant - 11th Division
E-mail : matnet80 [at] yahoo [dot] com


:: Calendar ::

February 2012
S M T W T F S
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29