I upgraded some of my software and since then my postfix dovecot mysql setup that was working perfectly (following this tutorial) is broken…
I am currently running the following on my droplet:
I can connect to mysql, and both postfix and dovecot are running. For some reason it appears that postfix cannot connect to the mysql server, even though the user and password work when I access the database directly. The error seems to be reflected by these repeating warnings in the postfix log file: (the hostname and username were changed for privacy)
<lots of stuff deleted>
Mar 8 18:25:58 hostname postfix/cleanup[31858]: warning: connect to mysql server 127.0.0.1: Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Mar 8 18:25:58 hostname postfix/cleanup[31858]: warning: mysql:/etc/postfix/mysql-virtual-alias-maps.cf lookup error for "username@hostname"
Mar 8 18:25:58 hostname postfix/cleanup[31858]: warning: 149EB1845F3: virtual_alias_maps map lookup problem for username@hostname -- message not accepted, try again later
<lots of stuff deleted>
When I change the .cf files that define the mysql connections and use “localhost” instead of “127.0.0.1” the error message changes to:
<lots of stuff deleted>
Mar 8 18:30:52 hostname postfix/cleanup[32254]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Mar 8 18:30:52 hostname postfix/cleanup[32254]: warning: mysql:/etc/postfix/mysql-virtual-alias-maps.cf lookup error for "username@hostname"
Mar 8 18:30:52 hostname postfix/cleanup[32254]: warning: 0A28C1845F3: virtual_alias_maps map lookup problem for username@hostname -- message not accepted, try again later
<lots of stuff deleted>
Any thoughts how to troubleshoot this further? I have tried pretty much everything for the last six hours but don’t seem to have any success. I posted this to the entry that provides the tutorial, but thought this area might have a bit more traffic…
Thanks for your input!
Andreas
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
This question was answered by @Azendale:
View the original comment