Re: Postfix migration from 2.0 to 2.6.6

2015-02-20 Thread Michael

Quoting Zalezny Niezalezny zalezny.niezale...@gmail.com:


I dont want to route any E-mails. I simply would like to stop old server,
tar everything in the proper way and migrate on the new host. This is my
target.


Then just block all incoming traffic on port 25 and 587 (or whatever  
your users are using).
After everything has been processed and the Que is empty, tar compress  
everything and move it to the new server.
Once that is done, change the MX entries to point to the new server  
and you are done.


No mails will be lost in the meantime.

If you additionally change the TTL of the according Zone entries of  
your domain to something very small (5 min), the propagation of the  
new entries will be faster.


Regards,
Michael



Re: Postfix migration from 2.0 to 2.6.6

2015-02-20 Thread Zalezny Niezalezny
Greetz to all and thanks for Your efficient support!

Its perfect community :)

On Fri, Feb 20, 2015 at 12:30 PM, Zalezny Niezalezny 
zalezny.niezale...@gmail.com wrote:

 I will simply stop postfix and copy all files. I dont see any other
 solution here.We will see if it will work properly.

 On Fri, Feb 20, 2015 at 11:28 AM, Michael m...@michi.su wrote:

 Quoting Zalezny Niezalezny zalezny.niezale...@gmail.com:

  I dont want to route any E-mails. I simply would like to stop old server,
 tar everything in the proper way and migrate on the new host. This is my
 target.


 Then just block all incoming traffic on port 25 and 587 (or whatever your
 users are using).
 After everything has been processed and the Que is empty, tar compress
 everything and move it to the new server.
 Once that is done, change the MX entries to point to the new server and
 you are done.

 No mails will be lost in the meantime.

 If you additionally change the TTL of the according Zone entries of your
 domain to something very small (5 min), the propagation of the new entries
 will be faster.

 Regards,
 Michael





Re: Postfix migration from 2.0 to 2.6.6

2015-02-20 Thread Zalezny Niezalezny
I will simply stop postfix and copy all files. I dont see any other
solution here.We will see if it will work properly.

On Fri, Feb 20, 2015 at 11:28 AM, Michael m...@michi.su wrote:

 Quoting Zalezny Niezalezny zalezny.niezale...@gmail.com:

  I dont want to route any E-mails. I simply would like to stop old server,
 tar everything in the proper way and migrate on the new host. This is my
 target.


 Then just block all incoming traffic on port 25 and 587 (or whatever your
 users are using).
 After everything has been processed and the Que is empty, tar compress
 everything and move it to the new server.
 Once that is done, change the MX entries to point to the new server and
 you are done.

 No mails will be lost in the meantime.

 If you additionally change the TTL of the according Zone entries of your
 domain to something very small (5 min), the propagation of the new entries
 will be faster.

 Regards,
 Michael




Re: Postfix migration from 2.0 to 2.6.6

2015-02-20 Thread Zalezny Niezalezny
I dont want to route any E-mails. I simply would like to stop old server,
tar everything in the proper way and migrate on the new host. This is my
target.

On Fri, Feb 20, 2015 at 11:05 AM, Test t...@icolombi.net wrote:

 What about just routing messages from old server to the new one with
 relayhost? We are just talking about messages in queue right?


 2015-02-20 10:54 GMT+01:00 Zalezny Niezalezny 
 zalezny.niezale...@gmail.com:

 Thanks for Your explanation. I see that Postfix community is very strong
 and fast :) Its good to know :)

 If I will stop Postfix, for sure some of them will stay in the queue
 folders. How to migrate that part without loosing data ? Should I simply
 copy files with proper permissions and ownership between two servers ? Is
 there any commands which needs to be executed afterwards ?


 Thanks in advance for Your support.


 Zalezny






Re: Postfix migration from 2.0 to 2.6.6

2015-02-20 Thread Zalezny Niezalezny
Thanks for Your explanation. I see that Postfix community is very strong
and fast :) Its good to know :)

Back to subject.

We are using Red Hat distro so I`m not planning to use Postfix version
higher than its in the repository. What can I say, RHEL is crap if we are
talking about updates for the common packages. They are supporting latest
release 2.6.6 and I will stay with this release. Of course it would be
great to build new package even with version 3 but then I must support it
till end. Its enterprise environment so we need to follow some rules (some
times stupid...).

This what I dont understand is, what exactly Postfix doing during stop
command.
If I good understand queue model, Postfix storing files in the queue
folders. My server sending thousands of E-mails per day. If I will stop
Postfix, for sure some of them will stay in the queue folders. How to
migrate that part without loosing data ? Should I simply copy files with
proper permissions and ownership between two servers ? Is there any
commands which needs to be executed afterwards ?


Thanks in advance for Your support.


Zalezny


On Fri, Feb 20, 2015 at 10:18 AM, DTNX Postmaster postmas...@dtnx.net
wrote:

 On 20 Feb 2015, at 09:14, Zalezny Niezalezny zalezny.niezale...@gmail.com
 wrote:

 on one of my servers I`m planning to migrate very old Postfix 2.0 to quite
 new one 2.6.6.
 I migrated already all Postfix instances, so all Postfix configuration
 files are already on the new machine (/etc/postfix*). Now its time to
 migrate /var/spool/postfix and all other Postfix data files.

 Will it work properly if I will simply:
 - stop old server
 - zip all /var/spool/postfix*  and /var/spool/mail/*

 - copy all /var/spool/postfix* and /var/spool/mail/* on the new one
 - start all instances

 Will it work ?

 Here is written, that it will not work properly...

 http://www.postfix.org/faq.html#copying

 How to migrate Postfix data in the best way ?


 Do note that 2.6.6 is anything but new; 2.6.6 is from 2010, and the last
 legacy release of the 2.6.x series was two years ago.

 At this point, for new systems, you should be using 2.9.x as the
 absolute minimum, since 2.8.x is already out as well. See the Postfix
 announcements page for details;

 http://www.postfix.org/announcements.html

 As far as the migration itself; review the documentation for changes,
 both to settings you have in your configuration as well as changes to
 default settings, as the gap between 2.0 and whatever you move to is
 quite big. Start here;

 http://www.postfix.org/postconf.5.html

 Once you have reviewed the documentation for anything you might need to
 change, set it up on the new machine, and test all your assumptions
 about how it should work.

 Your '/var/spool/postfix' should be empty, and there should be no need
 to copy that over. How you migrate stored messages on the server
 depends on how your users access their mail, which is outside the scope
 of Postfix.

 In other words; move to a supported version of Postfix, and test your
 migration extensively. Good luck!

 Mvg,
 Joni




Re: Postfix migration from 2.0 to 2.6.6

2015-02-20 Thread Koko Wijatmoko
On Fri, 20 Feb 2015 09:14:37 +0100
Zalezny Niezalezny zalezny.niezale...@gmail.com wrote:

 - zip all /var/spool/postfix*  and /var/spool/mail/*
 
don't use zip, it didn't save uid.gid owner...


Re: Postfix migration from 2.0 to 2.6.6

2015-02-20 Thread DTNX Postmaster
On 20 Feb 2015, at 09:14, Zalezny Niezalezny zalezny.niezale...@gmail.com 
wrote:

 on one of my servers I`m planning to migrate very old Postfix 2.0 to quite 
 new one 2.6.6.
 I migrated already all Postfix instances, so all Postfix configuration files 
 are already on the new machine (/etc/postfix*). Now its time to migrate 
 /var/spool/postfix and all other Postfix data files.
 
 Will it work properly if I will simply:
 - stop old server
 - zip all /var/spool/postfix*  and /var/spool/mail/* 
 
 - copy all /var/spool/postfix* and /var/spool/mail/* on the new one 
 - start all instances
 
 Will it work ?
 
 Here is written, that it will not work properly...
 
 http://www.postfix.org/faq.html#copying
 
 How to migrate Postfix data in the best way ?

Do note that 2.6.6 is anything but new; 2.6.6 is from 2010, and the last 
legacy release of the 2.6.x series was two years ago.

At this point, for new systems, you should be using 2.9.x as the 
absolute minimum, since 2.8.x is already out as well. See the Postfix 
announcements page for details;

http://www.postfix.org/announcements.html

As far as the migration itself; review the documentation for changes, 
both to settings you have in your configuration as well as changes to 
default settings, as the gap between 2.0 and whatever you move to is 
quite big. Start here;

http://www.postfix.org/postconf.5.html

Once you have reviewed the documentation for anything you might need to 
change, set it up on the new machine, and test all your assumptions 
about how it should work.

Your '/var/spool/postfix' should be empty, and there should be no need 
to copy that over. How you migrate stored messages on the server 
depends on how your users access their mail, which is outside the scope 
of Postfix.

In other words; move to a supported version of Postfix, and test your 
migration extensively. Good luck!

Mvg,
Joni



Re: Postfix migration from 2.0 to 2.6.6

2015-02-20 Thread Test
What about just routing messages from old server to the new one with
relayhost? We are just talking about messages in queue right?


2015-02-20 10:54 GMT+01:00 Zalezny Niezalezny zalezny.niezale...@gmail.com
:

 Thanks for Your explanation. I see that Postfix community is very strong
 and fast :) Its good to know :)

 If I will stop Postfix, for sure some of them will stay in the queue
 folders. How to migrate that part without loosing data ? Should I simply
 copy files with proper permissions and ownership between two servers ? Is
 there any commands which needs to be executed afterwards ?


 Thanks in advance for Your support.


 Zalezny





Re: Postfix migration from 2.0 to 2.6.6

2015-02-20 Thread Viktor Dukhovni
On Fri, Feb 20, 2015 at 11:15:58AM +0100, Zalezny Niezalezny wrote:

 I dont want to route any E-mails. I simply would like to stop old server,
 tar everything in the proper way and migrate on the new host. This is my
 target.

Letting the legacy queue drain, either to the users mailboxes or
to the new servers as smarthosts, is the preferred approach.

Disable external input:

smtpd_recipient_restrictions = defer

Then if anything still remains in the queue (typically a few outbound
bounces to dead destinations), if desired punt already queued mail
to the new servers:

new server:
mynetworks = 127.0.0.1, ip-addresses-of-old-servers

old servers:

default_transport = smtp:[newsmtp.example.com]
local_transport = $default_transport
virtual_transport = $defaul_transport
relay_transport = $default_transport

Then flush the queues on the old servers.

Moving the files can be done, but can be difficult to do right.
Especially if the destination queues are not initially empty.

The hard part is mailstore migration not mail queue migration, mail
queues are best left to just drain after shutting off input.

-- 
Viktor.