Question & Answer
Question
How to configure two sendmails, once for MTA and another for MSA.
Answer
This document describes how to run two sendmails, one for MTA(Mail Transfer Agent) and another
for MSA(Mail Submission Agent).
For this example I will be using user smmsp and mailserver netmail.austin.ibm.com.
1) Create a smmsp user.
#smitty user
Add a User
User NAME [smmsp]
Give user a password.
#passwd smmsp
#smitty group
Add a Group
Group NAME [smmsp]
NOTE:Recommended UID for smmsp is 25. This way smmsp does not need a valid shell.
2)Create a submit.cf file.
#cd /usr/samples/tcpip/sendmail/cf
a. Create a submit.mc file, if it does not exist.
#vi submit.cf
divert(0)dnl
VERSIONID(`$Id: submit.mc,v 8.13 2003/09/10 22:12:48 ca Exp $')
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
dnl
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
FEATURE(`msp', `[netmail.austin.ibm.com]')dnl
b. Create a submit.cf using m4 compiler.
#m4 ../m4/cf.m4 submit.mc > submit.cf
#cp /usr/samples/tcpip/sendmail/cf/submit.cf /etc/mail/submit.cf
Here are some of the options in the submit.cf file you need to change for your
environment. Change the D{MTAHost} to your Mail server, RunAsUser and TrustedUser
don't need to be changed unless you need to use a different username.
D{MTAHost}netmail1.austin.ibm.com
O RunAsUser=smmsp
O TrustedUser=smmsp
Create a directory /var/spool/clientmqueue
#mkdir /var/spool/clientmqueue
#chown smmsp.smmsp /var/spool/clientmqueue
#chmod 770 /var/spool/clientmqueue
#chown root.smmsp /usr/sbin/sendmail
3)Start both instances of sendmail.
Starts the MTA using SRC support.
#startsrc -s sendmail -a "-L sm-mta -bd -q30m"
Starts the MSA without SRC support.
#/usr/lib/sendmail -L sm-msp-queue -Ac -q30m
You should see both daemons running.
#ps -ef |grep sendmail
smmsp 217262 1 0 16:08:22 - 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root 282844 188558 0 16:06:58 - 0:00 sendmail: accepting connections
NOTE: Source master is only going to support one daemon at a time. If you
need to start the Mail Submision Agent (MSA), then it would need to start from cmd line.
To make changes permanent on bootup edit /etc/rc.tcpip and make the following changes.
#vi /etc/rc.tcpip
Find entry for sendmail and add the flags below to sendmail.
start /usr/lib/sendmail "$src_running" "-L sm-mta -bd -q${qpi}"
Then add another line under it to start sendmail MSA without SRC.
/usr/lib/sendmail -L sm-msp-queue -Ac -q1h
save file...
To test it out, queue a couple of emails using the following command.
/usr/sbin/sendmail -froot@austin.ibm.com -ODeliveryMode=q root </etc/motd
ls -l /var/spool/clientmqueue
dfm3HLCV8v479354 dfm3HLCZF9479358 qfm3HLCV8v479354 qfm3HLCZF9479358 sm-client.pid
dfm3HLCXLo479356 dfm3HLCaHl479360 qfm3HLCXLo479356 qfm3HLCaHl479360
After a while the sendmail daemon running as the MSA should have processed the emails.
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
isg3T1019680