I'm running an ~x86 system immediately after emerging mail-mta/postfix-2.1.1 I started to see the following in /var/log/messages Jun 7 12:23:18 garath postfix/qmgr[5577]: 589DC78813: from=<gentoo-user-return-68065-gentoo-user=varnerfamily.org@lists.gentoo.org>, size=2859, nrcpt=1 (queue active) Jun 7 12:23:18 garath postfix/qmgr[5577]: warning: bad extra offset file active/5/589DC78813 Jun 7 12:23:18 garath postfix/qmgr[5577]: warning: 589DC78813: envelope records out of order Jun 7 12:23:18 garath postfix/qmgr[5577]: warning: saving corrupt file "589DC78813" from queue "active" to queue "corrupt" After restarting postfix, the problem went away. I lost quite a bit of mail before I realized I wasn't receiving mail and started to investigate. It appears that you can't upgrade to this version of postfix with a previous version running. The ebuild needs to detect if postfix is already running and if it is, instruct the user to shutdown and restart it after the emerge is complete. Reproducible: Didn't try Steps to Reproduce: 1. Running mail-mta/postfix-2.0.19-r3 2. emerge mail-mta/postfix-2.1.1 Actual Results: Incoming mail after the emerge was corrupted and unrepairable, so the incoming mail was lost. Expected Results: If a postfix system is running, it should refuse to do the emerge until the postfix system is shutdown. Portage 2.0.51_pre10 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0, 2.6.5-gentoo-r1) ================================================================= System uname: 2.6.5-gentoo-r1 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz Gentoo Base System version 1.4.16 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5 Binutils: sys-devel/binutils-2.14.90.0.8-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -O2 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache fixpackages sandbox" GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acpi alsa arts artswrappersuid avi berkdb cdr crypt cups dvd encode fam fbcon foomaticdb gdbm gif gpm gtk gtk2 imlib java javascript jpeg kde libg++ libwww mad mbox mikmod mmx motif mozilla moznocompose moznoirc moznomail mpeg ncurses nls nptl oggvorbis opengl pam pda pdflib perl png ppds python qt quicktime readline sasl sdl slang spell sse ssl svga tcltk tcpd tiff truetype usb x86 xml2 xmms xv zlib linguas_en"
It is OK to upgrade with the previous version running, you just have to reload it after the upgrade (thought you would do that after you run an etc-update anyway) quoted from release note: [quote]: [Incompat 20021119] You can upgrade Postfix 2.0 without stopping. After upgrading an existing Postfix 2.0 system you must use "postfix reload". Some internal protocols have changed, but the master-child protocols are the same as with Postfix 2.0. [/quote]
That may be true, but even if I had been on the ball and issued a postfix reload after emerging the package I still would have lost mail, since it immediately started to corrupt the mail that was coming in. Based upon my experience, I definitely would not recommend upgrading to this version with the older version running.
Fixed in postfix-2.1.3. Ebuild will detect and die if you are going to upgrade from <2.1 while postfix is running. Thanks.
This now means that a mail server is put completely out of action for the duration of the compile, which isn't really acceptable on a production mail server. Could the ebuild instead just stop Postfix for the installation stage, i.e. after compiling? (Having of course warned the user about this.)
maybe we could move the postfix-is-running check from pkg_setup() to pkg_install, because the installation part is the only one having a problem with a running postfix, all others (compilation etc.) don't. this also affects the latest =mail-mta/postfix-2.2.0 ebuild.
I can move the check to pkg_install(), but I need to inform the user how to merge postfix with ebuild command (or something similar). I would tell the user to `ebuild /path/to/postfix-2.2.0.ebuild merge` but that command doesn't unmerge the installed postfix. Portage would unmerge it in the next emerge command, but it doesn't look like a clean solution to me. I am thinking about emerge -B postfix then emerge -K postfix, but that wouldn't work because postfix provides and blocks virtual/mta, for some reason emerge -K postfix blocks itself. comment/suggestion?
nm my previous comment wrt emerge -K postfix blocks itself. I'll attach the propose diff here shortly for discuss.
How about a simple system. How about having postfix fail to build while an existing postfix is running unless MIGHT_CAUSE_SERIOUS_BREAKAGE is set? Then we document why we're doing this in an ewarn, and we're done.
Created attachment 53560 [details, diff] postfix-2.2.1.diff proposed patch to allow emerge postfix with FORCE_UPGRADE vaiable. Please note my wording in there is poor, feel free to change it so it is readable. Thanks.
2.1.5-r2 ebuild refuses to build even if Postfix has been stopped: * You are upgrading from the incompatible version. * Please stop Postfix then emerge again. !!! ERROR: mail-mta/postfix-2.1.5-r2 failed. !!! Function pkg_setup, Line 59, Exitcode 0 !!! Upgrade from incompatible version. !!! If you need support, post the topmost build error, NOT this status message. Also, why is 2.2 still masked and not in unstable? It's been out quite some time now.
A new fix is in CVS right now, it will touch the mirrors in a while. Reopen if it still fails Thanks. Cheers, Ferdy