Procedure
- Copy the
sendmail.mcfile and rename itsendmail.d.mcfor later use.# cp -p /etc/mail/sendmail.mc /etc/mail/sendmail.d.mc
- In the
sendmail.mcfile, add the following statements beforeMAILER(smtp)dnlto 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.mcfile into the following to receive SMTP requests from all hosts:DAEMON_OPTIONS(`Port=smtp, Addr=0.0.0.0, Name=MTA')dnlIf 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.cffile to take effect:# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
