Loading ...
Sorry, an error occurred while loading the content.

Re: Postfix Hold queue

Expand Messages
  • Roland de Lepper
    On Thu, Dec 1, 2011 at 4:02 PM, Simon Brereton
    Message 1 of 7 , Dec 1, 2011
    • 0 Attachment
      On Thu, Dec 1, 2011 at 4:02 PM, Simon Brereton <simon.brereton@...> wrote:
      On 1 December 2011 04:56, Roland de Lepper <roland.de.lepper@...> wrote:
      > Hi,
      >
      > Where're planning to migrate postfix from Suse to Ubuntu 10.04 LTS. The
      > Postfix version on Suse has an higher version number than in Ubuntu 10.04LTS
      > (2.7.2 - 2.7.0).
      >
      > Because of the migration we have to shutdown the MySQL server to make a full
      > dump of it and import is on the new mailserver. In the meantime, all mail
      > coming to the old-mailserver will be stored in the HOLD queue.
      > When the new Mailserver is ready (with the same hostname and
      > public-ipaddress) I want to copy the HOLD queue from the old mailserver to
      > the new mailserver, then do a postsuper -r ALL to deliver the messages on
      > the new mailserver.

      I can't tell you.  But why not stop postfix BEFORE you stop the database?

      That way every (legitimate) sending server will hold outgoing mail for
      up to 5 days and you can then copy your DB in peace, move it to the
      new box, set it up, make sure it's working and generally not operate
      under any time pressure (so long as you warn your users there is an
      outage window).

      Simon


      The problem is that we have tons op applications mailing to the mailserver and I gues they do not hold the mail 5 days ;-)

      I tested my solution to copy the HOLD queue to the new server, set the permissions to postfix and released the mails in that queue. (postsuper -r ALL).
      This worked, so my question is already answered.

      Thanks anyway.

      Kind regards,

      Roland
    • Robert Schetterer
      ... use backports lucid-backports (mail): High-performance mail transport agent 2.8.5-2~build0.10.04: amd64 i386 ... -- Best Regards MfG Robert Schetterer
      Message 2 of 7 , Dec 1, 2011
      • 0 Attachment
        Am 01.12.2011 16:02, schrieb Simon Brereton:
        > On 1 December 2011 04:56, Roland de Lepper <roland.de.lepper@...> wrote:
        >> Hi,
        >>
        >> Where're planning to migrate postfix from Suse to Ubuntu 10.04 LTS. The
        >> Postfix version on Suse has an higher version number than in Ubuntu 10.04LTS
        >> (2.7.2 - 2.7.0).

        use backports

        lucid-backports (mail): High-performance mail transport agent
        2.8.5-2~build0.10.04: amd64 i386


        >>
        >> Because of the migration we have to shutdown the MySQL server to make a full
        >> dump of it and import is on the new mailserver. In the meantime, all mail
        >> coming to the old-mailserver will be stored in the HOLD queue.
        >> When the new Mailserver is ready (with the same hostname and
        >> public-ipaddress) I want to copy the HOLD queue from the old mailserver to
        >> the new mailserver, then do a postsuper -r ALL to deliver the messages on
        >> the new mailserver.


        >
        > I can't tell you. But why not stop postfix BEFORE you stop the database?
        >
        > That way every (legitimate) sending server will hold outgoing mail for
        > up to 5 days and you can then copy your DB in peace, move it to the
        > new box, set it up, make sure it's working and generally not operate
        > under any time pressure (so long as you warn your users there is an
        > outage window).
        >
        > Simon


        --
        Best Regards

        MfG Robert Schetterer

        Germany/Munich/Bavaria
      • Viktor Dukhovni
        ... Generally, you should not copy queue files, just deploy the new server in parallel, then update DNS names or MX records and configure the old server
        Message 3 of 7 , Dec 1, 2011
        • 0 Attachment
          On Thu, Dec 01, 2011 at 10:56:34AM +0100, Roland de Lepper wrote:

          > Where're planning to migrate postfix from Suse to Ubuntu 10.04 LTS. The
          > Postfix version on Suse has an higher version number than in Ubuntu
          > 10.04LTS (2.7.2 - 2.7.0).
          >
          > Because of the migration we have to shutdown the MySQL server to make a
          > full dump of it and import is on the new mailserver. In the meantime, all
          > mail coming to the old-mailserver will be stored in the HOLD queue.
          > When the new Mailserver is ready (with the same hostname and
          > public-ipaddress) I want to copy the HOLD queue from the old mailserver to
          > the new mailserver, then do a postsuper -r ALL to deliver the messages on
          > the new mailserver.

          Generally, you should not copy queue files, just deploy the new
          server in parallel, then update DNS names or MX records and configure
          the old server (relayhost=) to send all email to the new. Make sure
          the new server will accept the mail first of course.

          The mail queue of the old server will drain in minutes, so if there
          are no clients that still send to a stale IP address, you can then
          shut it down.

          As for the HOLD queue, you release mail from there with "postsuper -H"
          not "postsuper -r". When moving queue files both Postfix stacks must
          be down. It is in fact less disruptive to introduce the new server
          in parallel, and reconfigure the old.

          --
          Viktor.
        • Jeroen Geilman
          ... Why ? Just disable the qmgr(8) and no delivery attempts will be made. Set up your new mailserver to accept all mail from the old one and forward the
          Message 4 of 7 , Dec 1, 2011
          • 0 Attachment
            On 2011-12-01 10:56, Roland de Lepper wrote:
            > Hi,
            >
            > Where're planning to migrate postfix from Suse to Ubuntu 10.04 LTS.
            > The Postfix version on Suse has an higher version number than in
            > Ubuntu 10.04LTS (2.7.2 - 2.7.0).
            >
            > Because of the migration we have to shutdown the MySQL server to make
            > a full dump of it and import is on the new mailserver. In the
            > meantime, all mail coming to the old-mailserver will be stored in the
            > HOLD queue.

            Why ? Just disable the qmgr(8) and no delivery attempts will be made.

            Set up your new mailserver to accept all mail from the old one and
            forward the existing mail to the new mailserver.

            > When the new Mailserver is ready (with the same hostname and
            > public-ipaddress) I want to copy the HOLD queue from the old
            > mailserver to the new mailserver,

            NO. Copying queue files from one postfix installation to another is not
            supported.

            > then do a postsuper -r ALL to deliver the messages on the new mailserver.

            The mail has to be re-queued on the old mailserver.

            >
            > Is this even possible?

            Not the way you stated it, not without significant breakage.oland

            Just FYI, if these programs sending mail cannot delay it, the messages
            will still be queued and not delivered during the migration.
            Why not just let them fail ?

            --
            J.
          Your message has been successfully submitted and would be delivered to recipients shortly.