Hi, I followed the ubuntu 18.04 setup for apache it is a clean server on Hypver-v but for some reason i cannot send email it says sent in the webmail and smtp says sent but its not going out. any ideas why or how can i check? Thank you Alex
Where is the vm located? In a data center or at home or in the office? Many dsl and cable providers block port 25 to prevent spam, which means you can't run a mail server over their internet connection.
In a datacentre 1gb up and down. i've had an email server running fine using postfix and dovecot running port 587 fine so not sure why its blocking unless the port 587 outgoing to being blocked how can i view outgoing mail store?
A mail server is not using port 587 to send emails out, it is using port 25 to communicate with other servers. Port 587 is used only by email clients to communicate with a mail server. Contact the data center and ask them if they block port 25 and if they do so, request that they unblock port 25.
Is there a way to change it to 587 outgoing? as im getting connection refused E090C32234B 647 Tue Feb 26 01:42:27 EMAILHERE (connect to 127.0.0.1[127.0.0.1]:10026: Connection refused) EMAILHERE
No, smtp servers communicate on port 25. This shows an internal problem, amavis is not listening on port 10026. See if just restarting amavis fixes it, and if not, check the mail log for errors.
Please run the test script as root user (or run "sudo -s" to become root and then run the script): https://www.howtoforge.com/community/threads/please-read-before-posting.58408/ and post the result.
So i changed the name in ubuntu to hostnamectl set-hostname fqdn.web.com then did post postqueue -f to fix the issue
The hostname does not has to be an FQDN when you configured /etc/hosts correctly, what matters is that 'hostname -f' command returns the fqdn. But it's ok to set the hostname to the FQDN too.