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 12th March 2012, 19:18
mattgrannary mattgrannary is offline
Junior Member
 
Join Date: Mar 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default postfix trying to use root to log onto mysql

I've been trying to set up a mail server on a rackspace CentOS 6 cloud server for the past couple days. I've followed your tutorial to a tee with the exception that I didn't compile a new postfix with quota as I don't need a quota system.

Everything seemed to install perfectly, I did have to install some extra packages that weren't listed. But everything seemed to go well.

The issue I'm having is that I'm not able to send any mail (I haven't even tried receiving yet..). After looking at the maillog I can see that postfix gives me the error:

postfix/cleanup[31896]: warning: connect to mysql server 127.0.0.1: Access denied for user 'root'@'localhost' (using password: YES)

So, I'm guessing that postfix isn't using the .cf files I created with the proper user and password. I've triple checked all the files. The permissions are set properly, the vmail user is correct, mysql lets me log in with the mailadmin user and password, the aliases are set as you've listed, I can telnet to the smtp post and the pop3 port...

Any ideas?
Reply With Quote
Sponsored Links
  #2  
Old 13th March 2012, 17:01
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Are you sure you use the correct username in your mysql*.cf files?
__________________
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 13th March 2012, 21:35
mattgrannary mattgrannary is offline
Junior Member
 
Join Date: Mar 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes.

I've created a user called mailadmin and granted the proper privileges to the mail database. Just did a full check on the users privileges and logged in as that user and performed some basic SELECT queries and was successful.
Reply With Quote
  #4  
Old 14th March 2012, 19:34
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

The MySQL errors that you get in your mail log - are these current errors or old ones?
__________________
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 14th March 2012, 21:52
mattgrannary mattgrannary is offline
Junior Member
 
Join Date: Mar 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

These are new ones. I've emptied the file and started fresh. The error is reported after I initiate a call to mailx. The log then is appended with these errors:

Code:
Mar 14 20:50:21 mgcloud postfix/pickup[24159]: 320547EA2C: uid=0 from=<root>
Mar 14 20:50:21 mgcloud postfix/cleanup[24333]: 320547EA2C: message-id=<20120314205021.320547EA2C@stumblecloud.stumbleabroad.com>
Mar 14 20:50:21 mgcloud postfix/qmgr[24160]: 320547EA2C: from=<root@stumbleabroad.com>, size=465, nrcpt=1 (queue active)
Mar 14 20:50:22 mgcloud postfix/smtpd[24166]: 0ED037E9A3: client=unknown[127.0.0.1]
Mar 14 20:50:22 mgcloud postfix/cleanup[24333]: warning: connect to mysql server 127.0.0.1: Access denied for user 'root'@'localhost' (using password: YES)
Mar 14 20:50:22 mgcloud postfix/cleanup[24333]: warning: 0ED037E9A3: virtual_alias_maps map lookup problem for matty@ignitedcreations.com
Mar 14 20:50:22 mgcloud amavis[22713]: (22713-02) Negative SMTP response to data-dot (<matty@ignitedcreations.com>): 451 4.3.0 Error: queue file write error
Mar 14 20:50:22 mgcloud amavis[22713]: (22713-02) (!)FWD via SMTP: <root@stumbleabroad.com> -> <matty@ignitedcreations.com>,BODY=7BIT 451 4.3.0 TempFailed, id=22713-02, from MTA([127.0.0.1]:10025): 451 4.3.0 Error: queue file write error
Mar 14 20:50:22 mgcloud postfix/cleanup[24333]: warning: 109FF7E9A3: virtual_alias_maps map lookup problem for postmaster@stumbleabroad.com
Mar 14 20:50:22 mgcloud postfix/smtpd[24166]: disconnect from unknown[127.0.0.1]
Mar 14 20:50:22 mgcloud amavis[22713]: (22713-02) Blocked MTA-BLOCKED, <root@stumbleabroad.com> -> <matty@ignitedcreations.com>, Message-ID: <20120314205021.320547EA2C@stumblecloud.stumbleabroad.com>, mail_id: h1+zXapomosw, Hits: -0.001, size: 465, 841 ms
Mar 14 20:50:22 mgcloud postfix/smtp[24335]: 320547EA2C: to=<matty@ignitedcreations.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.89, delays=0.04/0.01/0/0.84, dsn=4.3.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.3.0 TempFailed, id=22713-02, from MTA([127.0.0.1]:10025): 451 4.3.0 Error: queue file write error (in reply to end of DATA command))
Reply With Quote
  #6  
Old 15th March 2012, 18:48
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Did you disable SELinux?
__________________
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
  #7  
Old 15th March 2012, 18:53
mattgrannary mattgrannary is offline
Junior Member
 
Join Date: Mar 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't think so, I'm not even sure this was enabled. Is there a way to check?
Reply With Quote
  #8  
Old 15th March 2012, 21:02
TiTex TiTex is offline
Senior Member
 
Join Date: Aug 2011
Location: Cluj-Napoca,Romania
Posts: 125
Thanks: 0
Thanked 18 Times in 17 Posts
Send a message via Skype™ to TiTex
Default

try one of these
Code:
getenforce
sestatus
Reply With Quote
  #9  
Old 15th March 2012, 21:13
mattgrannary mattgrannary is offline
Junior Member
 
Join Date: Mar 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ya, just tried that out and it says that it's disabled. Do I need to enable Selinux to use postfix, courier-imap with mysql?
Reply With Quote
  #10  
Old 15th March 2012, 21:20
mattgrannary mattgrannary is offline
Junior Member
 
Join Date: Mar 2012
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

ok, I just enabled Selinux and rebooted. I tried the mailx command again and this time postfix tried to log on as a different user (postfix)

Here is the new error:

Code:
postfix/cleanup[1848]: warning: connect to mysql server 127.0.0.1: Access denied for user 'postfix'@'localhost' (using password: YES)
Reply With Quote
Reply

Bookmarks

Tags
centos6, mysql, postfix

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
Need help with ISPConfig Mail and Squirrelmail m.xander Installation/Configuration 109 3rd February 2012 00:15
Webmail jacksmerv Installation/Configuration 13 12th January 2011 14:03
monit howto Jamesk5 HOWTO-Related Questions 11 5th August 2008 15:10
Management/system config/settings & /server/settings not working!! dactor Installation/Configuration 9 6th February 2008 09:11
Apache - Virtual hosts - ISPConfig Hans Server Operation 8 23rd April 2006 16:29


All times are GMT +2. The time now is 14:48.


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