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 15th September 2006, 00:42
nsurge nsurge is offline
Junior Member
 
Join Date: Sep 2006
Posts: 20
Thanks: 0
Thanked 2 Times in 1 Post
Exclamation FC5 - Virtual Users Howto- SASL LOGIN Auth Failed

Hi,
I've followed the FC5 howto:
http://www.howtoforge.com/fedora_vir..._quota_courier

After a clean install, I've gotten Courier to work and check against mysql. The box will take in mail, and I can pop it sucessfully no problems, SSL or not.

SMTP Auth however will not work. It appears to be a problem with the query to mysql, as the error message I'm getting from Outlook is "...bad username/password supplied..." The errors in the log are below:

Sep 14 18:23:32 testpop postfix/smtpd[14120]: connect from unknown[192.168.0.56]
Sep 14 18:23:34 testpop postfix/smtpd[14120]: warning: unknown[192.168.0.56]: SASL LOGIN authentication failed
Sep 14 18:23:34 testpop postfix/smtpd[14120]: lost connection after AUTH from unknown[192.168.0.56]
Sep 14 18:23:34 testpop postfix/smtpd[14120]: disconnect from unknown[192.168.0.56]

I believe the mechanism is working correctly, but it's just not retrieveing the right data. I apologize in advance, but this is my first time dabbling into MySql and this kind of authentication. Since this is about my 6th different attempt to get SMTP Auth to work, I want to believe it's just a myth...

Is there anyway to turn on extra level of debugging to see exactly what is going on and where it's failing? Anybody had a similar problem?

Thanks,
Nathan


Here is my main.cf config info:

virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
Reply With Quote
Sponsored Links
  #2  
Old 15th September 2006, 20:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: LŁneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

Quote:
Originally Posted by nsurge
SMTP Auth however will not work. It appears to be a problem with the query to mysql, as the error message I'm getting from Outlook is "...bad username/password supplied..." The errors in the log are below:
Did you use the correct username and password? The username is the email address.
Also make sure the conffiguration files look exactly as shown in the tutorial. The format is important.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 19th September 2006, 19:35
nsurge nsurge is offline
Junior Member
 
Join Date: Sep 2006
Posts: 20
Thanks: 0
Thanked 2 Times in 1 Post
Default Try # 3...

My test box was taken from me, but I have another beefier machine to test with now, so I'm going to reload once again. I'll re-do all the configs from scratch and see if maybe I miss-typed something or made a slight error on the postfix stuff.

Nathan
Reply With Quote
  #4  
Old 21st September 2006, 21:23
nsurge nsurge is offline
Junior Member
 
Join Date: Sep 2006
Posts: 20
Thanks: 0
Thanked 2 Times in 1 Post
Default

Quote:
Originally Posted by falko
Did you use the correct username and password? The username is the email address.
Also make sure the conffiguration files look exactly as shown in the tutorial. The format is important.

I've rebuilt a new machine, FC5 x86_64:
I had some issues with courier and the authmysqlrc script. I kept getting an Input/Output error. I finally figured out that it was from the "MYSQL_LOGIN_FIELD" settings. So I left it as:

MYSQL_HOME_FIELD maildir
MYSQL_MAILDIR_FIELD maildir

I then created another field under the users table called "maildir" and hard coded each userís home directory in, ie: "/home/vmail/mytestdomain/user/". This did the trick and Iím able to pop no problems with and without SSL.

I can deliver mail just like I could with my previous instal via postfix, it accepts the mail, creates the directories, etc. However, SMTP Auth still doesn't work. I get the EXACT same error messages as I did before. (see below)

Sep 21 15:19:51 testpop postfix/smtpd[24643]: connect from unknown[192.168.0.56]
Sep 21 15:19:53 testpop postfix/smtpd[24643]: warning: unknown[192.168.0.56]: SASL LOGIN authentication failed
Sep 21 15:19:53 testpop postfix/smtpd[24643]: lost connection after AUTH from unknown[192.168.0.56]
Sep 21 15:19:53 testpop postfix/smtpd[24643]: disconnect from unknown[192.168.0.56]

I havenít installed any of the amavis/spamass/clam stuff. I already have proxy servers with these applications filtering our incoming mail. I have recreated all the mysql cf files in postfix and double checked them in the main.cf.

Anybody have any suggestions as to what might be wrong with the sasl?

Thanks,
Nathan
Reply With Quote
  #5  
Old 21st September 2006, 21:39
nsurge nsurge is offline
Junior Member
 
Join Date: Sep 2006
Posts: 20
Thanks: 0
Thanked 2 Times in 1 Post
Default Oh yea...

Quote:
Originally Posted by falko
Did you use the correct username and password? The username is the email address.
Also make sure the conffiguration files look exactly as shown in the tutorial. The format is important.
I am also using the correct username and password being: "username@domain.com" and password : "xxxx".

I have smtp auth turned on and set to use same settings and incoming mail server.
Reply With Quote
  #6  
Old 21st September 2006, 22:28
nsurge nsurge is offline
Junior Member
 
Join Date: Sep 2006
Posts: 20
Thanks: 0
Thanked 2 Times in 1 Post
Unhappy Found this

I took a glance in the secure log and found this:

Sep 21 16:26:10 testpop saslauthd[24219]: pam_unix(smtp:auth): check pass; user unknown
Sep 21 16:26:10 testpop saslauthd[24219]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Sep 21 16:26:10 testpop saslauthd[24219]: pam_succeed_if(smtp:auth): error retrieving information about user nathan

the user account i'm testing is actually (nathan@xxx.xxx). It appears that no information is being passed to saslauthd at all!?

Should I have installed the pam-mysql module? I thought the authentication was being handled by courier-authlib, not saslauthd... !

Thanks again,
Nathan
Reply With Quote
  #7  
Old 22nd September 2006, 03:39
nsurge nsurge is offline
Junior Member
 
Join Date: Sep 2006
Posts: 20
Thanks: 0
Thanked 2 Times in 1 Post
 
Smile OMG! SMTP AUTH Solved! (for 64 bit fc5 users)

I could HANG myself for this.............

I found out what the problem is!!

I had placed the smtpd.conf file into "/usr/lib/sasl2/"...

I neglected to realize i'm running x86_64, there for the smtpd.conf was suppose to go into "/usr/lib64/sasl2/".

Soon as I dropped the proper conf file in and restared all services, I was off and running! I only beat my head against the wall a few times, but figured it out!

thanks for the EXCELLENT howtos falko!

Hope this helps someone,
Nathan
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
Systemimager (rsync) doesn't copy all comedit HOWTO-Related Questions 11 19th January 2007 17:17
SASL auth failed gili Installation/Configuration 2 5th April 2006 16:13
How to install BFD (Brute Force Detection) domino Tips/Tricks/Mods 9 31st March 2006 22:40
SASL LOGIN authentication failed atjohnson3 Installation/Configuration 3 27th December 2005 17:52
Total Frustration-HELP palkat Installation/Configuration 17 3rd September 2005 17:28


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


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