Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 10th May 2007, 03:24
zram21 zram21 is offline
Junior Member
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
Sponsored Links
  #2  
Old 10th May 2007, 09:25
zram21 zram21 is offline
Junior Member
 
Join Date: May 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier And MySQL Secondary MX acoghlan HOWTO-Related Questions 1 8th March 2008 06:02
Virtual Users And Domains With Postfix - SASL LOGIN authentication failed lord0815 HOWTO-Related Questions 3 31st October 2006 18:43
Virtual Users And Domains With Postfix, Courier And MySQL [+ procmail ?] immobilia HOWTO-Related Questions 5 30th June 2006 00:20
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs mholownych HOWTO-Related Questions 10 29th May 2006 04:39
Another Problem: Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP bluegrass Installation/Configuration 24 8th March 2006 02:41


All times are GMT +2. The time now is 10:25.


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