Procedure
- Copy the
sendmail.mc
file and rename itsendmail.d.mc
for later use.# cp -p /etc/mail/sendmail.mc /etc/mail/sendmail.d.mc
- In the
sendmail.mc
file, add the following statements beforeMAILER(smtp)dnl
to relay all email messages to IMSS:define(`SMTP_MAILER_ARGS',`TCP [127.0.0.1] 10025')dnl MODIFY_MAILER_FLAGS(`SMTP', `+k') dnl define(`ESMTP_MAILER_ARGS',`TCP [127.0.0.1] 10025')dnl MODIFY_MAILER_FLAGS(`ESMTP', `+k') dnl define(`SMTP8_MAILER_ARGS',`TCP [127.0.0.1] 10025')dnl MODIFY_MAILER_FLAGS(`SMTP8', `+k') dnl define(`RELAY_MAILER_ARGS',`TCP [127.0.0.1] 10025')dnl MODIFY_MAILER_FLAGS(`RELAY', `+k') dnl MODIFY_MAILER_FLAGS(`LOCAL', `+k') dnl define(`LOCAL_MAILER_PATH',`[IPC]')dnl define(`LOCAL_MAILER_ARGS',`TCP [127.0.0.1] 10025')dnl
- Change the existing DAEMON_OPTIONS setting in the
sendmail.mc
file into the following to receive SMTP requests from all hosts:DAEMON_OPTIONS(`Port=smtp, Addr=0.0.0.0, Name=MTA')dnl
If necessary, add the following DAEMON_OPTIONS setting to enable IPv6 support:DAEMON_OPTIONS(`Port=smtp, Addr=<IPv6_address>, Name=MTA_IPv6, Family=inet6')dnl
- Run the following command for the
sendmail.cf
file to take effect:# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf