cannot create multi postfix instance by postmulti command

Bug #1595096 reported by qiuyingbo
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
postfix (Debian)
Fix Released
Unknown
postfix (Ubuntu)
Fix Released
Medium
Jon Grimm
Declined for Yakkety by Nish Aravamudan
Xenial
Fix Released
Medium
Jon Grimm

Bug Description

On ubuntu 16.04 xenial,postfix 3.1.0-3

postfix/postmulti-script: fatal: Missing main.cf prototype: /etc/postfix/main.cf.proto

SRU Template:

[Impact]

 * postmulti is broken for all intents and purposes without working around the missing cf prototypes.

 * This fix simply copies master/main.cf prototypes from /usr/share/postfix/ to where postmulti expects them.

 * Note: The issue can be worked around manually copying proto files appropriately to make the postmulti script happy.

[Test Case]

 * detailed instructions how to reproduce the bug

Broken looks like:

root@x1:/home/ubuntu# postmulti -e init
root@x1:/home/ubuntu# postmulti -I postfix-example -G mta -e create
postfix/postmulti-script: fatal: Missing main.cf prototype: /etc/postfix/main.cf.proto

When fixed:

root@x1:/home/ubuntu# postmulti -e init
root@x1:/home/ubuntu# postmulti -I postfix-example -G mta -e create
root@x1:/home/ubuntu# postmulti -l
- - y /etc/postfix
postfix-example mta n /etc/postfix-example

[Regression Potential]

 * I've tested the break and fix on xenial and yakkety.

 * This path is entirely broken right now, so regression risk no worse than current situation as fix is simply copying the missing proto cf file into the expected location.

[Other Info]

 * Fix backported from debian. Already fixed in the postfix version in zesty.

Revision history for this message
Bob Jones (r-a-n-d-o-m-d-e-v-4+ubuntu) wrote :

Anybody home ? Any movement on this one guys ???

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in postfix (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
Thank you for taking the time to report this bug and helping to make Ubuntu better.

I have found no step is taken on removing them in debian/rules so I wonder why they are not there - they might not be part of the default install? Yet I haven't had a lot of time to look into it.

This bug is present in Debian too, and Ubuntu currently tries to minimize changes over the Debian package. So IMHO this bug would be best fixed directly in Debian, and then Ubuntu will pick up the fix automatically.

Would you mind filing a bug with Debian please?

When reporting there, but it would also be nice here please could you be so kind to add a bit more to reproduce this. How did you configure your system, how do you call the program and such.
As for this example /usr/lib/postfix/sbin/postmulti-script doesn't want to be directly called and basic things like "postmulti -l" or even "postmulti -p start" work.

Changed in postfix (Ubuntu):
status: Confirmed → Incomplete
tags: added: needs-upstream-report
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

To be correct we would not pick up the fix automatically but on next merge as - while getting less - we still have a delta.

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 1595096] Re: cannot create multi postfix instance by postmulti command

On Friday, September 09, 2016 06:21:34 AM you wrote:
> To be correct we would not pick up the fix automatically but on next
> merge as - while getting less - we still have a delta.

No, currently there is no delta. Also, please don't file a bug in Debian as I
believe this was fixed in postfix 3.1.0-3.1, which is newer than what 16.04
already had.

Revision history for this message
Bob Jones (r-a-n-d-o-m-d-e-v-4+ubuntu) wrote :

@ChristianEhrhardt

In my case, this is a brand new, fresh install of 16.04LTS

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"

Command was :

postmulti -I postfix-example -G postfix -e create config_directory=/etc/postfix-example queue_directory=/var/spool/postfix-example data_directory=/var/lib/postfix-example

Package: postfix
Status: install ok installed
Priority: extra
Section: mail
Installed-Size: 3610
Maintainer: LaMont Jones <email address hidden>
Architecture: amd64
Version: 3.1.0-3
Replaces: mail-transport-agent
Provides: default-mta, mail-transport-agent
Depends: libc6 (>= 2.14), libdb5.3, libicu55 (>= 55.1-1~), libsasl2-2, libsqlite3-0 (>= 3.5.9), libssl1.0.0 (>= 1.0.0), debconf (>= 0.5) | debconf-2.0, netbase, adduser (>= 3.48), dpkg (>= 1.8.3), lsb-base (>= 3.0-6), ssl-cert, cpio
Recommends: python3
Suggests: procmail, postfix-mysql, postfix-pgsql, postfix-ldap, postfix-pcre, sasl2-bin, libsasl2-modules, dovecot-common, resolvconf, postfix-cdb, mail-reader, ufw, postfix-doc
Conflicts: libnss-db (<< 2.2-3), mail-transport-agent, smail
Conffiles:
 /etc/init.d/postfix a749ca975db772edde8499272dc78d12
 /etc/insserv.conf.d/postfix 7fe2d086ff4822fc9fe13adab1090dce
 /etc/network/if-down.d/postfix 52275dc23864f3bfca412c7558e28fe6
 /etc/network/if-up.d/postfix fccc53fc4eeeab46941ebcc95a71e766
 /etc/postfix/post-install ed83d3b1b6cbd8e30067e7c9a79fa50f
 /etc/postfix/postfix-files 2a3bc26e39035de74291c3a900a9797f
 /etc/postfix/postfix-script f684687fc7c48dc8192dafb85d32794c
 /etc/ppp/ip-down.d/postfix 52275dc23864f3bfca412c7558e28fe6
 /etc/ppp/ip-up.d/postfix fccc53fc4eeeab46941ebcc95a71e766
 /etc/resolvconf/update-libc.d/postfix a0548352443659052ed16d4ae7314506
 /etc/rsyslog.d/postfix.conf d8a09827fff2a22311e4dd4a83e95c83
 /etc/ufw/applications.d/postfix 5c7e746dc9255e750b8f50460de11a32
Description: High-performance mail transport agent
 Postfix is Wietse Venema's mail transport agent that started life as an
 alternative to the widely-used Sendmail program. Postfix attempts to
 be fast, easy to administer, and secure, while at the same time being
 sendmail compatible enough to not upset existing users. Thus, the outside
 has a sendmail-ish flavor, but the inside is completely different.
Homepage: http://www.postfix.org

Revision history for this message
Bob Jones (r-a-n-d-o-m-d-e-v-4+ubuntu) wrote :

"I believe this was fixed in postfix 3.1.0-3.1, which is newer than what 16.04
already had"

As usual, LTS lagging behind in picking up important bugs .... just as we've seen recently in NTP ... and MySQL ... and and and ....

Get a grip Ubuntu ! All well and good going on about the "stability" of LTS, but I'd rather have a "stable and usable" system rather than a "stable an unusable" one !

I'm trying to get Postfix under 16.04 running so I can decommission some older 14.04/12.04 instances. It is frustrating that what should normally be a relativley simple and quick job be transformed into one that has to be put onto the backburner for days on end !

Sometimes I wonder if I shouldn't dump Ubuntu entirely. The 16.04LTS release has been so buggy and error prone, to this day, I fail to understand why a *default* install of 16.04 instists on activating and running the mdadm and LXC services when surely they should be both blatantly be optional items, as both running RAID and Virtualisation are blatantly optional tasks !

Changed in postfix (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → High
Revision history for this message
Jon Grimm (jgrimm) wrote :

Fresh install of yakkety which is already sync'd with debian (3.1.0-5)

ubuntu@y1:~$ postmulti -I postfix-example -G postfix -e create config_directory=/etc/postfix-example queue_directory=/var/spool/postfix-example data_directory=/var/lib/postfix-example
postfix/postmulti-script: fatal: Missing main.cf prototype: /etc/postfix/main.cf.proto
ubuntu@y1:~$ dpkg-query -l postfix
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================-===================-===================-================================================================
ii postfix 3.1.0-5 amd64 High-performance mail transport agent

FWIW I built/tested 3..1.0-3.1 for kicks, same error still reported.

Revision history for this message
Jon Grimm (jgrimm) wrote :

And just to complete the loop, here's sid.

root@sid1:~# postmulti -e init
root@sid1:~# postmulti -I postfix-example -G postfix -e create config_directory=/etc/postfix-example queue_directory=/var/spool/postfix-example data_directory=/var/lib/postfix-example
postfix/postmulti-script: fatal: Missing main.cf prototype: /etc/postfix/main.cf.proto
root@sid1:~# dpkg-query -l postfix
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================-===================-===================-================================================================
ii postfix 3.1.0-5+b1 amd64 High-performance mail transport agent

Changed in postfix (Debian):
status: Unknown → New
Jon Grimm (jgrimm)
tags: removed: needs-upstream-report
Changed in postfix (Ubuntu):
status: Triaged → Fix Committed
Changed in postfix (Debian):
status: New → Fix Committed
Revision history for this message
Jon Grimm (jgrimm) wrote :

Hi Scott, I don't see this landed in Ubuntu yet? Though will hopefully soon with a sync.

Changed in postfix (Ubuntu):
status: Fix Committed → Triaged
Revision history for this message
Scott Kitterman (kitterman) wrote :

FYI, 3.1.3-1 in Debian should fix this.

Changed in postfix (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Scott Kitterman (kitterman) wrote :

Fix committed is the appropriate status. The fix has been uploaded to Debian and will automatically sync into the next development release once auto sync starts.

Revision history for this message
Jon Grimm (jgrimm) wrote :

Thanks Scott, I'll watch for the sync and retest at that time.

Changed in postfix (Debian):
status: Fix Committed → Fix Released
Jon Grimm (jgrimm)
Changed in postfix (Ubuntu Xenial):
assignee: nobody → Jon Grimm (jgrimm)
status: New → Triaged
Revision history for this message
Bob Jones (r-a-n-d-o-m-d-e-v-4+ubuntu) wrote :

Yawn.

Bug opened in June and we're now December !

I cannot comprehend why it takes Ubuntu such an inordinate amount of time to get a bug fixed that was already fixed in the underlying release !

16.04 has been such a bug-ridden release, just rushed out with little QA. I'm getting rid of Ubuntu and moving to another distribution that's more stable and faster at getting bugs fixed.

Good riddence.

Revision history for this message
Scott Kitterman (kitterman) wrote :

I've verified this works on the latest Debian upload and documented the Debian (and Ubuntu) differences here:

https://git.launchpad.net/postfix/tree/debian/README.Debian?h=stable/v3.1&id=3d459e01fb9bc7dde304d4c505850e7552cc9491

(that's shipped in the package once you get the right version)

Changed in postfix (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Jon Grimm (jgrimm) wrote :

OK, looks like the minimal fix for Xenial might be:
https://git.launchpad.net/postfix/commit/?h=stable/v3.1&id=89c5899a0702919d92c616c071fce60a5cb764fd
https://git.launchpad.net/postfix/commit/?h=stable/v3.1&id=3694fc38119480ac6312299d43b8bcd453332133

Quick build & test:
root@x1:/home/ubuntu# postmulti -e init
root@x1:/home/ubuntu# postmulti -I postfix-example -G mta -e create
root@x1:/home/ubuntu# postmulti -l
- - y /etc/postfix
postfix-example mta n /etc/postfix-example

, seems happy enough. Latest debian (and zesty) has even nicer systemd integration; cool, but too invasive for SRUing.

Jon Grimm (jgrimm)
Changed in postfix (Ubuntu Xenial):
status: Triaged → In Progress
Jon Grimm (jgrimm)
Changed in postfix (Ubuntu Xenial):
importance: Undecided → Medium
Changed in postfix (Ubuntu):
importance: High → Medium
assignee: nobody → Jon Grimm (jgrimm)
Jon Grimm (jgrimm)
description: updated
Revision history for this message
Jon Grimm (jgrimm) wrote :

xenial debdiff. fixed up version.

Revision history for this message
Jon Grimm (jgrimm) wrote :

yakkety debdiff. fixed up version number.

Revision history for this message
Thomas Ward (teward) wrote :

It's been over 5 months since this was filed, and a debdiff attached. Can someone take another look at this, please? It prevents doing multi-postfix-setups on a single server.

Revision history for this message
Jon Grimm (jgrimm) wrote :

Just needs a sponsor as far as I know (subscribed already and has SRU template). Thanks for noticing. :)

Revision history for this message
Nish Aravamudan (nacc) wrote :

Pulled the debdiff into the git repo and ran the linter:

$ git ubuntu lint --target-branch=pkg/ubuntu/xenial-devel --lint-namespace=
E: Version (3.1.0-3ubuntu0.16.04.1) does not match expected version (3.1.0-3ubuntu0.1)
Some lint checks failed. Please investigate.

There are some UX improvements there (ideally, would not need either parameter), but the lint response is reasonable. Given yakkety has gone EOL, I'm going to drop the version back down to the the suggested one and sponsor.

Nish Aravamudan (nacc)
Changed in postfix (Ubuntu Xenial):
status: In Progress → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello qiuyingbo, or anyone else affected,

Accepted postfix into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/postfix/3.1.0-3ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed verification-needed-xenial
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (6.2 KiB)

Found this one hanging in proposed.
Did the verification (using local-only config in postfix) all else can be seen in the log.
The vim in between enabled proposed.

root@xenial-test:~# 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:
  comerr-dev krb5-multidev libgssrpc4 libkadm5clnt-mit9 libkadm5srv-mit9 libkdb5-8 libpq-dev libsensors4 libssl-dev libssl-doc sysstat
Use 'apt autoremove' to remove them.
Suggested packages:
  procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin dovecot-common postfix-cdb mail-reader 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 1152 kB of archives.
After this operation, 3697 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 postfix amd64 3.1.0-3 [1152 kB]
Fetched 1152 kB in 0s (1311 kB/s)
Preconfiguring packages ...
Selecting previously unselected package postfix.
(Reading database ... 36919 files and directories currently installed.)
Preparing to unpack .../postfix_3.1.0-3_amd64.deb ...
Unpacking postfix (3.1.0-3) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up postfix (3.1.0-3) ...
Adding group `postfix' (GID 118) ...
Done.
Adding system user `postfix' (UID 113) ...
Adding new user `postfix' (UID 113) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/dynamicmaps.cf
Adding group `postdrop' (GID 119) ...
Done.
setting myhostname: xenial-test.lxd
setting alias maps
setting alias database
changing /etc/mailname to xenial-test.lxd
setting myorigin
setting destinations: $myhostname, xenial-test.lxd, localhost.lxd, localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: loopback-only
setting default_transport: error
setting relay_transport: error
setting inet_protocols: all
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix is now set up with a default configuration. If you need to make
changes, edit
/etc/postfix/main.cf (and others) as needed. To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
root@xenial-test:~#
root@xenial-test:~#
root@xenial-test:~#
root@xenial-test:~#
root@xenial-test:~# postmulti -e init
root@xenial-test:~# postmulti -I postfix-example -G mta -e create
postfix/postmulti-script: fatal: Missing main.cf prototype: /etc/postfix/main.cf.proto
root@xenial-test:~#
root@xenial-test:...

Read more...

tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Thank you for verifying this fix! I see there are some autopkgtest failures related to this upload. Looking at the sbuild ones, those seem to be completely unrelated and I suppose can be ignored (they're failing frequently). I re-ran the dovecot one as it looked more like a infra-related failure - if it passes now I'll publish the update to -updates.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package postfix - 3.1.0-3ubuntu0.1

---------------
postfix (3.1.0-3ubuntu0.1) xenial; urgency=medium

  * Cherrypick from debian.
    - debian/postfix.postinst: Provide main/master.cf.proto for multi-inst.
      Closes LP: #1595096.

 -- Jon Grimm <email address hidden> Fri, 24 Mar 2017 17:22:58 -0500

Changed in postfix (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for postfix has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
elatllat (elatllat) wrote :

Really? Asked to reconfigure postfix 3 times just to add the /etc/postfix/main.cf.proto template ?
Please change the update to avoid triggering debconf.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.