Gentoo Archives: gentoo-user

From: Eray Aslan <eras@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] postfix: /etc/postfix/aliases or /etc/mail/aliases ?
Date: Mon, 12 Jul 2021 06:25:04
Message-Id: YOvgK03KkuVpQmf+@angelfall.a21an.org
In Reply to: [gentoo-user] postfix: /etc/postfix/aliases or /etc/mail/aliases ? by Adam Carter
1 On Mon, Jul 12, 2021 at 01:21:14PM +1000, Adam Carter wrote:
2 > The location is currently configured in main.cf;
3 > # postconf alias_maps
4 > alias_maps = hash:/etc/postifix/aliases
5
6 That's a non-default value. /etc/mail/aliases is the gentoo default.
7 Changing the default is fine but you need to let postfix create the db
8 file as well if you want to use /etc/postfix as your aliases location.
9
10 > And looks like the installer puts the original alias file there too, so I
11 > assume my config is per the default config;
12 > # qlist postfix | grep aliases
13 > /etc/postfix/aliases
14
15 yes postfix-install command places aliases file - along with a few
16 others - into standart configuration directory. It is somewhat of an
17 hassle to remove them as other commands expect at least some of them to
18 be present.
19
20 > But this;
21 > # grep aliases /lib/systemd/system/postfix.service
22 > ExecStartPre=-/usr/bin/newaliases
23 > ReadWritePaths=-/etc/mail/aliases.db
24 >
25 > Suggests that /etc/mail is the correct location, so i'm wondering if i
26 > missed an update to postfix.service. Can a postfix user please check their
27 > ReadWritePaths to see if it's /etc/mail/aliases.db or
28 > /etc/postfix/aliases.db ? Cheers.
29
30 Two options:
31 1/ use dafaults, i.e. /etc/mail/aliases
32 2/ use a custom location but then change postfix.service to give r/w
33 access to the new aliases.db location
34
35 I'd go with option #1 if you do not have a strong preference either way.
36
37 --
38 Eray

Replies

Subject Author
Re: [gentoo-user] postfix: /etc/postfix/aliases or /etc/mail/aliases ? Adam Carter <adamcarter3@×××××.com>