1834804 Members
2257 Online
110070 Solutions
New Discussion

howto modify sendmail.cf

 
SOLVED
Go to solution
Brian McEntire
Frequent Advisor

howto modify sendmail.cf

Hi :)

We run sendmail on an HP-UX 11i server. I see /etc/mail/sendmail.cf but can't locate the m4 files used to generate it.

I may not need the m4 files. All I am really after is I want to prevent sendmail (running as a daemon) from trying to connect to the auth facility when hosts connect to deliver mail.

I've found this is possible if you add:
define(`confTO_IDENT', `0')dnl

To the sendmail.m4 file and regenerate the configuration.

Is there a simply way to accomplish the desired change by adding a line or changing a line in /etc/mail/sendmail.cf?

Thank you!
5 REPLIES 5
Mel Burslan
Honored Contributor

Re: howto modify sendmail.cf

You can safely edit the file sendmail.cf, though with extreme caution against typos.

then you will need to restart sendmail by running

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

for your changes to take effect
________________________________
UNIX because I majored in cryptology...
Brian McEntire
Frequent Advisor

Re: howto modify sendmail.cf

Thanks, but isn't the format of sendmail.cf different than the m4 macros?

Do you know what the equivalent sendmail.cf entry for this is?
define(`confTO_IDENT', `0')dnl

I don't think I can just paste that into the sendmail.cf file. Please correct me if I am wrong.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: howto modify sendmail.cf

That m4 syntax says to replace every occurence of "confTO_IDENT" with "0". The "dnl" says don't leave a blank line in the source for where the define itself was in the source.

If I understand what you are trying to do, you can just edit /etc/mail/sendmail.cf and change (and possibly uncomment)
#O Timeout.ident=30s
to
O Timeout.ident=0s

and then stop and restart sendmail.
If it ain't broke, I can fix that.
Brian McEntire
Frequent Advisor

Re: howto modify sendmail.cf

Thank you, that did it!
Steven E. Protter
Exalted Contributor

Re: howto modify sendmail.cf

The format is different in the sendmail.cf file versus the macros.

I have a little m4 macro script here:

http://www.hpux.ws/buildmail.hpux.text

It is adopted to deal with the hpux way of implementing sendmail.

It allows me to change the m4 script instead of the .cf file, making my changes permanent and easier to manage.

To stop the sendmail daemon from running change the entry in /etc/rc.config.d/mailsvrs, the first variable to 0 (zero)

This will not prevent the sendmail binaries from sending mails, but it will make it difficult to get mail onto the server without shell/ssh access to the server.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com