I have a problem where the server is not sending out an email from a WordPress site to an external email id (via a contact us form). I was trying to solve the problem and ended by creating a MUCH bigger problem!
I read the thread: https://www.virtualmin.com/node/22535 and made the change as described: "I was running into this exact same problem recently, and it went away immediately when I set "domains to receive mail for" to the "whole domain" radio button. To anyone having this problem: it might be good to check that variable. The above change translated to, in main.cf: mydestination = $myhostname, localhost.$mydomain, $mydomain"
After I did ONLY the above, the backend server stopped responding - ie, when I try to access the URL for the backend, it says: "Unable to connect Firefox can’t establish a connection to the server at ......"
The websites hosted on the various virtual servers are working fine.
In order to return things back to normal, I went to the ssh prompt and made the following change in /etc/postfix/main.cf
Changed: mydestination = $myhostname, localhost.$mydomain, $mydomain
TO: mydestination = test.example.mydomain.com, localhost.example.mydomain.com, localhost myhostname = test.example.mydomain.com
I tried restarting it via the ssh prompt but no luck either.
Tried the following as well, but that didn't work either.
mydestination = test.example.$mydomain.com, localhost.example.$mydomain.com, localhost myhostname = test.example.$mydomain.com