Deleting entry: pedro/2007/01/18/1

Password:

Please confirm the deletion of this entry.


[Trackback URL for this entry] here's one for posterity:

I use postfix with smtp auth for users who use outside clients but still use my smtp server to send out (which is considered relaying).

The standard Debian/Ubuntu way seems to be to use sasl2 along with postfix. But the saslpasswd2 man pages are pretty cryptic -- do I need a "realm"? What about an "appname"? How come no matter what I do, nothing seems to work? There are two answers -- one, saslpasswd2 requires the bare minimum from you, and two, remember that postfix is running in a chroot jail.

1. To add users, just do saslpasswd2 -c username@domain.com and enter the password twice on the interactive prompt. The changes are stored in /etc/sasldb2.

2. The non-obvious catch is that Debian/Ubuntu run postfix in a chroot by default -- so after you add or remove users, you have to remember to copy the /etc/sasldb2 file into the chroot, like this:

cp -a /etc/sasldb2 /var/spool/postfix/etc/

... then it should work!

I have to do this so rarely that every time it comes up, I have long since forgotten and it takes me an hour to figure this out... so perhaps this can be a contribution to posterity -- mine and hopefully yours.

Filed under:



[Main]

Unless otherwise noted, all content licensed by Peter A. H. Peterson
under a Creative Commons License.