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 5th July 2007, 23:17
oberinspector oberinspector is offline
Junior Member
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch)

I followed the mentioned howto... i can receive pop email with thunderbird, but when i try to send an email it fails...

in mail.log:

Code:
Jul  5 22:44:11 empego postfix/smtpd[5575]: warning: SASL authentication failure: Password verification failed
Jul  5 22:44:11 empego postfix/smtpd[5575]: warning: p548AC7D5.dip.t-dialin.net[84.138.199.213]: SASL PLAIN authentication failed: authentication failure
Jul  5 22:44:12 empego postfix/smtpd[5575]: warning: p548AC7D5.dip.t-dialin.net[84.138.199.213]: SASL LOGIN authentication failed: authentication failure
in auth.log:

Code:
Jul  5 22:44:12 empego saslauthd[5568]: pam_mysql - required option "db" is not set
Jul  5 22:44:12 empego saslauthd[5568]: DEBUG: auth_pam: pam_authenticate failed: Error in service module
Jul  5 22:44:12 empego saslauthd[5568]: do_auth         : auth failure: [user=xxx@yyy.zzz] [service=smtp] [realm=yyy.zzz] [mech=pam] [reason=PAM auth error]
looks like /etc/pam.d/smtp (a symlink to /etc/pam.d/imap) is not read...
/etc/pam.d/smtp:
Code:
auth    required   pam_mysql.so user=mail_admin passwd=secret host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1 verbose=1
account sufficient pam_mysql.so user=mail_admin passwd=secret host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1 verbose=1
Code:
/etc/potix/sasl/smtp.conf:
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: secret
sql_database: mail
sql_select: SELECT password FROM users where email = '%u'
Code:
empego:/etc# ps aux | grep saslauthd
root      5566  0.0  0.1  30308  1152 ?        Ss   22:43   0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      5567  0.0  0.1  30308  1468 ?        S    22:43   0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      5568  0.0  0.1  30308  1468 ?        S    22:43   0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      5569  0.0  0.0  30308   672 ?        S    22:43   0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
root      5574  0.0  0.0  30308   484 ?        S    22:43   0:00 /usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5

i read some threads and tried a lot, but nothing helped... any idea what i can do!?

Last edited by oberinspector; 10th July 2007 at 10:16.
Reply With Quote
Sponsored Links
  #2  
Old 6th July 2007, 18:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What's the output of
Code:
ls -l /etc/pam.d
? What's in /etc/pam.conf?
__________________
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 8th July 2007, 22:16
oberinspector oberinspector is offline
Junior Member
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

Output of ls -l /etc/pam.d:

Code:
empego:~# ls -l /etc/pam.d
total 96
-rw-r--r-- 1 root root  182 2006-03-18 20:13 atd
-rw-r--r-- 1 root root  384 2006-10-22 08:38 chfn
-rw-r--r-- 1 root root  581 2006-10-22 08:38 chsh
-rw-r--r-- 1 root root  392 2006-07-04 21:05 common-account
-rw-r--r-- 1 root root  436 2006-07-04 21:05 common-auth
-rw-r--r-- 1 root root 1097 2006-07-04 21:05 common-password
-rw-r--r-- 1 root root  372 2006-07-04 21:05 common-session
-rw-r--r-- 1 root root  289 2006-10-13 01:01 cron
-rw-r--r-- 1 root root   81 2006-12-18 18:38 dovecot
-rw-r--r-- 1 root root  148 2006-06-11 19:46 esmtp
-rw------- 1 root root  323 2007-07-05 19:36 imap
-rw-r--r-- 1 root root  486 2007-02-13 09:39 imap.dpkg-dist
-rw-r--r-- 1 root root  486 2007-02-13 09:39 lmtp
-rw-r--r-- 1 root root 2843 2006-10-22 08:38 login
-rw-r--r-- 1 root root  520 2006-07-04 21:05 other
-rw-r--r-- 1 root root   92 2006-07-04 21:05 passwd
lrwxrwxrwx 1 root root   15 2007-03-18 16:20 pop -> /etc/pam.d/imap
-rw-r--r-- 1 root root  148 2006-05-31 17:37 pop3
-rw-r--r-- 1 root root  485 2007-02-13 09:39 pop.dpkg-new
-rw-r--r-- 1 root root  168 2006-07-04 21:05 ppp
-rw-r--r-- 1 root root  370 2006-07-04 21:05 proftpd
lrwxrwxrwx 1 root root   15 2007-03-18 16:20 sieve -> /etc/pam.d/imap
-rw-r--r-- 1 root root  498 2007-02-13 09:39 sieve.dpkg-new
lrwxrwxrwx 1 root root   15 2007-03-18 16:20 smtp -> /etc/pam.d/imap
-rw-r--r-- 1 root root 1272 2006-11-15 02:53 ssh
-rw-r--r-- 1 root root 2305 2006-07-14 14:24 su
-rw-r--r-- 1 root root  113 2006-05-31 17:37 webmail
content of: /etc/pam.conf:
Code:
empego:~# cat /etc/pam.conf
# ---------------------------------------------------------------------------#
# /etc/pam.conf                                                              #
# ---------------------------------------------------------------------------#
#
# NOTE
# ----
#
# NOTE: Most program use a file under the /etc/pam.d/ directory to setup their
# PAM service modules. This file is used only if that directory does not exist.
# ---------------------------------------------------------------------------#

# Format:
# serv. module     ctrl       module [path]     ...[args..]                  #
# name  type       flag                                                      #
Thanks in advance for your help!!!

/thomas
Reply With Quote
  #4  
Old 9th July 2007, 17:14
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Can you try
Code:
chmod 644 /etc/pam.d/imap
?
__________________
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
  #5  
Old 10th July 2007, 09:48
oberinspector oberinspector is offline
Junior Member
 
Join Date: Jul 2007
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default

ok... the problem is solved...

my stupid error was to use a '#' character in my mail_admin password, which works fine for the receiving part... but in /etc/pam.d/smtp:

Code:
auth    required   pam_mysql.so user=mail_admin passwd=my#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=my#password host=127.0.0.1 db=mail table=users usercolumn=email passwdcolumn=password crypt=1
everything behind the '#' was ignored...

again... thank you for your help!

regards,
thomas

Last edited by oberinspector; 10th July 2007 at 12:17.
Reply With Quote
The Following User Says Thank You to oberinspector For This Useful Post:
Jaac (26th January 2011)
  #6  
Old 26th January 2011, 11:54
Jaac Jaac is offline
Junior Member
 
Join Date: Nov 2007
Location: Netherlands
Posts: 8
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via MSN to Jaac
Default

I'm glad you posted the solution, because i'm having likewise problems and a am too using a password containing the number sign #
My mail.log and auth.log entries have the same errors as yours, and am about to fix it by changing the password in all the files and database.

I'm wondering though, would having the password wrapped in single quotes negate the special characters like in most programming language's?

p.s. Sorry to bring up an old thread, but it is relevant to my problem.
My install of the mail server with postfix dates from half a year back, and WAS running perfect, but i lately changed the password and then the problems started.

Last edited by Jaac; 26th January 2011 at 11:56.
Reply With Quote
  #7  
Old 20th February 2011, 03:09
adig adig is offline
Junior Member
 
Join Date: Feb 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default #

OMG ) ,

i can't believe i've spent more than an hour @3AM troubleshooting this setup, only to find out that i used a # sign in the password.

This forum is great!
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 05:02
Virtual Users And Domains With Postfix, Courier And MySQL & debian etch Tortanick HOWTO-Related Questions 5 19th June 2007 12:29
Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch) MisterVlad Server Operation 8 15th June 2007 18:29
Virtual Users And Domains With Postfix, Courier And MySQL - "apt-get" and Courier burritonator HOWTO-Related Questions 3 15th March 2006 20:11
Problem with Virtual Users And Domains With Postfix, Courier And MySQL Howto fenix Server Operation 4 11th March 2006 02:53


All times are GMT +2. The time now is 08:56.


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