HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Virtual Users And Domains With Postfix (Ubuntu 6.10 Edgy Eft) - SASL errors (http://www.howtoforge.com/forums/showthread.php?t=12608)

zram21 10th May 2007 02:24

Virtual Users And Domains With Postfix (Ubuntu 6.10 Edgy Eft) - SASL errors
 
I am having what appears to be the same problem as several other people with this setup. I haven't seen anyone find the answer yet though. I am able to receive e-mail with no problem, but I am getting some SASL authentication errors when I try to send e-mail out. The follwing is in the mail.log file when I try to send e-mail:

Code:

May  9 19:08:35 mail postfix/smtpd[10029]: connect from host[192.168.1.12]
May  9 19:08:36 mail postfix/smtpd[10029]: warning: host[192.168.1.12]: SASL LOGIN authentication failed: authentication failure
May  9 19:08:36 mail postfix/smtpd[10029]: lost connection after AUTH from host[192.168.1.12]
May  9 19:08:36 mail postfix/smtpd[10029]: disconnect from host[192.168.1.12]

I also see this in the auth.log:

Code:

May  9 19:08:36 mail saslauthd[9928]: pam_mysql - SELECT returned no result.
May  9 19:08:36 mail saslauthd[9928]: DEBUG: auth_pam: pam_authenticate failed: User not known to the underlying authentication module
May  9 19:08:36 mail saslauthd[9928]: do_auth        : auth failure: [user=test] [service=smtp] [realm=thewhiterabbit.org] [mech=pam] [reason=PAM auth error]

So it seems that saslauthd can't pull the needed info from the mysql database. Here are the contents of my pertinent config files:

/etc/default/saslauthd:
Code:

#
# Settings for saslauthd daemon
#

# Should saslauthd run automatically on startup? (default: no)
START=yes

PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"
PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"

MECHANISMS="pam"
MECH_OPTIONS=""
THREADS=5
OPTIONS="-c"

/etc/pam.d/smtp:
Code:

auth    required  pam_mysql.so user=mail_admin passwd=<password> host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
account sufficient pam_mysql.so user=mail_admin passwd=<password> host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1

/etc/postfix/sasl/smtpd.conf:
Code:

pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: mysql
sql_hostnames: 127.0.0.1
sql_user: mail_admin
sql_passwd: <password>
sql_database: mail
sql_select: select password from users where email = '%u'

SASL portions of /etc/postfix/main.cf:
Code:

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

I am at a real loss here. All of the configs appear to be correct. Obviously the database itself works since the checking mail works fine. I did spot check things with PhpMyAdmin though and everything looks correct. Any thoughts on what could be wrong here?

Thanks.

zram21 10th May 2007 08:25

I have resolved the issue. It looks like several people were having this same problem so hopefully this helps someone else.

The tutorial says to put the line:

PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"

in the /etc/default/saslauthd file. However I looked at The Perfect Setup tutorial for Debian 4.0 and it suggests not adding that line, but rather modifying the Options line in the file like so:

OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"

I made that change, restarted postfix and saslauthd and sasl authentication is working perfectly now.


All times are GMT +2. The time now is 20:01.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.