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 18th May 2007, 19:59
qtx qtx is offline
Junior Member
 
Join Date: Oct 2006
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Unhappy Virtual Users And Domains With Postfix, Courier And MySQL - SASLauthd problem

Hello ever'1

I know, it's a shame and I must be the xth member to post a message here about this issue, but no advice proved to work on my machine.

The setup is a brand new Debian 4.0.
I followed the HOWTO 'Virtual Users And Domains With Postfix, Courier And MySQL - ubuntu'.
During the installation no errors occured, so it cannot be totally screwed.

What is the (my) problem?
It is not possible to send/receive emails via a client (thunderbird in my case).

I can track the following error in:
/var/log/mail.log
Code:
May 18 18:41:39 myserver courierpop3login: Connection, ip=[::ffff:xx.xx.37.7]
May 18 18:41:53 myserver authdaemond: failed to connect to mysql server (server=localhost, userid=mail_admin): Access denied for user 'mail_admin'@'localhost' (using password: YES)
May 18 18:41:53 myserver courierpop3login: LOGIN FAILED, user=info@mydomain.tld, ip=[::ffff:xx.xx.37.7]
May 18 18:41:53 myserver courierpop3login: authentication error: Input/output error
So when trying to pop/send emails from my mailserver it refuses all delivery (no matter what direction). It's not a thunderbird issue, for sure.

I checked my files according to the postings in this forum and the howto (especially the ones that differ from the ubuntu installation) and I cannot find any differences.

So all the saslauthd, mysql etc. conf-files look the same.
The *mail_admin*-user is registered in mysql (login to mysql works just fine).

I was able to send emails via telnet and I also receive emails in /home/vmail/.

Right now I am stuck and do not know, why saslauthd cannot connect to mysql. I know, something must be missing, though!
/var/log/syslog does not tell me anything else.

Any debugging hints are highly appreciated!

Thanks!
Qt
Reply With Quote
Sponsored Links
  #2  
Old 19th May 2007, 16:09
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

What's the output of
Code:
ps aux | grep saslauthd
?
What's in /etc/default/saslauthd?
__________________
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 20th May 2007, 12:17
qtx qtx is offline
Junior Member
 
Join Date: Oct 2006
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Question

Hi Falko

Thanks for helping!

Output of: ps aux | grep saslauthd
Code:
root     18288  0.0  0.1   7216   988 ?        Ss   May18   0:00 /usr/sbin/saslauthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -c -n 5
root     18289  0.0  0.1   7216   540 ?        S    May18   0:00 /usr/sbin/saslauthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -c -n 5
root     18290  0.0  0.0   7216   360 ?        S    May18   0:00 /usr/sbin/saslauthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -c -n 5
root     18291  0.0  0.0   7216   360 ?        S    May18   0:00 /usr/sbin/saslauthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -c -n 5
root     18292  0.0  0.0   7216   360 ?        S    May18   0:00 /usr/sbin/saslauthd -a pam -m /var/spool/postfix/var/run/saslauthd -r -c -n 5
root     29782  0.0  0.1   2848   712 pts/0    R+   11:12   0:00 grep saslauthd
Content of: /etc/default/saslauthd
Code:
# sasldb    -- use the local sasldb database file
# ldap      -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
MECHANISMS="pam"

# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
MECH_OPTIONS=""

# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5

# Other options (default: -c)
# See the saslauthd man page for information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
# Note: See /usr/share/doc/sasl2-bin/README.Debian
#OPTIONS="-c"

OPTIONS="-m /var/spool/postfix/var/run/saslauthd -r -c"
PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
Thanks for any hint on this...
QT
Reply With Quote
  #4  
Old 21st May 2007, 13:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Can you delete the
Code:
PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
line in /etc/default/saslauthd and restart saslauthd?
__________________
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 22nd May 2007, 00:59
jpieper jpieper is offline
Junior Member
 
Join Date: May 2007
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
May 18 18:41:53 myserver authdaemond: failed to connect to mysql server (server=localhost, userid=mail_admin): Access denied for user 'mail_admin'@'localhost' (using password: YES)
It don´t seems like your mysql-user is allowed to access. Do you flushed your user privileges?

Code:
flush privleges;
Or do you entered 127.0.0.1 as Host instead of localhost? I think MySQL differs between 127.0.0.1 and localhost.
Reply With Quote
  #6  
Old 22nd May 2007, 08:07
qtx qtx is offline
Junior Member
 
Join Date: Oct 2006
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Question

Hi

@Falko:
I did remove the PIDFILE line and restarted saslauthd.
No improvement, though.

@jpieper:
Yes, the PRIVILEGES have been flushed (ceveral times since).
Also, I can connect to mysql with the mail_admin-user (see initial post).

About localhost/127.0.0.1:
I followed Falkos howto, so in /etc/mysql/my.cnf there is:
Code:
bind = 127.0.0.1
I tried localhost (then restart everything), but did not help.

Where do you suggest using localhost instead of 127.0.0.1? In which files?

Thank you guys for helping!
QT

BTW.
What works:
Send emails to other domains (via thunderbird).
Receive emails on the host /home/vmail/

What does not work:
Receive emails via using thunderbird.

Errormessage in /var/log/mail.err
Code:
May 22 06:49:25 myhost authdaemond: failed to connect to mysql server (server=localhost, userid=mail_admin): Access denied for user 'mail_admin'@'localhost' (using password: YES)
May 22 06:49:25 myhost courierpop3login: authentication error: Input/output error
Reply With Quote
  #7  
Old 22nd May 2007, 19:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

Quote:
Originally Posted by qtx
What does not work:
Receive emails via using thunderbird.
Ok, receiving mails has nothing to do with saslauthd.
What's in /etc/courier/authmysqlrc? Is the MySQL password correct in that file?
__________________
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
The Following User Says Thank You to falko For This Useful Post:
qtx (22nd May 2007)
  #8  
Old 22nd May 2007, 19:19
qtx qtx is offline
Junior Member
 
Join Date: Oct 2006
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
 
Thumbs up

Quote:
Ok, receiving mails has nothing to do with saslauthd.
Yes, of course
Just wanted to point out, that something is working.

Quote:
What's in /etc/courier/authmysqlrc? Is the MySQL password correct in that file?
Yes, the password was right.

BUT...
I found a (1) space after the password
After starting the services again, I receive emails!
So all is working fine!

Thank you all for leading me to the right spot

QT
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 wmrwl HOWTO-Related Questions 73 7th October 2006 00:06
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs k1piee HOWTO-Related Questions 14 1st October 2006 14:46
Autoreply problem using Virtual Users And Domains With Postfix, Courier And MySQL triak HOWTO-Related Questions 1 19th May 2006 16:25
Problem with Virtual Users And Domains With Postfix, Courier And MySQL Howto fenix Server Operation 4 11th March 2006 03:53
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 18:26.


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