Your message dated Sat, 16 Feb 2019 11:39:58 +0000
with message-id <[email protected]>
and subject line Bug#854331: fixed in postfix 3.3.2-2
has caused the Debian Bug report #854331,
regarding postfix.postinst trying to start postfix daemon before postfix user 
created
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
854331: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854331
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: postfix
Version: 3.1.4-4
X-Debbugs-Cc: [email protected]
Tags: patch

hi,


when i install postfix to a freshly installed (with our custom
debootstrap+saltstack process, but as far as i can tell that doesn't
make a difference here), the postinst script fails to start because the
"posfix" user doesn't exist on the system yet:

# apt install postfix
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libcdb-dev libcdb1 liblmdb-dev libsasl2-dev linux-image-amd64
Use 'apt autoremove' to remove them.
Suggested packages:
  postfix-mysql postfix-pgsql postfix-ldap postfix-pcre postfix-lmdb sasl2-bin 
dovecot-common resolvconf postfix-cdb ufw postfix-doc
The following NEW packages will be installed:
  postfix
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1,435 kB of archives.
After this operation, 4,010 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package postfix.
(Reading database ... 918427 files and directories currently installed.)
Preparing to unpack .../postfix_3.1.4-4_amd64.deb ...
Unpacking postfix (3.1.4-4) ...
Processing triggers for systemd (232-15) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for rsyslog (8.24.0-1) ...
Setting up postfix (3.1.4-4) ...
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → 
/etc/systemd/system/postfix.service.
Job for postfix.service failed because the control process exited with error 
code.
See "systemctl status postfix.service" and "journalctl -xe" for details.
invoke-rc.d: initscript postfix, action "start" failed.
● postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/etc/systemd/system/postfix.service; enabled; vendor preset: 
enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2017-02-06 
03:25:57 CET; 7ms ago
  Process: 16928 ExecStart=/usr/sbin/postfix start (code=exited, 
status=1/FAILURE)
  Process: 16924 ExecStartPre=/bin/cp /etc/services 
/var/spool/postfix/etc/services (code=exited, status=0/SUCCESS)
  Process: 16916 ExecStartPre=/bin/cp /etc/resolv.conf 
/var/spool/postfix/etc/resolv.conf (code=exited, status=0/SUCCESS)

Feb 06 03:25:57 faui03m systemd[1]: Failed to start Postfix Mail Transport 
Agent.
Feb 06 03:25:57 faui03m systemd[1]: postfix.service: Unit entered failed state.
Feb 06 03:25:57 faui03m systemd[1]: postfix.service: Failed with result 
'exit-code'.
dpkg: error processing package postfix (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (232-15) ...
Processing triggers for rsyslog (8.24.0-1) ...
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)


# getent passwd postfix
# getent group postfix



steps to reproduce: debootstrap stretch; install postfix
expected outcome: postfix creating appropriate users+cfg files
actual outcome: postfix fails in postinst before creating user/group

the problem seems to be that the "#DEBHELPER#" magic inserted at line
200f. of postfix.postinst contains the following snippet:


# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
        if [ -x "/etc/init.d/postfix" ]; then
                update-rc.d postfix defaults >/dev/null
                invoke-rc.d postfix start || exit $?
        fi
fi
# End automatically added section

which tries to start the postfix daemon before all the config setup is
finished.

the attached patch moves the "#DEBHELPER#" line all the way to the
bottom of postfix.postinst, which does fix the problem for us, but i'm
not certain enough to understand the .postinst and especially the
debhelper magic to know this simple fix doesn't introduce new problems.



regards,
   johannes schilling
diff --git a/postfix.postinst b/postfix.postinst
index b413a50..43f4500 100644
--- a/postfix.postinst
+++ b/postfix.postinst
@@ -197,8 +197,6 @@ umask 022
 
 # postinst processing
 
-#DEBHELPER#
-
 case "$1" in
     configure)
        OLDVERSION="$2"
@@ -674,3 +672,5 @@ if [ "$mailer" != "No configuration" ] || [ -f /etc/postfix/main.cf ]; then
        fi
     fi
 fi
+
+#DEBHELPER#

--- End Message ---
--- Begin Message ---
Source: postfix
Source-Version: 3.3.2-2

We believe that the bug you reported is fixed in the latest version of
postfix, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Scott Kitterman <[email protected]> (supplier of updated postfix package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 16 Feb 2019 03:22:11 -0500
Source: postfix
Binary: postfix postfix-cdb postfix-cdb-dbgsym postfix-dbgsym postfix-doc 
postfix-ldap postfix-ldap-dbgsym postfix-lmdb postfix-lmdb-dbgsym postfix-mysql 
postfix-mysql-dbgsym postfix-pcre postfix-pcre-dbgsym postfix-pgsql 
postfix-pgsql-dbgsym postfix-sqlite postfix-sqlite-dbgsym
Architecture: source amd64 all
Version: 3.3.2-2
Distribution: unstable
Urgency: medium
Maintainer: LaMont Jones <[email protected]>
Changed-By: Scott Kitterman <[email protected]>
Description:
 postfix    - High-performance mail transport agent
 postfix-cdb - CDB map support for Postfix
 postfix-doc - Documentation for Postfix
 postfix-ldap - LDAP map support for Postfix
 postfix-lmdb - LMDB map support for Postfix
 postfix-mysql - MySQL map support for Postfix
 postfix-pcre - PCRE map support for Postfix
 postfix-pgsql - PostgreSQL map support for Postfix
 postfix-sqlite - SQLite map support for Postfix
Closes: 606022 756348 854331 908545 917512 919444 920356
Changes:
 postfix (3.3.2-2) unstable; urgency=medium
 .
   [Scott Kitterman]
 .
   * Move #DEBHELPER# token to the end of postfix.postinst so package
     configuration completes prior to #DEBHELPER# provided snippets being
     executed.  Closes: #854331
   * Backport bugfix from 3.4 (devel) to fix case folding when smtputf8 is
     enabled.  Closes: #917512
   * Add note on milter settings to README.Debian.  Closes: #756348
   * Update postfix suggests to make it clearer that cyrus and dovecot are
     alternatives for SASL.  Closes: #606022
   * Add detailed smarthost instructions to README.Debian.  Thanks to Celejar
     for the input.  Closes: #919444
   * Set lmtp(8) to forward to the correct smtp(8) name for Debian.
     Closes: #920356
   * Bump standards-version to 4.3.0 without further change.
 .
   [Christian Ehrhardt]
 .
   * Make makedefs.out no longer be a conffile but still keep it available for.
     postfix check.  Closes: #908545
Checksums-Sha1:
 a81a8369f0a248bb8550b96010e92dd2f83219d9 2712 postfix_3.3.2-2.dsc
 5d57e18a0377485922555890b38aa11bf8f7ed02 197488 postfix_3.3.2-2.debian.tar.xz
 44a3153146dc28c9be4ee4094a8b8f13dea276a2 11616 
postfix-cdb-dbgsym_3.3.2-2_amd64.deb
 aa452bbbd3c8ccc10e9835c9e1bb76ea02b664fd 327384 postfix-cdb_3.3.2-2_amd64.deb
 80c73a1ae30c1db682bd9c12b4a0da792440876b 2943164 
postfix-dbgsym_3.3.2-2_amd64.deb
 963a4e08ebafe760749fd1530e3c2f9355cc7128 1194556 postfix-doc_3.3.2-2_all.deb
 a0c22e42551c3fda9bca6d56664909016a45c8ce 23120 
postfix-ldap-dbgsym_3.3.2-2_amd64.deb
 d71fc759fcd1370c3b7ad34731d01c063dac95ec 344864 postfix-ldap_3.3.2-2_amd64.deb
 d995d66eea41985f8952d82f60b8a003dcdde487 28524 
postfix-lmdb-dbgsym_3.3.2-2_amd64.deb
 664464240d388cc55e86569e0241391e87d53007 332580 postfix-lmdb_3.3.2-2_amd64.deb
 e98c147fb8268bee1ca10d807c308cd9a8805f3b 25100 
postfix-mysql-dbgsym_3.3.2-2_amd64.deb
 4c7d4f186dccb7eb6b546b23daa99ab49bc5d1f2 335196 postfix-mysql_3.3.2-2_amd64.deb
 a70ee7f5bb274dfe3cdb28c82df9478190ad063d 15376 
postfix-pcre-dbgsym_3.3.2-2_amd64.deb
 4de0fea3218097a2cd6dbc184fe19f70b019b471 333064 postfix-pcre_3.3.2-2_amd64.deb
 8de55ea37182df16c457194243a52e8de3f1634e 14476 
postfix-pgsql-dbgsym_3.3.2-2_amd64.deb
 05e607678dc03cd39513275543c3ebcd0bfc25d8 333820 postfix-pgsql_3.3.2-2_amd64.deb
 64033a770024053a5b844dade90bc82d01f40703 8360 
postfix-sqlite-dbgsym_3.3.2-2_amd64.deb
 f0bd8ab058d3a46521def585efba4f016fda48a5 330820 
postfix-sqlite_3.3.2-2_amd64.deb
 236f538b54f5f5760befd1cade1f2c0cd5d7d3f3 10448 postfix_3.3.2-2_amd64.buildinfo
 239550037d57cbdbcef0f5952317b8c752f93348 1456836 postfix_3.3.2-2_amd64.deb
Checksums-Sha256:
 62a4e05607a4fd0ecf8e8a5ee69e80a194f6442380e30abb54f1ccb65651fba1 2712 
postfix_3.3.2-2.dsc
 1eadfbe48efaf875a97514a0099c52c2b730ed85de00bca99d3b1debe0a9b86d 197488 
postfix_3.3.2-2.debian.tar.xz
 a77b1afa5872edf60e9897de2b198dfdb86358a91d2059571f4099b3ed01bc6f 11616 
postfix-cdb-dbgsym_3.3.2-2_amd64.deb
 4c0fe8fe4cd29a2a6c0f090e718339d21eb313d0efda19eef3b8a7d578b3e145 327384 
postfix-cdb_3.3.2-2_amd64.deb
 24feb48d2c9e9e6b2ad7b85018d5e01c52ab2b8a6a193833c1d1e443723185b5 2943164 
postfix-dbgsym_3.3.2-2_amd64.deb
 d21f41116722657bac0234c2694a8cd3fe64e3e7b9ee657afb059464e11bfbab 1194556 
postfix-doc_3.3.2-2_all.deb
 5852b3d02706beddc1c47616acca2c6bd6496cdbb69a6987a7623d5ea77042bd 23120 
postfix-ldap-dbgsym_3.3.2-2_amd64.deb
 cca5379a65b90b7fe3f7a03f67542fa0fa5d8e214629c47c2fb6279aea60fbad 344864 
postfix-ldap_3.3.2-2_amd64.deb
 01cff7b4d78eeb9ecbb44ebfd97973406afa30db63df90b89418e0888609a15e 28524 
postfix-lmdb-dbgsym_3.3.2-2_amd64.deb
 b3b4d0ea546d56fe26bb97fa4d6fbaf340bac867d89a9675150cd702a91ac8df 332580 
postfix-lmdb_3.3.2-2_amd64.deb
 ce94355ebaa5b7403c42d63a4656bbe705bd8d0a610bed3e8015a311792e6c8d 25100 
postfix-mysql-dbgsym_3.3.2-2_amd64.deb
 bfffe96ad1eb9e28e821f3f6a5dfaa3efe6bddfcf7804f5a84def6f870199a3a 335196 
postfix-mysql_3.3.2-2_amd64.deb
 3766228ed3ff92dc65ab78f90fef021fac7b417af0796d63aa851f8f7e154c28 15376 
postfix-pcre-dbgsym_3.3.2-2_amd64.deb
 7662366a2f2fe06921d4880eb65e1b73424b6e24958077fcc3277e1352185ac4 333064 
postfix-pcre_3.3.2-2_amd64.deb
 9ea580bf96c9a745381913fa2e4276419b86b8e3ba251952f706171afd8fe670 14476 
postfix-pgsql-dbgsym_3.3.2-2_amd64.deb
 bb6a065714075a9d26d84e17966ab89c0144bcc709c69907c71444d2f5443fab 333820 
postfix-pgsql_3.3.2-2_amd64.deb
 4026c0ff2937872f0884c5b43bca2ce9d107dc92d4ad5434bc0b54014858436b 8360 
postfix-sqlite-dbgsym_3.3.2-2_amd64.deb
 6419553bf3ca1f7e7c1512f7f3cec766cda7b5084721bf907809bb4f58c057ee 330820 
postfix-sqlite_3.3.2-2_amd64.deb
 0f0cfad4c7d906d8d4869282ec8f7fa457387d2efce11dee4075cac300870afe 10448 
postfix_3.3.2-2_amd64.buildinfo
 daf82dca13f0960eaa5ff10e6a4734a44e90262d8daa98d24bafa3d8cfdb59e7 1456836 
postfix_3.3.2-2_amd64.deb
Files:
 132cccaf534024e541716b479fc83abe 2712 mail optional postfix_3.3.2-2.dsc
 da816fd765c38cd3499c9d38ebe5cfe8 197488 mail optional 
postfix_3.3.2-2.debian.tar.xz
 819deb478a50971c0c84eb44e27847c8 11616 debug optional 
postfix-cdb-dbgsym_3.3.2-2_amd64.deb
 97f9454213e958769fb659ad80523874 327384 mail optional 
postfix-cdb_3.3.2-2_amd64.deb
 c6001ff785e959417614140c32948ea1 2943164 debug optional 
postfix-dbgsym_3.3.2-2_amd64.deb
 0311ffab371a8bbff589bed0fef89bce 1194556 doc optional 
postfix-doc_3.3.2-2_all.deb
 c0756c8213cfcd56e72403e2f01c4557 23120 debug optional 
postfix-ldap-dbgsym_3.3.2-2_amd64.deb
 a830283c6242fd2e7129cb4b43222491 344864 mail optional 
postfix-ldap_3.3.2-2_amd64.deb
 8286d4053a2f88be1435417f3293f161 28524 debug optional 
postfix-lmdb-dbgsym_3.3.2-2_amd64.deb
 92c201bb48b1af38026a8e072a41095c 332580 mail optional 
postfix-lmdb_3.3.2-2_amd64.deb
 fc895d875f6a2eb6c498235154c543f9 25100 debug optional 
postfix-mysql-dbgsym_3.3.2-2_amd64.deb
 b5057555a68dda7dea9a6abdfaf0e1e5 335196 mail optional 
postfix-mysql_3.3.2-2_amd64.deb
 f14c59e0e3c1cebfd85842798f94069e 15376 debug optional 
postfix-pcre-dbgsym_3.3.2-2_amd64.deb
 d014459847d849bc9c2839f134c12649 333064 mail optional 
postfix-pcre_3.3.2-2_amd64.deb
 fe56c8485d8230fa87dc23c95d6494c7 14476 debug optional 
postfix-pgsql-dbgsym_3.3.2-2_amd64.deb
 5874f2ec4f1ea532421a8c4ef3bb4e1f 333820 mail optional 
postfix-pgsql_3.3.2-2_amd64.deb
 145a6b5aee809ff071b1e15e70689013 8360 debug optional 
postfix-sqlite-dbgsym_3.3.2-2_amd64.deb
 adc0e8ad0e5deb9375351bee5ea574ed 330820 mail optional 
postfix-sqlite_3.3.2-2_amd64.deb
 7d67b8ae214ccfc7d240208fb47c61c1 10448 mail optional 
postfix_3.3.2-2_amd64.buildinfo
 8d1e9bb473d927e7bfeffbf2e1730be6 1456836 mail optional 
postfix_3.3.2-2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJcZ9exAAoJEHjX3vua1ZrxFM4P/2gjK4+itP5QrTxe+DPaqkJi
lzKwWExwuM5sk1hoePgiPdmqMM41facUdpl7itbuL7JNwuVGT+5t31+RQ3Sn5BCV
b8yJNdXeWOSfp9uVhEEIT1bJKEEIVWjy/2wP0OQFnjtFjkpaooDRzOkjFUUWFtvp
YwfvcuRBSNRWMGX/cRax0daxkn9cNGqXlTDvKBqiJpu3bhbfUHP3p4j1mDwSOxZ+
34mclbgVTVy1xNdi8DAA/7rtoxlZhSa92L/d2r+uisJ1iwCj4A4xxy9cImNDsIhK
hoZz+80PkN90CoGjWVwJHOC3k/tmOvTLGM/P++fQJBZ9e6WVRs63AVbqDT9YsW6U
fBZDjJxItCDeXKoDbe1MIu2MvN7K0aXOHfA1grl+8q2biFQwimAz70KEaga18DTm
9GxFtM7kmVzE5zVm1Affc4QiMvkaK5vROCL3BngetriDjkhaHNeU4KRZtBUMQ9br
4Ehf5s9bOsutNR/fu9Vc10mYdmNNZ6noj5eZdVpmOQChtSEGxS1MRs6+4RRpFmfH
c4c0gTDkVIG4xmSw5sf/PVCDENkHNCJzyX6492jcmQigfc1fP2ALmJqk/DzfwGo9
FUbn3ws/hia6twpei+1d4IgJxT46A1ahSvF8bhSiUu5JN5SsqLAG20DCuL2nd7Um
A01w5ePxuVbEhv8uw/c4
=PlIH
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to