Package: postfix Version: 3.2.2-1 Severity: normal Tags: patch Dear Maintainer,
* What led up to the situation? trying to use multiple instances as stated in README.Debian. * What exactly did you do (or not do) that was effective (or ineffective)? systemctl enable postfix@myinstance.service systemctl start postfix * What was the outcome of this action? only the 'main' Postfix instance was started * What outcome did you expect instead? the instance 'myinstance' should also have been started (at least that's how I understand README.Debian) The following fix worked for me: ------------------------------------------------------------------------- --- /lib/systemd/system/post...@.service.orig 2017-06-17 19:57:19.000000000 +0200 +++ /lib/systemd/system/postfix@.service 2017-09-01 16:18:43.569388300 +0200 @@ -16,4 +16,4 @@ ExecReload=/usr/sbin/postmulti -i %i -p reload [Install] -WantedBy=multi-user.target +WantedBy=postfix.service ------------------------------------------------------------------------- Now 'systemctl start postfix' starts and stops all enabled instances of postfix. However digging deeper into the possibilities of systemd there seems to be an even better way to handle multiple instances! Provided with postfix is a systemd-generator file in /lib/systemd/system-generators/postfix-instance-generator which takes care of the multi instance handling. At first it did not work for me but applying this small change: ------------------------------------------------------------------------- --- /lib/systemd/system-generators/postfix-instance-generator.orig 2017-06-17 20:10:34.000000000 +0200 +++ /lib/systemd/system-generators/postfix-instance-generator 2017-09-01 16:24:54.723601375 +0200 @@ -7,7 +7,7 @@ mkdir -p "$WANTDIR" -if [ -f main.cf ]; then +if [ -f /etc/postfix/main.cf ]; then for NAME in $(postmulti -l -a | awk '{ print $1}'); do ln -s "$SERVICEFILE" "$WANTDIR/postfix@$NAME.service" done ------------------------------------------------------------------------- makes it behave as expected for me. It then creates symlinks in /run/systemd/generator/postfix.service.wants/... which makes the 'systemd enable postfix@myinstance.service' command completely unnecessary. Would be nice to have that alternative documented in README.Debian, maybe even replacing the 'enable' variant because for me it looks more elegant. Thanks for considering applying my patches and your time in maintaining the postifx package! -- System Information: Debian Release: buster/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.12.0-1-amd64 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages postfix depends on: ii adduser 3.116 ii cpio 2.11+dfsg-6 ii debconf 1.5.63 ii dpkg 1.18.24 ii init-system-helpers 1.49 ii libc6 2.24-17 ii libdb5.3 5.3.28-13.1 ii libicu57 57.1-6 ii libsasl2-2 2.1.27~101-g0780600+dfsg-3 ii libssl1.1 1.1.0f-5 ii lsb-base 9.20170808 ii netbase 5.4 ii ssl-cert 1.0.39 Versions of packages postfix recommends: ii python3 3.5.3-3 Versions of packages postfix suggests: ii bsd-mailx [mail-reader] 8.1.2-0.20160123cvs-4 pn dovecot-common <none> ii libsasl2-modules 2.1.27~101-g0780600+dfsg-3 pn postfix-cdb <none> pn postfix-doc <none> pn postfix-ldap <none> pn postfix-lmdb <none> pn postfix-mysql <none> pn postfix-pcre <none> pn postfix-pgsql <none> ii postfix-sqlite 3.2.2-1 ii procmail 3.22-25+b1 ii resolvconf 1.79 pn sasl2-bin <none> pn ufw <none> -- Configuration Files: /etc/rsyslog.d/postfix.conf [Errno 2] No such file or directory: '/etc/rsyslog.d/postfix.conf' -- debconf information: * postfix/db2_db3_upgrade: true postfix/main_cf_conversion_warning: true * postfix/mailbox_limit: 0 * postfix/rfc1035_violation: false postfix/kernel_version_warning: postfix/protocols: all * postfix/master_upgrade_warning: false * postfix/main_mailer_type: Local only * postfix/world_writable_maildrop: false postfix/bad_recipient_delimiter: * postfix/recipient_delim: postfix/tlsmgr_upgrade_warning: postfix/sqlite_warning: postfix/retry_upgrade_warning: postfix/lmtp_retired_warning: true * postfix/relayhost: postfix/not_configured: * postfix/nqmgr_upgrade_warning: false postfix/compat_conversion_warning: true * postfix/procmail: false postfix/relay_restrictions_warning: * postfix/mailname: faiclient.sgs.dfn.de * postfix/destinations: sid-amd64-dev.srv.dfn.de, localhost.srv.dfn.de, localhost postfix/dynamicmaps_conversion_warning: * postfix/chattr: false * postfix/dynamicmaps_upgrade_warning: false * postfix/root_address: NONE * postfix/append_dot_mydomain: false * postfix/db_upgrade_warning: false postfix/mydomain_warning: * postfix/mynetworks: 127.0.0.0/8 [::1]/128