1833596 Members
3484 Online
110061 Solutions
New Discussion

Re: sendmail banner

 
SOLVED
Go to solution
Sridhar Bhaskarla
Honored Contributor

Re: sendmail banner

Hi Animesh,

You can safely go ahead and kill sendmail. Use kill, since there is no PID.

kill pid_of_sendmail

Then start it using

/sbin/init.d/sendmail start

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Seth Parker
Trusted Contributor

Re: sendmail banner

All of this discusstion got me thinking, so I checked my own system.

If you look at the /sbin/init.d/sendmail script (at least on 11.0), it checks the values of SENDMAIL_SERVER and SENDMAIL_SERVER_NAME to decide how to start. Those variables are defined in /etc/rc.d/mailservs and there's a decent explanation about what they do.

So, to run sendmail with what should be the equivalent of -bm, just set SENDMAIL_SERVER to 0 and SENDMAIL_SERVER_NAME to something other than nothing.

However, I would comment out all of the following lines:
# mv /etc/mail/sendmail.cf /etc/mail/#sendmail.cf
# sed -e s/^DH$/DH$SENDMAIL_SERVER_NAME.\$m/ # -e s/^DM$/DM$SENDMAIL_SERVER_NAME.\$m/ # /etc/mail/#sendmail.cf # > /etc/mail/sendmail.cf
# rm /etc/mail/#sendmail.cf

If you don't it's going to modify your sendmail.cf and make sendmail masquerade as whatever you defined SENDMAIL_SERVER_NAME to be.

The funny thing is that now the /sbin/init.d/sendmail script doesn't start anything, it just makes sure everything it happy. Even so, when I sent a test message with mailx (after killing sendmail and making the above changes), the message still delivers fine. That must be what the man pages mean by "Deliver mail in the usual way (default)".

Good luck!
Seth Parker
Trusted Contributor

Re: sendmail banner

Sorry, that didn't paste right. Here are the lines to comment:

# mv /etc/mail/sendmail.cf /etc/mail/#sendmail.cf
# sed -e s/^DH$/DH$SENDMAIL_SERVER_NAME.\$m/ # -e s/^DM$/DM$SENDMAIL_SERVER_NAME.\$m/ # /etc/mail/#sendmail.cf # > /etc/mail/sendmail.cf
# rm /etc/mail/#sendmail.cf

This is all under the
elif [ "X$SENDMAIL_SERVER_NAME" != "X" ] ; then
section.

You want to leave the "set_return" line in so that the return value is set properly.
Seth Parker
Trusted Contributor

Re: sendmail banner

Well, my idea of modifying the startup script was, in hindsight, an obviously flawed one. Updating sendmail put a new startup script out there and all of a sudden my messages were coming from "seth@XXX".

So, to fix that, I left my changes to /etc/rc.config.d/mailservs as they were, but modified my sendmail.cf so that DS and DM were either already configured how I wanted them, or at least contained a trailing space (that gets around the sed replace). Or, just set SENDMAIL_SERVER_NAME to your hostname and let the script do its thing.

Regards,
Seth