postfix error? warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory

Hi,
after the install of Virtualmin Pro 3.29 (Webmin 1.306) under Debian Linux 3.1 I’ve had the problem that postfix can fetch mails but can’t send mails. In syslog and mail.warn are the following messages:

Nov 20 14:35:08 localhost postfix/smtpd[[15326]]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Nov 20 14:35:08 localhost postfix/smtpd[[15326]]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Nov 20 14:35:08 localhost postfix/smtpd[[15326]]: warning: SASL authentication failure: no secret in database
Nov 20 14:35:08 localhost postfix/smtpd[[15326]]: warning: dslb-082-083-231-008.pools.arcor-ip.net[[82.83.231.8]]: SASL CRAM-MD5 authentication failed

btw.: /etc/sasldb2 is at it’s place.
I’ve tried several configurations with postfix but no one works.

Any idea or help about this? … any advise would be helpful.

gaby

Hey Gaby,

It looks like configuration of saslauthd didn’t happen correctly during installation. You don’t actually want /etc/sasldb2 to be used at all (and the problem isn’t with Postfix).

The solution is to configure saslauthd to not offer unsupported authentication methods. You only want LOGIN and PLAIN to be offered to clients (because those are the only ones that work with PAM or /etc/shadow).

To change this you’d edit the file /etc/postfix/sasl/smtpd.conf

There should be a single mech_list line, like this:

mech_list: plain login

If there isn’t one, add it. If there is one, make sure no other mech types are listed.

After making that change, restart saslauthd:

/etc/init.d/saslauthd restart

Holler if this doesn’t resolve it (and post any new errors, as I’m pretty sure this will at least change the way it fails if it doesn’t actually fix it).

I’ll try to figure out where I messed up in the install scripts and get this fixed in the installation soon.

Hi Joe,

sorry, bit this don’t work. The next error messages are:

Nov 22 06:09:05 localhost postfix/smtpd[[26376]]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Nov 22 06:09:05 localhost postfix/smtpd[[26376]]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Nov 22 06:09:05 localhost postfix/smtpd[[26376]]: warning: SASL authentication failure: Password verification failed
Nov 22 06:09:05 localhost postfix/smtpd[[26376]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL PLAIN authentication failed
Nov 22 06:09:05 localhost postfix/smtpd[[26376]]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Nov 22 06:09:05 localhost last message repeated 3 times

Any other idea?

gaby

Hi Joe,

sorry, bit this don’t work. The next error messages are:

Nov 22 06:09:05 localhost postfix/smtpd[[26376]]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Nov 22 06:09:05 localhost postfix/smtpd[[26376]]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Nov 22 06:09:05 localhost postfix/smtpd[[26376]]: warning: SASL authentication failure: Password verification failed
Nov 22 06:09:05 localhost postfix/smtpd[[26376]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL PLAIN authentication failed
Nov 22 06:09:05 localhost postfix/smtpd[[26376]]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Nov 22 06:09:05 localhost last message repeated 3 times

Any other idea?

gaby

Hey Gaby,

I guess the Debian default configuration of saslauthd is broken in some way for PAM. I’ve just got my new test/build box online and I’m installing a Debian test system, so I’ll see if I can reproduce this problem and spot some cause/solution.

In the meantime, what’s the complete contents of /etc/postfix/sasl/smtpd.conf? Maybe it doesn’t have necessary values by default on Debian. It probably ought to contain:

pwcheck_method: saslauthd
mech_list: plain login

Then there’s the /etc/default/saslauthd file, which I’m not actually sure what it should contain (if not the defaults)…I’ll have to test to figure out what it’s trying to do by default and figure out what needs to change to make it all spin nicely.

Also worth noting: Are you using @ in the usernames? If so, you’ll want to consult with the FAQ here:

http://www.virtualmin.com/faq/one-faq?faq_id=1511#51230

Specifically, the third paragraph, which discusses SMTP auth. The "-r" option is needed on relatively recent versions of saslauthd. I doubt the version in Debian stable counts as "new", but it might.

Hi again,

I’m not using @ in the usernames.

I’ve changed now my /etc/postfix/smtpd.conf to

pwcheck_method: saslauthd
mech_list: plain login

The error messages now are:
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: Password verification failed
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL PLAIN authentication failed
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL LOGIN authentication failed
Nov 22 06:45:31 localhost procmail[[26932]]: Attempt to fake stamp by "itcbiz"

gaby

Hey Gaby,

Believe it or not, this is an improvement! I know, it didn’t work before, and it doesn’t work now, so it seems like it’s the same. But we’re on the right track. :wink:

This looks like Postfix doesn’t know how to find the saslauthd server…which makes me think maybe we need to setup a named pipe or similar, so they can talk. I’m looking into it and will get back to you as soon as I know what to do next.

Oh, wait…Are we sure saslauthd is running? Check the process list ("ps auxc") to be sure.

Hi,

it seems that saslauthd is not running. The only entry is an dovecot-auth. I’ve tried /etc/init.d/saslauthd start several times but nothing happened.

gaby

Hi again,

I’m not using @ in the usernames.

I’ve changed now my /etc/postfix/smtpd.conf to

pwcheck_method: saslauthd
mech_list: plain login

The error messages now are:
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: Password verification failed
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL PLAIN authentication failed
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL LOGIN authentication failed
Nov 22 06:45:31 localhost procmail[[26932]]: Attempt to fake stamp by "itcbiz"

gaby

Hi again,

saslauthd is running now. In the file /etc/default/saslauthd I’ve inserted ‘START’

The error message is now:

Nov 22 07:54:11 localhost postfix/smtpd[[27692]]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 22 07:54:11 localhost postfix/smtpd[[27692]]: warning: SASL authentication failure: Password verification failed
Nov 22 07:54:11 localhost postfix/smtpd[[27692]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL PLAIN authentication failed
Nov 22 07:54:11 localhost postfix/smtpd[[27692]]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 22 07:54:11 localhost postfix/smtpd[[27692]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL LOGIN authentication failed

gaby

Hey Gaby,

Believe it or not, this is an improvement! I know, it didn’t work before, and it doesn’t work now, so it seems like it’s the same. But we’re on the right track. :wink:

This looks like Postfix doesn’t know how to find the saslauthd server…which makes me think maybe we need to setup a named pipe or similar, so they can talk. I’m looking into it and will get back to you as soon as I know what to do next.

Oh, wait…Are we sure saslauthd is running? Check the process list ("ps auxc") to be sure.

Hi Joe,

as I’ve written before saslauthd is running. To get the server running I need Postfix for my customers and in this case time is money :-/

gaby

Hi again,

I’m not using @ in the usernames.

I’ve changed now my /etc/postfix/smtpd.conf to

pwcheck_method: saslauthd
mech_list: plain login

The error messages now are:
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: Password verification failed
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL PLAIN authentication failed
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL LOGIN authentication failed
Nov 22 06:45:31 localhost procmail[[26932]]: Attempt to fake stamp by "itcbiz"

gaby

Hey Gaby,

Believe it or not, this is an improvement! I know, it didn’t work before, and it doesn’t work now, so it seems like it’s the same. But we’re on the right track. :wink:

This looks like Postfix doesn’t know how to find the saslauthd server…which makes me think maybe we need to setup a named pipe or similar, so they can talk. I’m looking into it and will get back to you as soon as I know what to do next.

Oh, wait…Are we sure saslauthd is running? Check the process list ("ps auxc") to be sure.

Hi Joe,

as I’ve written before saslauthd is running. To get the server running I need Postfix for my customers and in this case time is money :-/

gaby

Hey Gaby,

Could I possibly login to have a look at your box? That’s probably the quickest way to resolve this. Send over the IP and auth details to joe@virtualmin.com, and I’ll probably be able to kick it into shape in no time.

Hi again,

I’m not using @ in the usernames.

I’ve changed now my /etc/postfix/smtpd.conf to

pwcheck_method: saslauthd
mech_list: plain login

The error messages now are:
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: Password verification failed
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL PLAIN authentication failed
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Nov 22 06:45:31 localhost postfix/smtpd[[26927]]: warning: dslb-082-083-240-202.pools.arcor-ip.net[[82.83.240.202]]: SASL LOGIN authentication failed
Nov 22 06:45:31 localhost procmail[[26932]]: Attempt to fake stamp by "itcbiz"

gaby

I’m getting the same error. How can i solve this.

Adam

Okay,

I’ve managed to fix this issue on Debian Sarge.

I was getting the following error.
warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory

So I stopped the services and created the directory
/var/spool/postfix/var/run/saslauthd

and created a symlink from /var/run/saslauthd to /var/spool/postfix/var/run/saslauthd

Then i granted permission to the directory to the mail group and made sure that postfix was a member of this group.

It all now seems to work and email is working perfectly :wink:

Adam

I’m having the same exact problem here, I just transfered a big chunk of my customers on this server and my phone is ringing!

There isn’t really a clear solution posted here…

I don’t have any files in /etc/postfix/sasl to begin with,
I tried creating it and adding a single line
mech_list: plain login
restarted postfix, no changes, I still get “warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory”