Question

I've been trying to set up a mail server on a rackspace CentOS 6 cloud server for the past several days. I've been following the howtoforge tutorial to a tee. Everything installed properly and seemed to go exactly as they have described except, I haven't been able to send any mail.

After taking a look at the maillog I can see that postfix spits out an error saying:

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

So I'm guessing that postfix is not picking up on my settings for the correct user and password. I've set these up as per the howtoforge tutorial using the "mysql-virtual_*.cf" files and pointing the postfix config to these files. The permissions are set up properly.

So I'm just wondering why postfix continues to use the root user to try to access my mysql tables for the virtual mailbox configuration.

Was it helpful?

Solution 2

Several things ended up being wrong with my set up, so I thought I'd list them here for any other truth seekers.

  1. I had SELinux disabled. Once I enabled that my postfix was able to access the files it needed to get the proper login name and password like the aliases file.
  2. I had typos in my postfix mysql files. Make sure to triple check these!
  3. There was some trailing space after the mysql username in my authmysqlrc. Using vi in non insert mode move your cursor to the end of each line and make sure it can't go past the last character. If it does, press 'x' when on that space.
  4. Make sure you open up all necessary port for email if you are using iptables. 25, 993

OTHER TIPS

Try "egrep -ri root /etc/postfix" for a brute force search of any possible configuration file that might still contain root. It has to be coming from somewhere and that somewhere is where you need to change the credentials you prefer it to use.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top