Friday, June 09, 2006

Install Postfix with mysql, sasl on slackware (todo: postfix conf files, clamav, pop-before-smtp)

Cyrus-sasl -> ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/
Couirier(Imap. Maildrop, Auth)-> http://www.courier-mta.org/
http://kent.dl.sourceforge.net/sourceforge/courier/courier-imap-4.0.6.tar.bz2
AuthLib-> http://kent.dl.sourceforge.net/sourceforge/courier/courier-authlib-0.57.tar.bz2

Clamav -> http://www.clamav.net/
PopBeforeSmtp -> http://popbsmtp.sourceforge.net/
Postfix -> http://www.postfix.org/


#######################################################################
###Postfix

tar -xzvf postfix-*.tar.gz
cd postfix-*
make makefiles CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -I/usr/local/include/sasl AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/local
/lib -lsasl
make

mv /usr/sbin/sendmail /usr/sbin/sendmail.OFF
mv /usr/bin/newaliases /usr/bin/newaliases.OFF
mv /usr/bin/mailq /usr/bin/mailq.OFF
chmod 755 /usr/sbin/sendmail.OFF /usr/bin/newaliases.OFF /usr/bin/mailq.OFF
#Adding postfix, postdrop user and groups
groupadd postfix
useradd -g postfix -s /dev/null postfix
groupadd postdrop
#Install Postfix
make install

#######################################################################
###Courier AuthLib ver 0.57

./configure --with-mysql-libs=/usr/lib/mysql/ --with-mysql-includes=/usr/include/mysql/ --with-authmysql --with-authmysql=yes
make
make install
make install-configure

#######################################################################
###Courier Imap
#Options foc courier-imap
#--enable-unicode
#--with-trashquota
#--disable-root-check

./configure --enable-workarounds-for-imap-client-bugs --with-authchangepwdir --enable-unicode --with-trashquota --disable-root-check
make
make install
make install-configure
#######################################################################
###postfix.sh
#!/bin/sh

case "$1" in
start)
echo "Starting POSTFIX..."
/usr/sbin/postfix start
;;
stop)
echo "Stopping POSTFIX..."
/usr/sbin/postfix stop
;;
restart)
echo "Restarting POSTFIX..."
/usr/sbin/postfix stop
sleep 1;
/usr/sbin/postfix start
;;
reload)
echo "Restarting POSTFIX..."
/usr/sbin/postfix reload
;;
*)
echo "usage [start] [stop] [restart] [reload]"
;;
esac
exit 0
#######################################################################

###Pop Before Smtmp
#Install requiered Perl modules
perl -MCPAN -e 'install Time::HiRes'
perl -MCPAN -e 'install File::Tail'
perl -MCPAN -e 'install Date::Parse'
perl -MCPAN -e 'install Net::Netmask'
perl -MCPAN -e 'install DB_File'

0 Comments:

Post a Comment

<< Home