FreeBSD + postfix + sasl2 + pam + mysql = Working Authenticated SMTP

Written by: | Posted on:

This is most of all meant as a note-to-self to next time I'll have to do this.

Installed the port mail/courier-authlib with the following options:

WITH_PAM=true

WITHOUT_VPOPMAIL=true

WITH_MYSQL=true

WITHOUT_POSTGRESQL=true

WITHOUT_LDAP=true

WITHOUT_GDBM=true

WITH_AUTHUSERDB=true

Installed Postfix with SASL2 and TLS. Config to Postfix' main.cf:

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain =

broken_sasl_auth_clients = yes

smtpd_sasl_security_options = noanonymous

SASL2 needs "-r -a pam" flags in /usr/local/etc/rc.d/saslauthd.sh and the following in /usr/local/lib/sasl2/smtpd.conf:

pwcheck_method: saslauthd

mech_list: PLAIN LOGIN

Finally, /etc/pam.d/smtp:

column=password crypt=0 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time sqllog=1

auth required pam_mysql.so user=postfix passwd=xxxx host=host.domain.tld db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=0 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time sqllog=1

# account

account required pam_mysql.so user=postfix passwd=xxxx host=host.domain.tld db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=0 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time sqllog=1

# session

session required pam_permit.so

That should really be all there is to it.

FreeBSD 5.3 released

Written by: | Posted on:

Finally! :-)

FreeBSD release engineering process updated

Written by: | Posted on:

[Scott Long][1] announces changes to the release engineering process with a focus shift from features to timelines. Time for me to update the FreeBSD Project Model document again (already have one uncommitted major revision here that I'd planned to commit shortly after 5.3 ;-) )

[1]: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=2259911 0 current/freebsd-current

FreeBSD UFS2 Snapshot Management Environment

Written by: | Posted on:

Ralph S. Engelschall writes on FreeBSD'sUFS2 Snapshot Management Environment. This is really rather cool stuff for a filesystem in a production environment like at work.

FreeBSD 5.3Beta1 & Enlightenment DR16.7.1

Written by: | Posted on:

FreeBSD 5.3-BETA1 is available, happy testing, everyone. Also, the long avaited Enlightenment DR16.7.1 has been released. I don't know how many years ago Enlightenment was my favourite deskmanager. Year 2000 or thereabouts, perhaps. Congratulations! Perhaps I'll give this a spin sometime soon. :)

Image Image

Father, husband, software developer, musician and photographer.


Get to know what I'm up to

© 2020 Niklas Saers Contact Me