Bug 78666 - postfix etc/* files are never updated...
Summary: postfix etc/* files are never updated...
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: postfix
Version: 8.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: John Dennis
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-11-27 13:10 UTC by Thomas M Steenholdt
Modified: 2007-04-18 16:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-06-12 19:47:03 UTC

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

Description Thomas M Steenholdt 2002-11-27 13:10:26 UTC
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 16:18:06 UTC
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 06:53:56 UTC
This is similar to Bug 74129

Comment 3 Petri T. Koistinen 2003-05-18 14:43:36 UTC
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 14:45:32 UTC
Created attachment 91771 [details]
My comment as patch

Comment 5 Petri T. Koistinen 2003-05-18 14:51:05 UTC
Created attachment 91772 [details]
Better patch, copies files always

Comment 6 John Dennis 2003-05-19 14:47:55 UTC
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 14:51:06 UTC
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.