Bug 78666 - postfix etc/* files are never updated...
postfix etc/* files are never updated...
Product: Red Hat Linux
Classification: Retired
Component: postfix (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: John Dennis
Depends On:
  Show dependency treegraph
Reported: 2002-11-27 08:10 EST by Thomas M Steenholdt
Modified: 2007-04-18 12:48 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-06-12 15:47:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
My comment as patch (438 bytes, patch)
2003-05-18 10:45 EDT, Petri T. Koistinen
no flags Details | Diff
Better patch, copies files always (529 bytes, patch)
2003-05-18 10:51 EDT, Petri T. Koistinen
no flags Details | Diff

  None (edit)
Description Thomas M Steenholdt 2002-11-27 08:10:26 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2) Gecko/20021126

Description of problem:
when postfix is installed, hard links and copies are created for a lot of libs
and configuration files - among these are: /var/spool/postfix/etc/localtime

then during postfix startup, the following file is copied
/etc/resolv.conf -> /var/spool/postfix/etc/resolv.conf

but this only happens if the resolv.conf file does NOT exist in the postfix /etc
dir... This means, that if your system is for instance running dhcp or you just
need to change DNS servers or options in resolv.conf, the the postfix
configuration becomes invalid.

i guess the same goes for the localtime file - i saw a problem with this one
before, where an error in the maillog said /etc/localtime is newer than
/var/spool/postfix/etc/localtime (or something like that)

the services file too??? it probably doesn't change that much but if it does(but
the means of an rpm update etc.), will the hard link still work? probably not!

I think that the resolv.conf file should be copied at server start regardless of
what's in the postfix etc dir at the time... And localtime too. I guess i'd put
the services file in there together with the two other files but i'll leave that
up to you.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. install rh 8 without entering dns servers
2. switch to postfix using redhat-switchmail
3. configure postfix to use "relayhost smtp.server.somewhere.com"
4. start postfix
5. notice that postfix can't resolve the relayhost
6. add your dns servers to /etc/resolv.conf
7. restart postfix
5. notice that postfix will still not be able to resolve the relayhost

Actual Results:  the resolv.conf localtime and services file en the postfix
chrooted etc dir are not properly kept in sync with the files in /etc

Expected Results:  the resolv.conf localtime and services file en the postfix
chrooted etc dir should be properly kept in sync with the files in /etc

Additional info:
Comment 1 Nigel C. Cox 2002-12-19 11:18:06 EST
It is not desirable that postfix etc/* contain the current system settings.
I have several installations that require this to be the case.
Perhaps a switch (probably more suited to postfix dev) to link the postfix 
etc/* files exactly with the system versions?
Comment 2 Chris Ricker 2003-01-10 01:53:56 EST
This is similar to Bug 74129
Comment 3 Petri T. Koistinen 2003-05-18 10:43:36 EDT
For RHL 9 add this:

$ diff -u /etc/init.d/postfix.orig /etc/init.d/postfix
--- /etc/init.d/postfix.orig    2003-05-18 17:41:07.000000000 +0300
+++ /etc/init.d/postfix 2003-05-18 17:41:37.000000000 +0300
@@ -36,6 +36,7 @@
        echo -n "Starting postfix: "
        if [ ! -e /var/spool/postfix/etc/resolv.conf ]; then
                cp -f /etc/resolv.conf /var/spool/postfix/etc
+               cp -f /etc/localtime /var/spool/postfix/etc
        /usr/sbin/postalias /etc/postfix/aliases
        /usr/sbin/postfix start 2>/dev/null 1>&2 && success || failure
Comment 4 Petri T. Koistinen 2003-05-18 10:45:32 EDT
Created attachment 91771 [details]
My comment as patch
Comment 5 Petri T. Koistinen 2003-05-18 10:51:05 EDT
Created attachment 91772 [details]
Better patch, copies files always
Comment 6 John Dennis 2003-05-19 10:47:55 EDT
Note, the current postfix rpm no longer runs postfix in a chroot jail, this
alevates a lot of these types of problems.
Comment 7 Petri T. Koistinen 2003-05-19 10:51:06 EDT
John Dennis: Great. Do you read by the way the postfix-users@postfix.org mailing

Note You need to log in before you can comment on or make changes to this bug.