Sample Header Ad - 728x90

sendmail: Using alternative port with smart-host

0 votes
1 answer
1429 views
Sendmail not following smart_host alternative port macro. Using Exchange server, exchange.redacted.com, we are using port 2525 for internal devices and some Linux based machines, allowing them send outgoing email without authentication. The 'receive connector' allows relay for devices on our intranet and external with explicit IP address authorization. Linux based devices MTA is **sendmail**. I edited /etc/mail/sendmail.mc adding: define(SMART_HOST',relay:[exchange.redacted.com]')dnl define(RELAY_MAILER_ARGS', TCP $h 2525')dnl define(ESMTP_MAILER_ARGS', TCP $h 2525')dnl define(SMTP_MAILER_ARGS' , TCP $h 2525')dnl define(SMTP8_MAILER_ARGS', TCP $h 2525')dnl define(DSMTP_MAILER_ARGS', TCP $h 2525')dnl Just in case, I added all the __*_MAILER_ARGS__ trying to specify the port to use with no success. The generated **sendmail.cf**, shows the __SMART_HOST__ selected but not the alternative port. # "Smart" relay host (may be null) DSrelay:[exchange.redacted.com] ... Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP/MasqRelay, E=\r\n, L=2040, T=DNS/RFC822/SMTP, A=TCP $h modifying the Mrelay, adding 2525 works as intended: Mrelay, P=[IPC], F=mDFMuXa8, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP/MasqRelay, E=\r\n, L=2040, T=DNS/RFC822/SMTP, A=TCP $h 2525 How can I specify the port on the **.mc** source without the need of a manual edit the resultant **.cf**?
Asked by fcm (467 rep)
Sep 21, 2020, 03:12 PM
Last activity: Dec 23, 2023, 03:31 AM