Postfix Hold queue

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Postfix Hold queue

Roland De Leper
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.

Is this even possible?

Kind regards,

Roland
Reply | Threaded
Open this post in threaded view
|

Re: Postfix Hold queue

Simon Brereton-2
On 1 December 2011 04:56, Roland de Lepper <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Postfix Hold queue

Simon Deziel
In reply to this post by Roland De Leper
On 12/01/2011 04:56 AM, 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).

You might consider enabling the backport repository that provides
Postfix 2.8.5 (http://packages.ubuntu.com/lucid-backports/postfix).

Simon
Reply | Threaded
Open this post in threaded view
|

Re: Postfix Hold queue

Roland De Leper
In reply to this post by Simon Brereton-2


On Thu, Dec 1, 2011 at 4:02 PM, Simon Brereton <[hidden email]> wrote:
On 1 December 2011 04:56, Roland de Lepper <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Postfix Hold queue

Robert Schetterer
In reply to this post by Simon Brereton-2
Am 01.12.2011 16:02, schrieb Simon Brereton:
> On 1 December 2011 04:56, Roland de Lepper <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: Postfix Hold queue

Viktor Dukhovni
In reply to this post by Roland De Leper
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.
Reply | Threaded
Open this post in threaded view
|

Re: Postfix Hold queue

Jeroen Geilman
In reply to this post by Roland De Leper
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.