Can't get SASL auxprop/sasldb working with postfix/Ubuntu 12.04

The giveaway is here:

-- active services in /etc/postfix/master.cf --
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
smtp      inet  n       -       -       -       -       smtpd
submission inet n       -       -       -       -       smtpd

The smtpd process on the submission port is running in chroot mode (since there is a - in that column which means the default (which is yes) applies and so can't see /etc/sasldb2.

When I copied /etc/sasldb2 to /var/spool/postfix/etc authentication started working fine.


chroot is defnitely the reason, however for my case, copying to /var/spool/postfix/etc did not work.

So I just got rid of chroot and that works for me.

n order to do that you will need to edit /etc/postfix/master.cf locate the following line:

smtp      inet  n       -       -       -       -       smtpd

and modify it as follows:

smtp      inet  n       -       n       -       -       smtpd

Another way to synchronize the sasldb2 file to postfix's default chroot jail is to add a hard link to it:

ln /etc/sasldb2 /var/spool/postfix/etc/

Note that a symlink wont work because symlinks cant be accessed from inside the jail but hard links can. This has the advantage over simply copying the file because future new users and password changes will be automatically synced without even a postfix reload.