How to: install postfix on slackware
Please do not use these instructions on a production environment, without testing them before. These instructions does not include configuration steps, but I’ll post them later. All you need for this setup is a “full” installation of a slackware linux 12 (other versions should do as well) with internet connection.
This page is a slightly updated and slackware specific version of the following page: http://www.postfixvirtual.net/postfixvirtual.html#introduction
#Download and unpack sources
mkdir -p /downloads/postfix;cd /downloads/postfix
wget http://www.openssl.org/source/openssl-0.9.8j.tar.gz
wget http://download.oracle.com/berkeley-db/db-4.7.25.tar.gz
wget ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.22.tar.gz
wget ftp://ftp.kfki.hu/pub/packages/mail/postfix/official/postfix-2.5.6.tar.gz
wget http://garr.dl.sourceforge.net/sourceforge/courier/courier-authlib-0.62.1.tar.bz2
wget http://garr.dl.sourceforge.net/sourceforge/courier/courier-0.60.0.tar.bz2
wget http://garr.dl.sourceforge.net/sourceforge/courier/maildrop-2.0.4.tar.bz2
wget http://www.ijs.si/software/amavisd/amavisd-new-2.6.2.tar.gz
wget http://freshmeat.net/redir/clamav/29355/url_tgz/clamav-0.94.2.tar.gz
ls *gz | xargs -I{} tar xzf {}
ls *bz2 | xargs -I{} tar xjf {}
#Install openssl
cd openssl-0.9.8j
./config shared
make; make test
make install
echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
ldconfig
#Install berkeley db
cd ../db-4.7.25/build_unix
../dist/configure --prefix=/usr/local/bdb
make install
echo "/usr/local/bdb/lib" >> /etc/ld.so.conf
mkdir /usr/include/db
ln -s /usr/local/bdb/include/db.h /usr/include/db/db.h
rm /usr/include/db.h
ln -s /usr/local/bdb/include/db.h /usr/include/db.h
ldconfig
#Install cyrus-sasl
cd ../../cyrus-sasl-2.1.22
export CPPFLAGS="-I/usr/include/mysql"
#If you got a 64bit system you might change –with-mysql=/usr/lib/mysql to –with-mysql=/usr/lib64/mysql
./configure --enable-anon --enable-plain --enable-login --enable-sql --disable-krb4 --disable-otp --disable-cram --disable-digest --with-mysql=/usr/lib/mysql --without-pam --without-saslauthd --without-pwcheck --with-dblib=berkeley --with-bdb-libdir=/usr/local/bdb/lib --with-bdb-incdir=/usr/local/bdb/include --with-openssl=/usr/local/ssl --with-plugindir=/usr/local/lib/sasl2
make; make install
ln -s /usr/local/lib/sasl2 /usr/lib/sasl2
echo "/usr/local/lib/" >> /etc/ld.so.conf
ldconfig
#install postfix, hooray..
cd ../postfix-2.5.6
groupadd postfix -g 200
useradd postfix -u 2000 -g 200
groupadd postdrop -g 201
#If you got a 64bit system you might change AUXLIBS=-L/usr/lib/mysql to AUXLIBS=-L/usr/lib64/mysql
make makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -I/usr/local/include/sasl -I/usr/local/bdb/include -DUSE_TLS -I/usr/local/ssl/include/openssl ' 'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/local/lib -lsasl2 -L/usr/local/bdb/lib -L/usr/local/ssl/lib -lssl -lcrypto'
make install
#Install courier authlib
groupadd courier -g 202
useradd courier -g 202 -u 2001 -d /usr/local
chown courier /usr/local
chown -R 202:2001 courier-authlib-0.62.1
su - courier
cd /downloads/postfix/courier-authlib-0.62.1
#You know.. 64bits..
./configure --with-mysql-libs=/usr/lib/mysql --with-mysql-includes=/usr/include/mysql/ --with-authmysql --with-authmysql=yes
make
exit
cd /downloads/postfix/courier-authlib-0.62.1
make install; make install-configure
#Install courier imap
chown -R 202:2001 ../courier-0.60.0
su - courier
cd /downloads/postfix/courier-0.60.0
./configure --enable-workarounds-for-imap-client-bugs --with-authchangepwdir --enable-unicode --with-trashquota
make
exit
cd /downloads/postfix/courier-0.60.0
make install
make install-configure
#Install courier maildrop
groupadd vmail -g 203
useradd vmail -u 2002 -g 203
su - courier
cd /downloads/postfix/maildrop-2.0.4
export CPPFLAGS="-I/usr/include/mysql"
export LDFLAGS="-L/usr/lib/mysql"
./configure --enable-maildirquota --enable-maildrop-uid=2002 --enable-maildrop-gid=203 --with-trashquota
make
exit
cd /downloads/postfix/maildrop-2.0.4
make install
chown root /usr/local/bin/maildrop
chmod u+s /usr/local/bin/maildrop
#install spamassasin
export LANG=en_US
perl -MCPAN -e shell
cpan> o conf prerequisites_policy follow
cpan> auto-install Mail::SpamAssassin
#or if you encounter problems
#install Digest::SHA1
#install HTML::Parser
#install Net::DNS
#install Mail::SpamAssassin
cpan> q
echo "export LANG=en_US" >> /etc/profile
Please note clamav and amavisd-new will be installed later.
About this entry
You’re currently reading “How to: install postfix on slackware,” an entry on hybris
- Published:
- Sunday, January 25th, 2009 at 18:04
- Author:
- nomad84
- Category:
- it
- Tags:
- amavisd-new, berkeley db, clamav, courier, cyrus sasl, linux, notes to self, openssl, postfix, slackware, spamassassin
1 Comment
Jump to comment form | comments rss | trackback uri