Bug 156358

Summary: init script has a bug
Product: Red Hat Enterprise Linux 4 Reporter: Levente Farkas <lfarkas>
Component: postfixAssignee: Thomas Woerner <twoerner>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: managed
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.2.10-1.RHEL4.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-09 16:41:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Levente Farkas 2005-04-29 11:42:18 UTC
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):
2.1.5

How reproducible:
see baove

Steps to Reproduce:
1.
2.
3.
  
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 08:08:21 UTC
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 08:27:00 UTC
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 08:40:55 UTC
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 08:56:12 UTC
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 21:32:12 UTC
any progress???

Comment 6 Thomas Woerner 2005-11-11 14:22:22 UTC
Fixed in rawhide in package postfix-2.2.5-2.1, for now.

Comment 7 Thomas Woerner 2007-03-09 16:41:06 UTC
This has been fixed in U4 in package postfix-2.2.10-1.RHEL4.2.