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, Courier And MySQL - SASLauthd problem (http://www.howtoforge.com/forums/showthread.php?t=12797)

qtx 18th May 2007 19:59

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!:mad:
/var/log/syslog does not tell me anything else.

Any debugging hints are highly appreciated!

Thanks!
Qt

falko 19th May 2007 16:09

What's the output of
Code:

ps aux | grep saslauthd
?
What's in /etc/default/saslauthd?

qtx 20th May 2007 12:17

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

falko 21st May 2007 13:45

Can you delete the
Code:

PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
line in /etc/default/saslauthd and restart saslauthd?

jpieper 22nd May 2007 00:59

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.

qtx 22nd May 2007 08:07

Hi

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

@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


falko 22nd May 2007 19:00

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?

qtx 22nd May 2007 19:19

Quote:

Ok, receiving mails has nothing to do with saslauthd.
Yes, of course :o
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 :eek:
After starting the services again, I receive emails! :D
So all is working fine!

Thank you all for leading me to the right spot :rolleyes:

QT


All times are GMT +2. The time now is 02:46.

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