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 27th December 2006, 04:28
TWadmin TWadmin is offline
Junior Member
 
Join Date: Dec 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default No delivery and log warnings after postfix/mysql tutorial

I followed "Virtual Users And Domains With Postfix, Courier And MySQL (Fedora Core 5)" at http://www.howtoforge.com/fedora_vir..._quota_courier but it's not working for me. The setup process went well, but I'm receiving errors and warnings in the maillog, and am unable to get a client (OE, in this case) to authenticate with the server.

First in maillog, I get a couple of these:
Dec 26 20:15:38 spider postfix/proxymap[20190]: warning: connect to mysql server 127.0.0.1: Access denied for user 'mail_admin'@'localhost' (using password: YES)
Dec 26 20:15:38 spider postfix/proxymap[20190]: warning: connect to mysql server 127.0.0.1: Access denied for user 'mail_admin'@'localhost' (using password: YES)

But, I can login from the terminal:
[root@spider init.d]# mysql -u mail_admin -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 588 to server version: 5.0.27
blah blah blah

After the first error above, I get many (20 - 30) of these in a row:
Dec 26 20:15:38 spider postfix/trivial-rewrite[21981]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,100): table lookup problem

They all have different PIDs.

Then I get as many, if not more, of these:
Dec 26 20:15:39 spider postfix/smtpd[14094]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Dec 26 20:15:39 spider postfix/smtpd[14094]: warning: problem talking to service rewrite: Connection reset by peer
Dec 26 20:15:39 spider postfix/smtpd[14039]: warning: premature end-of-input on private/rewrite socket while reading input attribute name
Dec 26 20:15:39 spider postfix/smtpd[14039]: warning: problem talking to service rewrite: Success

Then the cycle starts over. I don't know where it begins and ends, but I assumed the mail_admin connection problem would have to be near the top of the problem list.

I only have one user/domain in the table for testing but it seems I am unable to authenticate. On a send/receive (again, in OE), I'm presented with a password box that's never accepted. Maillog has one entry each time:
Dec 26 20:25:12 spider dovecot: pop3-login: Disconnected: user=<myuser@mydomain.com>, method=PLAIN, rip=::ffff:66.76.117.24, lip=::ffff:66.76.117.26, TLS
(myuser@mydomain.com is, of course, listed appropriately in the actual entry.)

If I cancel the password prompt, client reports a rejected password. I've adjusted it a couple of times via phpmyadmin, but to no avail.

Any ideas where I might have gone astray?
Reply With Quote
Sponsored Links
  #2  
Old 27th December 2006, 07:11
TWadmin TWadmin is offline
Junior Member
 
Join Date: Dec 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Dummy!

I'm a dumb-head. 2 problems solved.

First, and the cause of most of the errors, I stupidly left the password in the six custom /etc/postfix/mysql-* files as mail_admin_password. That will break some things, no?

Second, note the last errors above: pop instead of imap. Changed that in the client. Now, as mentioned previously, I'm testing with Outlook Express (which is what most of the clients will be). It's attempting to download folders but I'm still getting an authentication error when that happens. Is something broken, or is this to be expected? Pardon the stupidity, but I'm unfamiliar with imap.
Reply With Quote
  #3  
Old 27th December 2006, 08:21
TWadmin TWadmin is offline
Junior Member
 
Join Date: Dec 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I changed the client back to pop rather than imap and have experimented some more. I'm still getting password rejected errors on the pop side (haven't tried smtp).

I've tried both regular and ssl connections and have received the same rejected password message. I've also used telnet to connect as myuser@mydom.ain and attempted to enter tha pass that way, but it is still rejected.

I had thought that maybe the password was being corrupted when changing it via phpmyadmin since the interface never seems to successfully complete the update, so I made the change manually in the db with an UPDATE statement. The password is still rejected.

Anyone have a shove in he right direction?

Last edited by TWadmin; 27th December 2006 at 16:00.
Reply With Quote
  #4  
Old 27th December 2006, 13:24
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,651 Times in 4,461 Posts
Default

Please enable logging in the mysql my.cnf configuration file by removing the comment in front of the following line:

log = /var/log/mysql/mysql.log

Then restart mysql. All mysql queries from the authentication process where now logged into the file /var/log/mysql/mysql.log
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 27th December 2006, 15:59
TWadmin TWadmin is offline
Junior Member
 
Join Date: Dec 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the response.

It'll be a few hours before I can swap hard drives to do this, but I'll give it a shot and report back with results.
Reply With Quote
  #6  
Old 27th December 2006, 20:24
TWadmin TWadmin is offline
Junior Member
 
Join Date: Dec 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok. That line wasn't in my.cnf so I added it instead of uncommenting. I placed it under the [mysqld] heading.

I should add that I originally set this box up following the perfect setup for fc5 with the option of ISPconfig, but later removed ISPconfig. Don't know if that's why my config file is different than expected.

With the logging line added, I had to add a mysql directory under /var/log. There is a mysqld.log file in /var/log, but it has very little information. It is referenced in my.cnf under the [mysqld_safe] heading in the line log-error=/var/log/mysqld.log.

Now, attempting to telnet again, this is what happens:
Code:
[root@spider ~]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK Dovecot ready.
user myuser@mydom.ain
+OK
pass mypassinplaintext
-ERR Authentication failed.
quit
+OK Logging out
Connection closed by foreign host.
The log shows no attempt at connection, from what I can see:
Code:
[root@spider ~]# cat /var/log/mysql/mysql.log |grep mydom.ain
[root@spider ~]# cat /var/log/mysql/mysql.log |grep myuser
There are other select queries in the log as other servers are trying to reach my real (working) server, so that part is working, at least.

What have I broken?
Reply With Quote
  #7  
Old 27th December 2006, 22:34
TWadmin TWadmin is offline
Junior Member
 
Join Date: Dec 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

More possible useful information.

Postfix does receive mail for the test user in the table. There is a mydom.ain directory under /home/vmail containing more subdirectories, one of which looks like it's holding two messages which I'm guessing are the two test messages I sent from an external account. So, it seems like the inbound part works.

Am I correct, then, in isolating my troubleshooting to the authentication?
Reply With Quote
  #8  
Old 27th December 2006, 23:24
TWadmin TWadmin is offline
Junior Member
 
Join Date: Dec 2006
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

For those keeping score, the respectable side of me is losing to the stupid side by a huge margin.

It was bloody Dovecot! I don't know why I didn't notice that earlier. The tutorial covers Courier, but Dovecot was installed when following the "perfect setup" that I mentioned earlier. The service was still running and was jumping into the mix before courier. Once I stopp the Dovecot service, I had to start Courier and the thing worked as it should ha all along.

Ever have one of those weeks where you can't help but screw up everything and look like a complete idiot?


Now, I'm going to try to set up Courier to only use SSL, so maybe I'll be back after I break that, too.


Thanks for the how-to. It was easy to follow, but perhaps too easy as I didn't use my brain while following it.
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


All times are GMT +2. The time now is 04:39.


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