0

I have a working sendmail installation that now needs to send to a different smarthost, on port 465 (instead of 25). I made the following changes to my sendmail.mc

define(`SMART_HOST',`mta.mydomain.com')dnl
define(`RELAY_MAILER',`esmtp')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 465')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl

And after make-ing the mc file, restarting the sendmail service, message are still stuck in the queue:

Dec 22 16:04:40 myhost sendmail[8101]: 0BML4e87008101: from=admin, size=212, class=0, nrcpts=1, msgid=<202012222104.0BML4e87008101@myhost.mydomain.com>, relay=root@localhost
Dec 22 16:04:40 myhost sendmail[8103]: 0BML4ebh008103: from=<admin@myhost.mydomain.com>, size=446, class=0, nrcpts=1, msgid=<202012222104.0BML4e87008101@myhost.mydomain.com>, proto=ESMTP, daemon=MTA, relay=thishost.local [127.0.0.1]
Dec 22 16:04:40 myhost sendmail[8101]: 0BML4e87008101: to=support@otherdomain.com, ctladdr=admin (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30212, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (0BML4ebh008103 Message accepted for delivery)
Dec 22 16:06:40 myhost sendmail[8105]: 0BML4ebh008103: to=<support@otherdomain.com>, ctladdr=<admin@myhost.mydomain.com> (1000/1000), delay=00:02:00, xdelay=00:02:00, mailer=relay, pri=120446, relay=mta.mydomain.com. [51.104.109.26], dsn=4.0.0, stat=Deferred: Connection timed out with mta.mydomain.com.

I've tried to follow the guides I found online...just can't figure out what's wrong. Can someone see the error?

(host names and IP's have been obfuscated)

TSG
  • 1,674
  • 7
  • 32
  • 51
  • Does `telnet mta.mydomain.com 587` on the host produce SMTP greeting message? [Is it sendmail fault? Is your host "firewalled-out"? – AnFi Dec 22 '20 at 21:43

1 Answers1

0

port 465 is for SMTPS and you need an valid ssl on the mailserver to use this port.

If you already have SSL then make sure that port 465 can be accessed from outside the server or from the side of the mail application used.

You can scan with nmap to make sure the port are opened:

$ nmap -p465 mta.mydomain.com

or telnet like :

$ telnet mta.mydomain.com 465
YonzLeon
  • 311
  • 1
  • 6