PostFix Howto With SASL

From ArchWiki
Revision as of 23:46, 15 April 2006 by Mos (Talk | contribs) (rm spam, spammer:Xtrinityluvx)

Jump to: navigation, search

Postfix with sasl support howto ( Justin Smithies - justin AT smithies.me.uk || formfixed by Pablo Bitreras - dexodvz AT vtr . net)

First you will need to install srcpac :

pacman -Sy srcpac

Then type edit the /etc/srcpac.conf file and add the following :

# postfix sasl
conf''postfix<code>('#source</code>(ftp://ftp.porcupine.org#source=(ftp://ftp.aet.tu-cottbus.de/pub/postfix''tls/pfixtls-0.8.18-2.1.3-0.9.7d.tar.gz ftp://ftp.porcupine.org#'
'#cd \$startdir/src/\$pkgname-\$pkgver#cd \$startdir/src/\$pkgname-\$pkgver\npatch -p1 < ../pfixtls-0.8.18-2.1.3-0.9.7d/pfixtls.diff#'
'#make OPT#make CCARGS<code>\\"-DUSE''SASL''AUTH -I/usr/include/sasl -DUSE_SSL -I/usr/include/openssl\\" AUXLIBS</code>\\"-L/usr/lib -R/usr/lib -lsasl2 -lssl -lcrypto\\" OPT#')

Save the above then type :

srcpac -Sb postfix

This will download and build Postfix with SASL support.

An example line for the /etc/postfix/main.cf file to enable the SASL is below.

mydestination = $myhostname, localhost.$mydomain, $mydomain
myorigin = $mydomain
smtpd''sasl''auth_enable = yes
smtpd''sasl''security_options = noanonymous
smtpd''sasl''tls''security''options = $smtpd''sasl''security_options
smtpd''tls''auth_only = no
smtpd''sasl''local_domain = $mydomain
smtpd''recipient''restrictions = permit''mynetworks,permit''sasl''authenticated,reject''unauth_destination,permit
broken''sasl''auth_clients = yes
relay_domains = *

You might want to change various options to suit your needs though. Setup Postfix as you normally would and start it with :

/etc/rc.d/postfix start

or add it to your /etc/rc.conf file so Postfix starts each reboot.

Hopefully you should be able to telnet to your Postfix server with :

telnet localhost 25

You should then type :

EHLO test.com

This is roughly what you should see :

Trying 127.0.0.1...

Connected to localhost.localdomain
Escape character is '^]'

220 justin ESMTP Postfix
EHLO test.com
250-justin
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN OTP DIGEST-MD5 CRAM-MD5
250-AUTH=PLAIN OTP DIGEST-MD5 CRAM-MD5
250 8BITMIME