Bad postfix package
The Postfix package seems to be a little dodgy, changes made which seem to go against the grain of Postfix.
For example, setting some directories to postifx owned when Postfix expecting to be owned as root:
mail.warn postfix/postfix-script[6967]: warning: not owned by root: /var/spool/postfix/.
mail.warn postfix/postfix-script[6968]: warning: not owned by root: /var/spool/postfix/pid
But worse seems to be compiling with custom directories with no thought to Postfix expectations.
For example, running:
postmulti -e init
Yields an error message:
postmulti: fatal: instance /etc/postfix, shlib_directory=/usr/lib/postfix conflicts with instance /etc/postfix, daemon_directory=/usr/lib/postfix
This is what the Alpine compiled default directories look like:
# postconf -d | fgrep "_directory ="
command_directory = /usr/sbin
command_execution_directory =
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
html_directory = no
mail_spool_directory = /var/mail
manpage_directory = /usr/local/man
meta_directory = /etc/postfix
process_id_directory = pid
queue_directory = /var/spool/postfix
readme_directory = no
require_home_directory = no
sample_directory = /etc/postfix
shlib_directory = /usr/lib/postfix
This is what an “out of the box” standard compile looks like:
$ ./bin/postconf -d | fgrep "_directory ="
command_directory = /usr/sbin
command_execution_directory =
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
html_directory = no
mail_spool_directory = /var/mail
manpage_directory = /usr/local/man
meta_directory = /etc/postfix
process_id_directory = pid
queue_directory = /var/spool/postfix
readme_directory = no
require_home_directory = no
sample_directory = /etc/postfix
shlib_directory = no
The reason for the error message on Alpine is as described here: http://postfix.1071664.n5.nabble.com/postmulti-fatal-error-with-3-0-0-td74946.html
In Wietse Venema’s own words:
“DO NOT set daemon_directory the same as shlib_directory”
And yet, what are the Alpine package maintainers doing ? Yup, that’s right. Setting daemon_directory and shlib_directory as the same thing.
(from redmine: issue id 9335, created on 2018-08-24, closed on 2019-05-04)
- Relations:
- relates #9356 (closed)
- Changesets:
- Revision 36a0f13a by Natanael Copa on 2018-08-27T09:40:00Z:
main/postfix: fixes for postmulti and permissions
move daemon_directory to /usr/libexec. Upstream recommends that
shlib_directory should not be the same as shlib_directory.
include *.proto files in /etc/postfix instead of doc dir. Those are
needed by postmulti.
fix permsions. The following dirs should be owned by root:
/var/spool/postfix
/var/spool/postfix/pid
ref #9335
- Revision f83e779c by Natanael Copa on 2018-08-29T08:18:12Z:
main/postfix: preserve permission of /var/spool/postfix
Do not create the homedir when creating 'postfix' user. This is so we
keep the permissions of /var/spool/postfix from apk.
fixes #9335