I've had loads of things I want to blog about recently but I've been busy at work and in the evenings at home so I've had no time to write about anything that's been on my mind. After the weekend I'll have to make time.
However, I've just spent ages upgrading all the software on the servers I admin at work. My biggest problem has been with postfix and authenticating users. The information I found on Google was pretty useless so I thought I'd add my way of fixing it to the Google index for the error message.
If you're using sasldb2 to authenticate users on your postfix server and are getting the following error, you might want to read the way I fix it.
postfix/smtpd[29658]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
postfix/smtpd[29658]: warning: SASL authentication failure: Password verification failed
postfix/smtpd[29658]: warning: localhost[127.0.0.1]: SASL LOGIN authentication failed
The reason that it can't find /etc/sasldb2 even though you've created it (hopefully) using saslpasswd2 is that saslauthd chroots (by default) to /var/spool/postfix for security. Thus, despite the authentication daemon thinking it's checking /etc/sasldb2 and this is where the saslpasswd2 creates the database, it's not there. Simply copy /etc/sasldb2 to /var/spool/postfix/etc/sasldb2 and the problem will be fixed.
And I'll be shocked if there are ever any on-topic comments to this post! :)
I have a nose-bleed.
by James at 01:44 on 29th Oct 2005
I have a cold. :(
by Woody at 12:43 on 30th Oct 2005
It makes perfect sense...taxi.
by James at 02:02 on 31st Oct 2005
Yay! My cold's gone! \o/
by Dylan at 20:36 on 20th Nov 2005
Google led me here so your evil plan worked. Now I too have working SASL logins.
Yer my hero. w00t!
by it_redneck at 18:40 on 21st Nov 2005
oh the path that google can lead us down.
thanks for the sasldb2 tip.
do you think one can just create a symbolic link ?
by Matt at 12:09 on 28th Nov 2005
A symlink would probably work, yes. I was a little frustrated when I was trying to fix it so as soon as I hacked around and got it working, I just stopped. :-)
by Josh at 04:26 on 02nd Mar 2007
I've spent literally 1 hour trying 50 different things. You just saved my life. I owe you a chicken.
by trix at 20:04 on 15th Jul 2007
It did not work for me :-(
I am using Fedora 7 now.
I did solve the problem, but I think it is not the best way to do it, so I was looking for other solutions when I got to your page.
My solution is to add the user postfix to the security of /etc/sasldb2 and give it read permission. This one works for me.
by Ryanclaw at 14:05 on 14th Jan 2008
Hello I got the same problem but after reading some online docs i got this one and after successful work your page is on the other tab. your solutions is great.
by Robert at 05:21 on 04th Mar 2008
Note that you can also specify where saslpasswd2 creates its database:
$ saslpasswd2 -f /var/spool/postfix/etc/sasldb2 -u blah.com username
by boudiou at 21:18 on 10th May 2008
I found this page by googling the postfix error message.
Hopefully you will save me some debugging :)
Thanks dude !!!
by Dimitry at 05:48 on 09th Dec 2008
Old thread I know, but may help someone. You may also get permission denied errors, in which case do:
chown root:sasl /var/spool/postfix/etc/sasldb2
(use appropriate user/group)
by f00ked at 07:30 on 18th Feb 2009
nice - experienced much pain - sasl is evil and must be punished. mysql to do yet, but http://www.greens.org/~cls/linux/howtos/smtp-auth-saslauthd.html helped do a basic setup
by different Matt at 06:59 on 20th Feb 2009
he said it was being rooted (isolated) to the longer path above
by Kresho at 11:15 on 23rd Feb 2009
I tried with a symlink first, but it did not work - it complained about too many levels of symlinks. So I copied the file, but I also had to change ownershop of the file from root.root to postfix.postfix. I use ubuntu hardy.
by Rexlutty at 07:52 on 05th May 2009
ehh... informative
by Ulrich at 20:47 on 01st Jun 2009
Thanks man.