1825774 Members
2233 Online
109687 Solutions
New Discussion

Re: sendmail issue

 
SOLVED
Go to solution
ani007
Super Advisor

sendmail issue

Hi Experts,
we have edited sendmail.mc file as per messaging team requirement. Modified 'SMART_HOST' entry in /etc/mail/sendmail.mc. Then customer was able to receive mails. Everything is fine now. But I forget that after we edit .mc file we need to generate a sendmail.cf file also with the following command.
#m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

It is a very important production server. Now my question is if I fire this command now will there be any impact.. do u have any idea on this kind of scenario. Please explain me ..
# more /etc/redhat-release
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
5 REPLIES 5
ani007
Super Advisor

Re: sendmail issue

Another thing after doing this is it require to restart send mail??
Chhaya_Z
Valued Contributor

Re: sendmail issue

Hi,

Due to the complexity of the /etc/mail/sendmail.cf file, a much simpler file named /etc/sendmail.mc was created, and it contains more understandable instructions for systems administrators to use. These are then interpreted by a number of macro routines to create the sendmail.cf file. After editing sendmail.mc, you must always run the macros and restart sendmail for the changes to take effect.

When sendmail is restarted it should automatically update the sendmail.cf file as these days many initscripts handle this task automatically. However you can manually do it using that command.

Below link has more information on how sendmail works.

http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch21_:_Configuring_Linux_Mail_Servers

Hope this answers your query.
Regards,
Chhaya

I am an HP employee.
Was this post useful? - You may click the KUDOS! star to say thank you.
Steven Schweda
Honored Contributor
Solution

Re: sendmail issue

> we have edited sendmail.mc file as per
> messaging team requirement. Modified
> 'SMART_HOST' entry in
> /etc/mail/sendmail.mc. Then customer was
> able to receive mails.

So, you changed only "sendmail.mc", but your
change was effective? This suggests to me
that someone/something also changed
"sendmail.cf".

> [...] When sendmail is restarted it should
> automatically update the sendmail.cf file
> [...]

That would explain this behavior. Have you
looked at the modification date-time of your
files?

ls -l /etc/mail/sendmail.*

> #m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

If you're really worried about what that will
do to your "very important production server,
then why not do something safe, like, say:

#m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cfXXX

and then compare "sendmail.cfXXX" with your
existing "sendmail.cf"? If they're the same,
then you may be able to guess what happened,
and what you still need to do.
Randy Jones_3
Trusted Contributor

Re: sendmail issue

The RHEL5 init script for sendmail will sense the update to the .mc file and rebuild the .cf file when you try to (re)start sendmail.

Make sure the "sendmail-cf" package is present on the system before you proceed. It contains necessary m4 macros that may not be installed already.
ani007
Super Advisor

Re: sendmail issue

Tnx all


Regards,
Ani