Bug 156358 - init script has a bug
init script has a bug
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: postfix (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
Depends On:
  Show dependency treegraph
Reported: 2005-04-29 07:42 EDT by Levente Farkas
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.2.10-1.RHEL4.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-03-09 11:41:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Levente Farkas 2005-04-29 07:42:18 EDT
Description of problem:
this line of the script are wrong!:
/usr/sbin/postalias ${alias_database//,} 2>/dev/null
just try to use the following settings in your main.cf:
alias_database = hash:/etc/aliases, hash:$config_directory/aliases.lists
which is very common and corret while you not think about the usage of
$config_directory in this case

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

How reproducible:
see baove

Steps to Reproduce:
Actual results:
postfix/postalias[27541]: fatal: open /etc/aliases
hash:$config_directory/aliases.lists hash:$config_directory/aliases.groups: No
such file or directory

Expected results:
to works:-0

Additional info:
Comment 1 Anchor Systems Managed Hosting 2005-05-06 04:08:21 EDT
We are also experiencing this problem. It appears to be the same bug as
described in #139983 (Fedora Core 3) - related to the machine not being able to
resolve its own hostname.
Comment 2 Levente Farkas 2005-05-06 04:27:00 EDT
it has nothing to do with that bug. it's simple a error since the script can't
replace $config_directory to it's proper value (which is not so obvoius from a
shell script). it shoud lrun newalias without parameters (at let postfix find
the right values) rather then call postalias!
Comment 3 Anchor Systems Managed Hosting 2005-05-06 04:40:55 EDT
As far as I can tell $config_directory is not specified in /etc/init.d/postfix.
Furthermore newaliases also seg faults if run while the machine cannot resolve
its own hostname. It does not seem to matter what (if any) parameters are passed
to either postalias or newaliases, they will segfault every time until the
machine can resolve its own hostname.
Comment 4 Levente Farkas 2005-05-06 04:56:12 EDT
it seems you don't understand the problem here!
- it's legal (and advised) to use $config_directory in main.cf
- postalias parameters must be a valid path 
  /etc/postfix/aliases.lists is a valid path
  $config_directory/aliases.lists is NOT a valid path
so simple the init script writer of postfix do not think about it.
that's the problem!
Comment 5 Levente Farkas 2005-09-27 17:32:12 EDT
any progress???
Comment 6 Thomas Woerner 2005-11-11 09:22:22 EST
Fixed in rawhide in package postfix-2.2.5-2.1, for now.
Comment 7 Thomas Woerner 2007-03-09 11:41:06 EST
This has been fixed in U4 in package postfix-2.2.10-1.RHEL4.2.

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