Procedure
- Restart the first Sendmail daemon to
receive SMTP traffic on port 25 using the following command:
-
RedHat Enterprise Linux 6
# /etc/init.d/sendmail restart
-
RedHat Enterprise Linux 7 or 8
#systemctl restart sendmail
-
- Create the following new file for the second Sendmail daemon.
Note
Make sure there are no extra trailing spaces in each line of the new file.-
RedHat Enterprise Linux 6Create the
sendmail_delivery
file.vi /etc/init.d/sendmail_delivery
#!/bin/bash # # sendmail_delivery This shell script takes care of # starting and stopping # sendmail_delivery # # chkconfig: 2345 80 30 # PROG=sendmail_delivery CONFFILE=/etc/mail/sendmail.cf.delivery PIDFILE=/var/run/sendmail_delivery.pid # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. [ -f /etc/sysconfig/network ] && \ . /etc/sysconfig/network # Source sendmail configureation. if [ -f /etc/sysconfig/sendmail ]; then . /etc/sysconfig/sendmail else DAEMON=no QUEUE=1h fi # Check that we're a privileged user [ `id -u` = 0 ] || exit 4 # Check that networking is up. [ "${NETWORKING}" = "no" ] && exit 1 [ -x /usr/sbin/sendmail ] || exit 5 start() { ret=0 echo -n $"Starting $PROG: " daemon --pidfile $PIDFILE /usr/sbin/sendmail \ $([ "x$DAEMON" = xyes ] && echo -bd) \ $([ -n "$QUEUE" ] && echo -q$QUEUE) \ $SENDMAIL_OPTARG -C $CONFFILE RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$PROG let ret+=$RETVAL [ $ret -eq 0 ] && return 0 || return 1 } stop() { echo -n $"Shutting down $PROG: " killproc $PROG RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$PROG return $RETVAL } status -p $PIDFILE >/dev/null running=$? case "$1" in start) [ $running -eq 0 ] && exit 0 start RETVAL=$? ;; stop) [ $running -eq 0 ] || exit 0 stop RETVAL=$? ;; restart) stop start RETVAL=$? ;; status) echo -n $PROG ; status -p $PIDFILE -l $PROG RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|restart|status}" RETVAL=2 esac exit $RETVAL
-
RedHat Enterprise Linux 7 or 8
-
Create the
sendmail_delivery.service
file.vi /usr/lib/systemd/system/sendmail_delivery.service
[Unit] Description=Sendmail Mail Transport Agent for Delivery After=syslog.target network.target Conflicts=postfix.service exim.service [Service] Type=forking StartLimitInterval=0 PIDFile=/var/run/sendmail_delivery.pid Environment=SENDMAIL_OPTS="-q1h" EnvironmentFile=-/etc/sysconfig/sendmail ExecStartPre=-/etc/mail/make ExecStartPre=-/etc/mail/make aliases ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG -C /etc/mail/sendmail.cf.delivery [Install] WantedBy=multi-user.target
-
Create a soft link to the
sendmail_delivery.service
file.ln -s /usr/lib/systemd/system/sendmail_delivery.service /etc/systemd/system/multi-user.target.wants/sendmail_delivery
-
-
- Restart the second Sendmail daemon to receive SMTP traffic from IMSS using the following command:
-
RedHat Enterprise Linux 6
#chmod 755 /etc/init.d/sendmail_delivery
# /etc/init.d/sendmail_delivery restart
-
RedHat Enterprise Linux 7 or 8
#systemctl restart sendmail_delivery
-