Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

Migrating qmail from an old server to a new server

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


vadud3 at gmail

Feb 17, 2009, 11:42 AM

Post #1 of 7 (2121 views)
Permalink
Migrating qmail from an old server to a new server

Hi

I am running qmail on solaris 8 with this setup. I like some
suggestion on best way to migrate to a new server. Domain name will
not change.

qmail home directory: /var/qmail.
user-ext delimiter: -.
paternalism (in decimal): 2.
silent concurrency limit: 500.
subdirectory split: 23.
user ids: 7790, 7791, 7792, 0, 7793, 7794, 7795, 7796.
group ids: 2108, 2107.

badmailfrom:
corben1 [at] yahoo not accepted in MAIL FROM.
sanfordevans [at] yahoo not accepted in MAIL FROM.
thor7171 [at] yahoo not accepted in MAIL FROM.
lama_77 [at] yahoo not accepted in MAIL FROM.
michellekhim [at] yahoo not accepted in MAIL FROM.
byansi [at] yahoo not accepted in MAIL FROM.
galganor [at] yahoo not accepted in MAIL FROM.
otimm [at] yahoo not accepted in MAIL FROM.
pereira72 [at] yahoo not accepted in MAIL FROM.
aaronyu98 [at] yahoo not accepted in MAIL FROM.
gconstantin [at] yahoo not accepted in MAIL FROM.
[..5225 entries total..]

bouncefrom: (Default.) Bounce user name is MAILER-DAEMON.

bouncehost: (Default.) Bounce host name is qmail.example.net.

concurrencylocal: Local concurrency is 50.

concurrencyremote: Remote concurrency is 300.

databytes: (Default.) SMTP DATA limit is 0 bytes.

defaultdomain: Default domain name is example.net.

defaulthost: Default host name is example.net.

doublebouncehost: 2B recipient host: qmail.

doublebounceto: 2B recipient user: postmaster.

envnoathost: (Default.) Presumed domain name is qmail.example.net.

helohost: (Default.) SMTP client HELO host name is qmail.example.net.

idhost: (Default.) Message-ID host name is qmail.example.net.

localiphost: (Default.) Local IP address becomes qmail.example.net.

locals:
Messages for qmail are delivered locally.
Messages for qmail.arl.example.net are delivered locally.
Messages for qmail.example.net are delivered locally.
Messages for example.net are delivered locally.
Messages for exampledial.net are delivered locally.
Messages for exampledial.com are delivered locally.
Messages for exampledial.org are delivered locally.

me: My name is qmail.example.net.

percenthack: (Default.) The percent hack is not allowed.

plusdomain: Plus domain name is example.net.

qmqpservers: (Default.) No QMQP servers.

queuelifetime: Message lifetime in the queue is 259200 seconds.

rcpthosts:
SMTP clients may send messages to recipients at qmail.
SMTP clients may send messages to recipients at qmail.arl.example.net.
SMTP clients may send messages to recipients at qmail.example.net.
SMTP clients may send messages to recipients at example.net.
SMTP clients may send messages to recipients at msip.example.net.
SMTP clients may send messages to recipients at exampledial.net.
SMTP clients may send messages to recipients at examplerova.com.
SMTP clients may send messages to recipients at uswest.net.
SMTP clients may send messages to recipients at example.com.
SMTP clients may send messages to recipients at example.net.
SMTP clients may send messages to recipients at dca1.dc.us.da.example.net.
SMTP clients may send messages to recipients at skytel.com.
SMTP clients may send messages to recipients at list.example.net.
SMTP clients may send messages to recipients at messaging.sprintpcs.com.
SMTP clients may send messages to recipients at webrt.arl.example.net.
SMTP clients may send messages to recipients at jp-script.arl.example.net.
SMTP clients may send messages to recipients at radtest02.arl.example.net.
SMTP clients may send messages to recipients at mrtg.arl.example.net.
SMTP clients may send messages to recipients at nmso.arl.example.net.
SMTP clients may send messages to recipients at salade.arl.example.net.

morercpthosts: (Default.) No effect.

morercpthosts.cdb: (Default.) No effect.

smtpgreeting: SMTP greeting: 220 qmail.example.net -=NO UNSOLICITED
BULK E-MAIL=-.

smtproutes:
SMTP route: scrub.net:scrub.arl.example.net:26
SMTP route: webrt.arl.example.net:qmail.example.net

timeoutconnect: SMTP client connection timeout is 120 seconds.

timeoutremote: (Default.) SMTP client data timeout is 1200 seconds.

timeoutsmtpd: (Default.) SMTP server data timeout is 1200 seconds.

virtualdomains:
Virtual domain: examplerova.com:alias-examplerova
Virtual domain: list.example.net:alias-list
Virtual domain: webrt.arl.example.net:alias-null
Virtual domain: jp-script.arl.example.net:alias-null
Virtual domain: radtest02.arl.example.net:alias-null
Virtual domain: mrtg.arl.example.net:alias-null
Virtual domain: nmso.arl.example.net:alias-null
Virtual domain: salade.arl.example.net:alias-null

CONFIG_INFO_ADDITIONS: I have no idea what this file does.

ldapbasedn: I have no idea what this file does.

ldapdefaultdotmode: I have no idea what this file does.

ldapgid: I have no idea what this file does.

ldaplocaldelivery: I have no idea what this file does.

ldapmessagestore: I have no idea what this file does.

ldapserver: I have no idea what this file does.

ldapuid: I have no idea what this file does.

suspicion: I have no idea what this file does.

tarpitcount: I have no idea what this file does.

tarpitdelay: I have no idea what this file does.

concurrencyincoming: I have no idea what this file does.

smtpgreeting.orig: I have no idea what this file does.

badrcptto: I have no idea what this file does.

concurrencyqmqp: I have no idea what this file does.

suspicion.orig: I have no idea what this file does.


--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


kyle-qmail at memoryhole

Feb 17, 2009, 12:09 PM

Post #2 of 7 (1881 views)
Permalink
Re: Migrating qmail from an old server to a new server [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday, February 17 at 02:42 PM, quoth Asif Iqbal:
> I am running qmail on solaris 8 with this setup. I like some
> suggestion on best way to migrate to a new server. Domain name will
> not change.

If you don't have any email in your queue (or none that are
important), then this will be very easy. All you need to do is set up
the new server, stop the old one, plug in the new one. (And when
you're done, double-check that no email got into the old queue at the
last second).

If you do have mail in your queue that you don't want to lose, things
become a bit more complicated, depending on how much "down-time" you
can tolerate. If you can tolerate a few minutes, then you just need to
turn off the old qmail, copy the queue from the old server to the new
server, run a queue repair tool on the new queue (there are several
good ones on qmail.org), start qmail on the new server, and plug it
in.

If you can't tolerate downtime, then you're going to have to handle
some sort of a migration, where both machines are up and running for a
while (with different IP addresses).

~Kyle
- --
The community which does not protect its humblest and most hated
member in the free utterance of his opinions, no matter how false or
hateful, is only a gang of slaves. If there is anything in the
universe that can't stand discussion, let it crack.
-- Wendell Phillips, 1863
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkmbGX0ACgkQBkIOoMqOI17AsQCfS9fAkY5B9oZYs1kftw44cA0/
9p4AnjHx4bkdWrDJog1J/Thx/uc2MRZI
=24d6
-----END PGP SIGNATURE-----


vadud3 at gmail

Feb 17, 2009, 1:05 PM

Post #3 of 7 (1886 views)
Permalink
Re: Migrating qmail from an old server to a new server [In reply to]

On Tue, Feb 17, 2009 at 3:09 PM, Kyle Wheeler <kyle-qmail [at] memoryhole> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tuesday, February 17 at 02:42 PM, quoth Asif Iqbal:
>> I am running qmail on solaris 8 with this setup. I like some
>> suggestion on best way to migrate to a new server. Domain name will
>> not change.
>
> If you don't have any email in your queue (or none that are
> important), then this will be very easy. All you need to do is set up
> the new server, stop the old one, plug in the new one. (And when
> you're done, double-check that no email got into the old queue at the
> last second).
>
> If you do have mail in your queue that you don't want to lose, things
> become a bit more complicated, depending on how much "down-time" you
> can tolerate. If you can tolerate a few minutes, then you just need to
> turn off the old qmail, copy the queue from the old server to the new
> server, run a queue repair tool on the new queue (there are several
> good ones on qmail.org), start qmail on the new server, and plug it
> in.
>
> If you can't tolerate downtime, then you're going to have to handle
> some sort of a migration, where both machines are up and running for a
> while (with different IP addresses).

I like this third scenario. So I just change MX number to for the old
oneto 20 and
have the new one to 10 and wait until the queue cleans up on the old
one and then
decommision it? I am sure there is something I am missing.

Thanks for explaining it so simply. Really appreciate it

>
> ~Kyle
> - --
> The community which does not protect its humblest and most hated
> member in the free utterance of his opinions, no matter how false or
> hateful, is only a gang of slaves. If there is anything in the
> universe that can't stand discussion, let it crack.
> -- Wendell Phillips, 1863
> -----BEGIN PGP SIGNATURE-----
> Comment: Thank you for using encryption!
>
> iEYEARECAAYFAkmbGX0ACgkQBkIOoMqOI17AsQCfS9fAkY5B9oZYs1kftw44cA0/
> 9p4AnjHx4bkdWrDJog1J/Thx/uc2MRZI
> =24d6
> -----END PGP SIGNATURE-----
>



--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


kyle-qmail at memoryhole

Feb 17, 2009, 1:45 PM

Post #4 of 7 (1877 views)
Permalink
Re: Migrating qmail from an old server to a new server [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday, February 17 at 04:05 PM, quoth Asif Iqbal:
>> If you can't tolerate downtime, then you're going to have to handle
>> some sort of a migration, where both machines are up and running for a
>> while (with different IP addresses).
>
> I like this third scenario. So I just change MX number to for the
> old oneto 20 and have the new one to 10 and wait until the queue
> cleans up on the old one and then decommision it? I am sure there
> is something I am missing.

That's *close* to correct, yes. But changing the MX number won't solve
the issue: you don't want the old server to be a *backup* MX. The only
reason you're leaving it turned on is so that it can flush its queue.
So you can turn off qmail-smtpd entirely, just to ensure that no
additional messages get into the queue, even by accident.

The only other issue you might have to deal with is that of whatever
other services this system might be running. For example, where are
your messages stored? If they're stored elsewhere (e.g. on a
fileserver), then you've got nothing else to fuss with. If they're
stored on the qmail server, then you're going to have to worry about
migrating *that* as well, and that's a whole extra set of problems and
concerns.

~Kyle
- --
Faith... must be enforced by reason. [...] When faith becomes blind it
dies.
-- Ghandi
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkmbL+wACgkQBkIOoMqOI17/5QCfcuO3+FxKLN+SGB7Zees5P7pM
XmEAnRbncnGYLIED3A63w+ymo5QBnp+F
=L/A1
-----END PGP SIGNATURE-----


mslucas at taos-it

Feb 17, 2009, 2:15 PM

Post #5 of 7 (1880 views)
Permalink
RE: Migrating qmail from an old server to a new server [In reply to]

> From: Kyle Wheeler [mailto:kyle-qmail [at] memoryhole]
> On Tuesday, February 17 at 04:05 PM, quoth Asif Iqbal:
> >> If you can't tolerate downtime, then you're going to have to handle
> >> some sort of a migration, where both machines are up and running for
> a
> >> while (with different IP addresses).
> >
> > I like this third scenario. So I just change MX number to for the
> > old oneto 20 and have the new one to 10 and wait until the queue
> > cleans up on the old one and then decommision it? I am sure there
> > is something I am missing.
>
> That's *close* to correct, yes. But changing the MX number won't solve
> the issue: you don't want the old server to be a *backup* MX. The only
> reason you're leaving it turned on is so that it can flush its queue.
> So you can turn off qmail-smtpd entirely, just to ensure that no
> additional messages get into the queue, even by accident.
>

So stop qmail-smtpd and the only emails which can get injected in the queue will be local emails from e.g. qmail-inject.

Maurice


kacperw at gmail

Feb 17, 2009, 3:10 PM

Post #6 of 7 (1931 views)
Permalink
Re: Migrating qmail from an old server to a new server [In reply to]

On Tue, Feb 17, 2009 at 11:15 PM, Maurice Lucas - TAOS-IT
<mslucas [at] taos-it> wrote:
>> From: Kyle Wheeler [mailto:kyle-qmail [at] memoryhole]
>> On Tuesday, February 17 at 04:05 PM, quoth Asif Iqbal:
>> >> If you can't tolerate downtime, then you're going to have to handle
>> >> some sort of a migration, where both machines are up and running for
>> a
>> >> while (with different IP addresses).
>> >
>> > I like this third scenario. So I just change MX number to for the
>> > old oneto 20 and have the new one to 10 and wait until the queue
>> > cleans up on the old one and then decommision it? I am sure there
>> > is something I am missing.
>>
>> That's *close* to correct, yes. But changing the MX number won't solve
>> the issue: you don't want the old server to be a *backup* MX. The only
>> reason you're leaving it turned on is so that it can flush its queue.
>> So you can turn off qmail-smtpd entirely, just to ensure that no
>> additional messages get into the queue, even by accident.
>>
>
> So stop qmail-smtpd and the only emails which can get injected in the queue will be local emails from e.g. qmail-inject.

You haven't said anything about how mail is stored. From your listing,
the files that you describe as "I have no idea what this file does"
mention ldap amongst others, which would suggest that your users
authenticate over ldap and that mail is stored locally. Which is to
say, you need a proper migration plan. Here's a start, that you should
adapt to any special considerations in your setup:

0. Figure out all where all the "I have no idea what this file does"
comes from. looks like a bunch of custom patches!
1. set up the new qmail server to be identical in function to the old
one and migrate user accounts. TEST ALL SERVICES.
2. migrate user's mailboxes (mbox and Maildir can be done
corruption-free with several rsyncs, see below, if you use imap then
you want to preserve imap flags and such, best done with imapsync or
similar software)
3. (when your users are asleep) take down smtpd and flush the old mail
queue like the fine gentlemen before me mentioned. incoming mail will
now be in limbo. preferrably stop pop3d and imapd as well so that your
users don't mess with your migration.
4. migrate any remaining mail to the new server, now that the
mailboxes aren't being modified by incoming mail and users frobbing
their mailboxes.
5. TEST ALL SERVICES! Check that everything migrated nicely & noone
lost their mail, imap flags were preserved etc etc.
6. set up the old server to forward all its incoming mail to the new
server, essentially becoming a backup MX.
7. put the new server in as a primary mx and bob's your uncle.
8. either your users start checking their mail using the new server's
domain name or you move the corresponding domain pointers, in which
case they'll have to wait (a day or more) for DNS to propagate your
changes.

Like Kyle said, if you can't tolerate downtime, this will be a little
more tricky, as you'll have to do step 4. without doing step 3, which
means you'll have to sync live mailboxes. But hey, maybe you have some
sort of storage backend or something awesome like that and don't need
to worry about migrating mailboxes?

HTH,
0K
--
http://kacper.doesntexist.org
http://windows.dontexist.net
Employ no technique to gain supreme enlightment.
- Mar pa Chos kyi blos gros


vadud3 at gmail

Feb 17, 2009, 3:42 PM

Post #7 of 7 (1870 views)
Permalink
Re: Migrating qmail from an old server to a new server [In reply to]

On Tue, Feb 17, 2009 at 4:45 PM, Kyle Wheeler <kyle-qmail [at] memoryhole> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Tuesday, February 17 at 04:05 PM, quoth Asif Iqbal:
>>> If you can't tolerate downtime, then you're going to have to handle
>>> some sort of a migration, where both machines are up and running for a
>>> while (with different IP addresses).
>>
>> I like this third scenario. So I just change MX number to for the
>> old oneto 20 and have the new one to 10 and wait until the queue
>> cleans up on the old one and then decommision it? I am sure there
>> is something I am missing.
>
> That's *close* to correct, yes. But changing the MX number won't solve
> the issue: you don't want the old server to be a *backup* MX. The only
> reason you're leaving it turned on is so that it can flush its queue.
> So you can turn off qmail-smtpd entirely, just to ensure that no
> additional messages get into the queue, even by accident.
>
> The only other issue you might have to deal with is that of whatever
> other services this system might be running. For example, where are
> your messages stored? If they're stored elsewhere (e.g. on a

in nfs home dir of user which is defined by there ldap account's
mailmessagestore
attribute.

for example my account is like this

dn: cn=Asif Iqbal,o=Example Domain,c=US
cn: Asif Iqbal
sn: Iqbal
objectclass: top
objectclass: person
objectclass: inetOrgPerson
objectclass: qmailUser
mail: iqbala [at] example
mailhost: qmail.arl.example.net
mailmessagestore: /netapp/home/iqbala
mailalternateaddress: asif.iqbal [at] example
qmailuid: 341
qmailgid: 200
uid: iqbala
userpassword: {SHA}D3X5s1234Y5rjLd2W++IhcheNRk=
creatorsname: cn=root, o=Example Domain, c=US
modifiersname: cn=root, o=Example Domain, c=US
createtimestamp: 20070211173615Z
modifytimestamp: 20070211173615Z

I am lookng into non ldap solution. I have not used qmail-user and
wondering if I can switch to that
with minimal change in setup, like still point to NFS mountpoint for
user's home dir


> fileserver), then you've got nothing else to fuss with. If they're
> stored on the qmail server, then you're going to have to worry about
> migrating *that* as well, and that's a whole extra set of problems and
> concerns.
>
> ~Kyle
> - --
> Faith... must be enforced by reason. [...] When faith becomes blind it
> dies.
> -- Ghandi
> -----BEGIN PGP SIGNATURE-----
> Comment: Thank you for using encryption!
>
> iEYEARECAAYFAkmbL+wACgkQBkIOoMqOI17/5QCfcuO3+FxKLN+SGB7Zees5P7pM
> XmEAnRbncnGYLIED3A63w+ymo5QBnp+F
> =L/A1
> -----END PGP SIGNATURE-----
>



--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.