SASL - SMTP Auth - authdaemond - Berkeley db /etc/sasldb2 nightmare

Discussion in 'Server Operation' started by digumo, Nov 24, 2007.

  1. digumo

    digumo New Member

    Hopefully, my title will give Google the keywords to help others who hit the following problem.

    I can't tell you how many times this has happened to me, but I know it does, and hopefully, this will help someone else who hits this issue.

    I was following the instructions to Virtual Users With Postfix, PostfixAdmin, Courier, Mailscanner, ClamAV On CentOS. The author was using CentOS 4.4 and I'm on CentOS 5.

    There is one little issue (that's pretty major if you copy and paste from that tutorial) that will cause some MAJOR headaches and hopefully this will get fixed. It's on this page.

    The problem is a simple two letter swap. The line for editing the about midway down offers the changes and additions you should make to

    This is the problem line

    smtpd_sasl_path                 = smptd
    NOTICE! It reads smptd and not smtpd

    These two characters caused me 2 days of hunting and learning. I've not used postfix before (I'm a prior qmail admin)

    The problem you'll have is that SASL will ALWAYS want to use it's own default sasl2db. You'll eternally get the following line in your mail log until SASL uses the right conf file.

    SASL authentication problem: unable to open Berkeley db /etc/sasldb2
    If you want to know how to troubleshoot this you can edit your

    smtps     inet  n       -       n       -       -       smtpd -v
    Add the -v behind the smtpd line if your client is using TLS or SSL to connect to your server. You can also use the suggested telnet methods mentioned elsewhere around the net.

    Your mail log will give you output and you're looking for the line 'xsasl_cyrus_server_init'

    xsasl_cyrus_server_init: SASL config file is smptd.conf
    There was the problem! 'smptd.conf' is not the file located at the expected location of /usr/lib/sasl2/smtpd.conf

    As soon as I changed smtpd_sasl_path to

    smtpd_sasl_path = smtpd
    Everything worked perfectly.

    Arg, the pain of precision. I guess that's what computers are good at!

    One good thing about the experience is that I've learned more about postfix than I had intended. Especially about debugging postfix courier-authlib sasl2 and pam.;)

Share This Page