f



sendmail patch overwrites /etc/mail/sendmail.cf

Beware:

just installed patch 122857-02 (would be 122856 on SPARC) on my machine. Why
does this patch overwrite my (custom) /etc/mail/sendmail.cf?

This file is marked in the /var/sadm/install/contents database as "e" so
should be left alone during patch installation.

At least a notice in the patch README would have been nice, but this file
just contains useless NOTEs most of the time.

Better leave the sendmail.cf alone if it has been changed from the
installed one (can be simply checked with the checksum in
/var/sadm/install/contents)


-- 
Daniel
0
Daniel
4/28/2006 10:21:21 PM
comp.unix.solaris 26025 articles. 2 followers. Post Follow

8 Replies
1373 Views

Similar Articles

[PageSpeed] 37

On Fri, 28 Apr 2006, Daniel Rock wrote:

> Beware:
> 
> just installed patch 122857-02 (would be 122856 on SPARC) on my machine. Why
> does this patch overwrite my (custom) /etc/mail/sendmail.cf?

Good question, but my question is this: why not just rebuild your .cf
from your .mc file?  And if you're not using m4 to create your .cf from
a .mc, then now is a good time to start!

-- 
Rich Teer, SCNA, SCSA, OpenSolaris CAB member

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
0
Rich
4/29/2006 2:21:30 AM
Rich Teer <rich@rite-group.com> wrote:
> On Fri, 28 Apr 2006, Daniel Rock wrote:
> 
>> Beware:
>> 
>> just installed patch 122857-02 (would be 122856 on SPARC) on my machine. Why
>> does this patch overwrite my (custom) /etc/mail/sendmail.cf?
> 
> Good question, but my question is this: why not just rebuild your .cf
> from your .mc file?  And if you're not using m4 to create your .cf from
> a .mc, then now is a good time to start!

Why should I recreate a perfectly .cf file with something new? The
security fix delivered in sendmail 8.13.6 is part of the binary, not the
configuration. I only recreate .cf files if I have a specific reason.

And why isn't this misfeature (sendmail.cf gets overwritten) documented
in the patch README?

I noticed this problem only after reboot and a few eMails had been send
and received (and one eMail already bounced).

-- 
Daniel
0
Daniel
4/29/2006 10:36:08 AM
On Sat, 29 Apr 2006, Daniel Rock wrote:

> Why should I recreate a perfectly .cf file with something new? The

The short answer is "because that's the right way".  It's the right way
because (even ignoring the fact that .mc files are MUCH more maintainable)
when you rebuild the .cf file, you automatically get any fixes that have
been made to the various macros that (when expanded) make up sendmail.cf.

In other words, sendmail fixes don't only happen to the sendmail binaries.
Sometimes fixes are made to to macros.  By not building yout .cf from the
new .mcs, you run the risk of using outdated macros.

> security fix delivered in sendmail 8.13.6 is part of the binary, not the
> configuration. I only recreate .cf files if I have a specific reason.

Upgrading to a new version of sendmail is a good sepcific reason, even if
its only x.y.z to x.y.z+1.

> And why isn't this misfeature (sendmail.cf gets overwritten) documented
> in the patch README?

No idea, though I agree it should be documented.

-- 
Rich Teer, SCNA, SCSA, OpenSolaris CAB member

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
0
Rich
4/29/2006 3:10:55 PM
Rich Teer wrote:
> On Sat, 29 Apr 2006, Daniel Rock wrote:
> 
>> Why should I recreate a perfectly .cf file with something new? The
> 
> The short answer is "because that's the right way".  It's the right way
> because (even ignoring the fact that .mc files are MUCH more maintainable)
> when you rebuild the .cf file, you automatically get any fixes that have
> been made to the various macros that (when expanded) make up sendmail.cf.
> 
> In other words, sendmail fixes don't only happen to the sendmail binaries.
> Sometimes fixes are made to to macros.  By not building yout .cf from the
> new .mcs, you run the risk of using outdated macros.

That's a good point, but I still see reasons why sendmail.cf should not be
overwritten as well.  The most obvious is the case when the particular
patch does not contain any updated macros.  If that is the case, then it
should not rewrite sendmail.cf, since doing so provides no benefit and
can only do harm.

Also, whether replacing sendmail.cf is beneficial or harmful depends on
two factors:  (1) whether the user has made changes to the configuration
or left it as the default, and (2) whether the patch contains any changes
to the macros.  The former determines whether there is any potential harm
from overwriting config files and the latter determines whether there is
any potential benefit.  So, you must consider all 4 possible combinations:

     custom config    macros changed  |  overwrite    leave unchanged
     ---------------------------------+------------------------------
     no               no              |  neutral      neutral
     no               yes             |  good         bad
     yes              no              |  bad          good
     yes              yes             |  bad          bad

The last case basically requires the administrator to rebuild sendmail.cf
(either from sendmail.mc or by hand) no matter what happens, because
there is no way the patch can do the right thing.  Unless the modified
macros have no been used in the sendmail.mc, in which case the patch
could luck out and get the right results if it left sendmail.cf unchanged.
Actually, could happen quite often that some macros have changed but not
ones that are in use, since many macros are for obscure features that
aren't often used.

Anyway, the point is that if you look at the "overwrite" column and
compare it with the "leave unchanged" column, you can see that they
have the same number of "good"s and also the same number of "bad"s as
each other.

Having said all that, the best thing for the administrator to do is
to rebuild sendmail.cf every time, because in some cases the patch
will include macros that have changed and in some cases it won't.
So even if the patch were to overwrite sendmail.cf only in cases
where it's necessary, it's better to check every time you apply a
sendmail patch.  Of course, it would be helpful if the patch warned
the administrator!

   - Logan
0
Logan
4/29/2006 4:41:16 PM
In <MGM4g.50740$0Z4.2771@tornado.texas.rr.com> Logan Shaw <lshaw-usenet@austin.rr.com> writes:

>Rich Teer wrote:
>> On Sat, 29 Apr 2006, Daniel Rock wrote:
>> 
>>> Why should I recreate a perfectly .cf file with something new? The
>> 
>> In other words, sendmail fixes don't only happen to the sendmail binaries.
>> Sometimes fixes are made to to macros.  By not building yout .cf from the
>> new .mcs, you run the risk of using outdated macros.

>That's a good point, but I still see reasons why sendmail.cf should not be
>overwritten as well.  The most obvious is the case when the particular
>patch does not contain any updated macros.  If that is the case, then it
>should not rewrite sendmail.cf, since doing so provides no benefit and
>can only do harm.

You forget that sendmail supports configuration files from previous
versions.  Even if the sendmail executables are replaced, that's still
no reason to clobber the configuration files.  It matters not whether
these configuration files were generated from .mc files or were created
with an editor.  They still should not be replaced by a patch upgrade.
That's bound to break e-mail, except in the case where nothing was
modified from the defaults.

In my case, I've retaliated by adding code to my sendmail method
script that restores the sendmail configuration files on reboot,
when they have been disturbed by a patch.

-- 
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-
0
Gary
4/29/2006 5:52:03 PM
Rich Teer <rich@rite-group.com> wrote:
> On Sat, 29 Apr 2006, Daniel Rock wrote:
> 
>> Why should I recreate a perfectly .cf file with something new? The
> 
> The short answer is "because that's the right way".  It's the right way
> because (even ignoring the fact that .mc files are MUCH more maintainable)
> when you rebuild the .cf file, you automatically get any fixes that have
> been made to the various macros that (when expanded) make up sendmail.cf.

I do create .cf out of .mc, but don't recreate the .cf for every minor
release update. If a sendmail upgrade doesn't also contain critical upgrades
on the .m4 files why should I recreate my sendmail.cf?


> In other words, sendmail fixes don't only happen to the sendmail binaries.
> Sometimes fixes are made to to macros.  By not building yout .cf from the
> new .mcs, you run the risk of using outdated macros.

So what? If it worked in the past why should it cease working today? You
can even use a .cf created on x.y.z for x.y+1.w most of the time.


>> security fix delivered in sendmail 8.13.6 is part of the binary, not the
>> configuration. I only recreate .cf files if I have a specific reason.
> 
> Upgrading to a new version of sendmail is a good sepcific reason, even if
> its only x.y.z to x.y.z+1.

That's why I installed the patch.


>> And why isn't this misfeature (sendmail.cf gets overwritten) documented
>> in the patch README?
> 
> No idea, though I agree it should be documented.


-- 
Daniel
0
Daniel
4/29/2006 6:14:41 PM
On Sat, 29 Apr 2006, Daniel Rock wrote:

> I do create .cf out of .mc, but don't recreate the .cf for every minor
> release update. If a sendmail upgrade doesn't also contain critical upgrades
> on the .m4 files why should I recreate my sendmail.cf?

No real reason, I guess, although I find easier to just remake the .cf
file than spend time checking to wee what's been updated.

> So what? If it worked in the past why should it cease working today? You
> can even use a .cf created on x.y.z for x.y+1.w most of the time.

Agreed, but just because it works, it doesn't mean it works correctly.
Presumably, if a macro definition is updated between one release and
another, there's a reason for doing so, and in that case it's desriable
to use the latest version.

-- 
Rich Teer, SCNA, SCSA, OpenSolaris CAB member

President,
Rite Online Inc.

Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
0
Rich
4/30/2006 5:03:11 PM
Rich Teer wrote:
> On Sat, 29 Apr 2006, Daniel Rock wrote:
> 
> 
>>I do create .cf out of .mc, but don't recreate the .cf for every minor
>>release update. If a sendmail upgrade doesn't also contain critical upgrades
>>on the .m4 files why should I recreate my sendmail.cf?
> 
> 
> No real reason, I guess, although I find easier to just remake the .cf
> file than spend time checking to wee what's been updated.
> 
> 
>>So what? If it worked in the past why should it cease working today? You
>>can even use a .cf created on x.y.z for x.y+1.w most of the time.
> 
> 
> Agreed, but just because it works, it doesn't mean it works correctly.
> Presumably, if a macro definition is updated between one release and
> another, there's a reason for doing so, and in that case it's desriable
> to use the latest version.
> 
In that case, it would be better for the patch to build sendmail.cf from
your customised sendmail.mc rather than blast over your sendmail.cf
with one which is guaranteed to be wrong (ok, unless you are lucky to
have clients which can operate using the default).

Certainly a dirty-great health warning is a least step.

Pete.
0
Peter
5/2/2006 7:03:56 AM
Reply: