I noticed I wasn’t getting any mail from my server recently. Turned out to not be what I expected.
TROUBLESHOOTING “ACCESS DENIED FOR USER ISPCONFIG”
Checking the maillog file revealed these errors:
Aug 14 07:10:58 server postfix/trivial-rewrite: warning: proxy:mysql:/etc/postfix/mysql-virtual_transports.cf lookup error for "*" Aug 14 07:10:58 server postfix/proxymap: warning: connect to mysql server 127.0.0.1: Access denied for user 'ispconfig'@'127.0.0.1' (using password: YES) Aug 14 07:10:58 server postfix/trivial-rewrite: warning: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf: table lookup problem Aug 14 07:10:58 server postfix/trivial-rewrite: warning: virtual_mailbox_domains lookup failure Aug 14 07:10:58 server postfix/smtpd: warning: connect to mysql server 127.0.0.1: Access denied for user 'ispconfig'@'127.0.0.1' (using password: YES)
I figured it had something to do with some tweaking I did to my Mariadb my.cnf file. So I searched google with the last variable I changed in the my.cnf file “skip-name-resolve”, with ISPconfig and there was the answer. This is right from howtoforge.com:
“skip-name-resolve makes MySQL authentication impossible for all accounts that use a hostname or localhost and therefore software that connects from localhost like postfix will stop working. So setting skip-“name-resolves” makes no sense as it must break the authentication system for all accounts that don’t use IP addresses.”
Access denied for user ‘ispconfig’ literally means postfix could not log on to MariaDB as it was denied access because MariaDB could not look up localhost DNS information.
Remove “skip-name-resolve” from the “my.cnf” solved the”Access denied for user ispconfig” error. As it turns out the “skip-name-resolve” that I changed to help speed up MariaDB in the “my.cnf” breaks the mail system in ISPConfig. As ISPConfig is dependent on MariaDB to do its DNS lookups. Removing the “skip-name-resolve” variable fixed the postfix mail server table look up problem.
Not all “tweaks” are helpful and could be harmful to other services on your server. Be careful what you change, and watch your logs after you have made any changes.