[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Postfix and SASL



I figured it out. The /etc/init.d/saslauthd script had a typo in it. I specified PARAMS="-m /var/spool/postfix/var/run/saslauthd" at the top and down below it read

# Add our mechanimsms with the necessary flag
PARAMS="${pARAMS} -a ${MECHANISMS}"

All that grief from a little lowercase p. I don't remember changing the file down there either. Sure not sure why it didn't work when I tried to start up saslauthd from the command line with -m /var/spool/postfix/var/run/saslauthd. It was probably a permissions issue.

Anyway, this website helped me out quite a bit in the process.

http://www.fatofthelan.com/articles/articles.php?pid=22


Derrick 'dman' Hudson wrote:

On Wed, Apr 28, 2004 at 08:33:02AM -0700, Matt Krause wrote:
| I am trying to get SASL working with Postfix so I can authenticate SMTP | users. Having some problems. The testsaslauthd app runs fine and | returns a success, but when I telnet and try to authenticate as below, | it fails. Any ideas? Thanks.
[...]

| mkrauselin# cat /etc/postfix/sasl/smtpd.conf
| saslauthd_path:/var/run/saslauthd/mux
[...]

| mkrauselin# ps -axf
| /usr/sbin/saslauthd -m /var/run/saslauthd -a pam
[...]

| /var/log/mail.log reads
| | Apr 28 08:29:58 MKRAUSELIN postfix/smtpd[9935]: warning: SASL | authentication failure: cannot connect to saslauthd server: No such file | or directory

The postfix smtpd binary (with libsasl linked in) can't find the named
pipe through which it asks saslauthd if the credentials are valid.

Basically smtpd is chrooted, so the '/' in
saslauthd_path:/var/run/saslauthd/mux really means /var/spool/postfix.

You have two solutions, depending on what you want :

Solution A :
    Change the line
        smtp      inet  n       -       -       -       -       smtpd
    to
        smtp      inet  n       -       n       -       -       smtpd
    in /etc/postfix/master.cf.  (don't run smtpd chrooted)

Solution B :
    Add the lines
        # put the pipe in postfix' chroot directory
        PARAMS="-O /etc/saslauthd.conf -m /var/spool/postfix/var/run/saslauthd"
    to /etc/default/saslauthd.
    (you might also need to create that directory)

-D




Reply to: