I am trying to setup a Ubuntu VM with sendmail (LAMP) and I cannot seem to get sendmail to actually send anything. I have read that I need to setup a SMTP relay to a valid domain name, which I have (not Gmail).
Here are the steps that I am taking (as root):
apt-get install sendmail mailutils cd /etc/mail mkdir auth chmod 700 auth vi auth/client-info AuthInfo:mail.<mydomain.net> "U:user" "I:user" "P:password" TLS_Srv:mail.<mydomain.net> ENCR:128 makemap hash auth/client-info < auth/client-info chmod 600 auth/client-info vi sendmail.mc After MAILER_DEFINITIONS: Add define(`SMART_HOST',`mail.<mydomain.net>')dnl define('confAUTH_MECHANISMS', 'EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl FEATURE('authinfo','hash /etc/mail/auth/client-info')dnl m4 sendmail.mc > sendmail.cf
When I test it, I do
(echo subject: test; echo ) | sendmail -v -i -Am -- email@example.com
and it seems like it hangs on this without doing anything.
In my error log, /var/log/mail.err I have the following:
Mar 24 09:40:01 webDev sm-msp-queue: My unqualified host name (webDev) unknown; sleeping for retry Mar 24 09:41:01 webDev sm-msp-queue: unable to qualify my own domain name (webDev) -- using short name
The only thing that I cannot figure out is how to use a different port since the server is setup to use port 465. Connection security is SSL/TLS and plaintext password.
What am I missing to get this configuration working?
EDIT: I have changed /etc/hosts and set my computername to a FQDN and it no longer seems like it is hanging.
I now have a problem "Deferred: Connection refused by " Using Wireshark I have found the packets being sent to mail. are on port 25. An Nmap scan of mail. port 25 as closed.