Installatie Postfix SASL

From Frotmail Projects
Revision as of 09:20, 5 April 2022 by Eric (talk | contribs) (Created page with "= SASL = Download sasl van ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ uitpakken: tar -zvxf cyrus-sasl-2.1.21.tar.gz cd cyrus-sasl-2.1.21 Compilen: ./configure make make install Intressant leesvoer: CYRUS SASL Before installing CYRUS, you should know that mysql libraries are assumed to be stored in /usr/local/mysql/lib/mysql and header files are in /usr/local/mysql/include/mysql directories. If you are using Redhat, your mileage may differ a little bit. You...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SASL

Download sasl van

ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/

uitpakken:

tar -zvxf cyrus-sasl-2.1.21.tar.gz
cd cyrus-sasl-2.1.21

Compilen:

./configure
make
make install

Intressant leesvoer:

CYRUS SASL
Before installing CYRUS, you should know that mysql libraries are assumed to be
stored in /usr/local/mysql/lib/mysql and header files  are in /usr/local/mysql/include/mysql
directories. If you are using Redhat, your mileage may differ a little bit. Yours will be probably
in /usr/lib/mysql or something like that. So don't panic if cyrus displays errors about libraries then start
looking for where your libraries are stored.
$cd /usr/local
$wget  -c  ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-2.1.20.tar.gz
$tar zxf  cyrus-sasl-2.1.20.tar.gz
$cd cyrus-sasl-2.1.20
$export CPPFLAGS="-I/usr/local/mysql/include/mysql"
$./configure \
--enable-anon \
--enable-plain \
--enable-login \
--enable-sql \
--disable-krb4 \
--disable-otp \
--disable-cram \
--disable-digest \
--with-mysql=/usr/local/mysql/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 

Dan roept hij dat je libs ergens anders worden geplaatst als waar ze nodig zijn, los dit op met een symlinkje:

ln /usr/local/lib/sasl2 /usr/lib/sasl2

Omdat mijn postfix install later niet helemaal goed ging lijkt het me goed om hier een keertje ldconfig te draaien

ldconfig

Postfix

intro

Nu hebben we SASL zelf geïnstalleerd en gaan we verder met postfix, hiervoor kunnen we de procedure volgen van Installatie Postfix maar met een paar kleine aanpassingen.

Pre-make

Voor we make gaan runnen moesten we dit commando uitvoeren:

make -f Makefile.init makefiles \                         
    'CCARGS=-DHAS_MYSQL -I/usr/include/mysql' \     
    'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm'

Echter om SASL mee te compilen wordt dit het volgende:

make -f Makefile.init makefiles \                         
    'CCARGS=-DHAS_MYSQL -DUSE_SASL_AUTH -I/usr/include/mysql -I/usr/local/include/sasl' \     
    'AUXLIBS=-L/usr/lib/mysql -L/usr/local/lib -lmysqlclient -lz -lm -lsasl2'

Post install

Na de installatie van postfix moeten we voor SASL nog wat extra opties configureren:

Activeer SASL in de server

/etc/postfix/main.cf:

   smtpd_sasl_auth_enable = yes

Ingelogde users mogen relayen op de server

/etc/postfix/main.cf:

   smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated ...