Bug 138354 - postfix doesn't start due to multiple alias maps
postfix doesn't start due to multiple alias maps
Product: Fedora
Classification: Fedora
Component: postfix (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Woerner
Depends On:
  Show dependency treegraph
Reported: 2004-11-08 10:33 EST by Adrian Reber
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-23 08:06:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
init.d/postfix script fix (924 bytes, patch)
2004-11-23 07:38 EST, Adrian Reber
no flags Details | Diff

  None (edit)
Description Adrian Reber 2004-11-08 10:33:45 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020

Description of problem:
postfix doesn't start due to line 44 in the start script:

/usr/sbin/postalias "$alias_database" 2>/dev/null

$alias_database is in my configuration following:
$ postconf -h alias_database
hash:/etc/aliases, hash:/etc/postfix/majordomo,

resulting in following output of the start script:

+ alias_database='hash:/etc/aliases, hash:/etc/postfix/majordomo,
+ '[' -z 'hash:/etc/aliases, hash:/etc/postfix/majordomo,
hash:/etc/postfix/students_aliases' ']'
+ /usr/sbin/postalias 'hash:/etc/aliases, hash:/etc/postfix/majordomo,
+ '[' 1 -ne 0 ']'
+ failure 'postalias "hash:/etc/aliases, hash:/etc/postfix/majordomo,
+ rc=0
+ '[' -z '' ']'
+ initlog -q -n /etc/init.d/postfix -s 'postalias "hash:/etc/aliases,
hash:/etc/postfix/majordomo, hash:/etc/postfix/students_aliases"' -e 2

It looks like postalias can handle only one database at a time.

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

How reproducible:

Steps to Reproduce:
1. start postfix

Additional info:

My current workaround is to disable the alias generation in the start
Comment 1 Thomas Woerner 2004-11-11 06:39:05 EST
Fixed in an update for FC-3 (2.1.5-2.3.FC3) and in rawhide (2.1.5-3.1).
Comment 2 Adrian Reber 2004-11-23 07:18:28 EST
I am reopening this bug because I still get the same error:

Nov 23 13:20:44 rhlx01 postfix/postalias[26764]: fatal: open
/etc/aliases hash:/etc/postfix/majordomo
hash:/etc/postfix/students_aliases: No such file or directory
Nov 23 13:20:45 rhlx01 postfix: postalias "hash:/etc/aliases,
hash:/etc/postfix/majordomo, hash:/etc/postfix/students_aliases" failed

output from strace:
open("/etc/aliases, hash:/etc/postfix/majordomo,
hash:/etc/postfix/students_aliases", O_RDONLY) = -1 ENOENT (No such
file or directory)
write(2, "postalias: fatal: open /etc/alia"..., 128postalias: fatal:
open /etc/aliases, hash:/etc/postfix/majordomo,
hash:/etc/postfix/students_aliases: No such file or directory
) = 128
Comment 3 Adrian Reber 2004-11-23 07:38:18 EST
Created attachment 107291 [details]
init.d/postfix script fix

The attached patch fixes it for me.
Comment 4 Thomas Woerner 2004-11-23 08:06:07 EST
It is sufficient to remove the double quotes from the postalias call:

- /usr/sbin/postalias "${alias_database//,}" 2>/dev/null
+ /usr/sbin/postalias ${alias_database//,} 2>/dev/null

Fixed in rawhide (2.1.5-4.1) and in an update package for FC-3
Comment 5 Adrian Reber 2004-11-23 09:08:44 EST
This does work and is a lot shorter :-)

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