Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96016 - setting of alias_maps in postfix main.cf is in a non-intuitive location
Summary: setting of alias_maps in postfix main.cf is in a non-intuitive location
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-13 15:10 UTC by R. David Murray
Modified: 2006-03-02 10:40 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description R. David Murray 2005-06-13 15:10:59 UTC
I just spent about five hours banging my head against a wall trying
to figure out why my mailman install wasn't working; the messages
to the mailing list were getting bounced with no such user.  Tracing
the local delivery agent I saw that it wasn't looking at the mailman
aliases file even though I could clearly see it in my definition
of alias_maps in the section of the postfix main.cf file where it
talks about alias_maps.

Finally I thought to run postconf -n on alias_maps, and indeed the
mailman aliases were not there.  But I could see the definition.
Finally in desperation I grepped the /etc/postfix directory looking
for anywhere else alias_maps might be being set, and there it was,
near the bottom of the file among a bunch of other overrides.

If it is being overriden, I think it should be done at the location
in the main.cf file where the comments mention it, where a user
(experienced with postfix or not) would expect to find it.  It would
have saved me five hours and a lot of frustration.  I suspect the
other defines in that section ought to be moved, too, but I haven't
looked at them in detail.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




postfix-2.1.5-r2
Comment 1 Jan Kohnert 2005-06-14 05:00:02 UTC
I can confirm this one.

Also spent a lot of time till I figured out there were two alias_maps in main.cf.

Why is this one solved in such a way? IIRC, the original postfix main.cf does
not contain two alias_maps parameters.

BTW: I wrote the solution in the mailman-users list, so it should be
"google"able now.

Best regards Jan
Comment 2 Fernando J. Pereda (RETIRED) gentoo-dev 2005-06-14 05:16:10 UTC
It's a postconf bug rather... postconf doesn't see the

#alias_maps = whatever

lines, so it just adds a new one at the end of the file instead of uncommenting
or adding it next to them.

Maybe we should install a minimal main.cf file and install a main.cf.commented
or main.cf.distrib or something like that.

langthang, what do you think ?

Cheers,
Ferdy
Comment 3 Jan Kohnert 2005-06-14 05:27:06 UTC
(In reply to comment #2)
> It's a postconf bug rather... postconf doesn't see the
> 
> #alias_maps = whatever
> 
> lines, so it just adds a new one at the end of the file instead of
> uncommenting
> or adding it next to them.
> 
> Maybe we should install a minimal main.cf file and install a main.cf.commented
> or main.cf.distrib or something like that.

And what about just uncommenting one "alias_maps" line before installing?
Shouldn't be too difficult. 

Installing a minimal uncommented main.cf reminds me on SuSE and YaST... One
likes to edit such a file and never remembers why what changed and why it
doesn't work afterwards...

> Cheers,
> Ferdy

Best regards Jan
Comment 4 Fernando J. Pereda (RETIRED) gentoo-dev 2005-06-14 05:36:00 UTC
(In reply to comment #3)
> And what about just uncommenting one "alias_maps" line before installing?
> Shouldn't be too difficult. 

I don't say it's difficult... in fact it is pretty easy. But postconf is
(should) the way to go.

> Installing a minimal uncommented main.cf reminds me on SuSE and YaST... One
> likes to edit such a file and never remembers why what changed and why it
> doesn't work afterwards...

I normally use postconf to edit postfix config.. If you know what you do / edit,
then there is no problem using a minimal config file (imho).

Cheers,
Ferdy
Comment 5 Tuan Van (RETIRED) gentoo-dev 2005-06-14 06:45:24 UTC
in postfix-2.3 ebuild, we patched the hardcoded ALIAS_DB_MAP in
src/util/sys_defs.h. We can remove:
"alias_maps=hash:/etc/mail/aliases" \
"alias_database=hash:/etc/mail/aliases" \
but there are still
mail_spool_directory=
home_mailbox=
need to be fixed by run postconf. Sooner or later someone will file another bug
to complain about them too. Why don't you guy take this upstream?
Comment 6 Tuan Van (RETIRED) gentoo-dev 2006-03-02 10:40:24 UTC
the latest stable postfix doesn't insert "alias_*" line into /etc/potsfix/main.cf anymore. Close this bug then. Please reopen if you disagree.