• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Convert email data to Qmail?

R

rayc@

Guest
HI all

Recently, I moved some customers from Ensim server.

To transfer email datas, what do I need to do?

I believe Ensim uses sendmail.

Email data is one big file.

but Qmail is seperated in it's own directory.

/var/qmail/mailnames/domain name/user id/MailDir/Cur ?

but sendmail is /var/mail/userid@domain

Is there any tool for it?


Thank you

rayc
 
We have recently done the migration from sendmail to qmail successful.
We used the following howto:

Re: GLUG: sendmail to qmail migration - help

* To: Eugene van Zyl <evz@xxxxxxxxxxx>
* Subject: Re: GLUG: sendmail to qmail migration - help
* From: "Schalk W. Cronje" <schalkc@xxxxxxxxxxx>
* Date: Fri, 12 Feb 1999 10:31:28 +0200
* Cc: GLUG <glug@xxxxxxxxxxxx>
* References: <[email protected]>

As far as I can remember do the following

1. Create your new server with the users on them and install qmail
2. Decide if you will be using Mailbox or Maildir (the latter is recommended).
3. Run the following patches if you will be using Maildirs.
a) IMAP (qmail-imap-4.5.beta-2.i386.rpm)
b) Pine (pine-4.04-1.i386.rpm)
Check ftp://summersoft.fay.ar.us/pub/qmail for tgz versions as well.
4. Set this server up with an MX number higher than the current mailserver.
5. For POP3 support you will need to install checkpassword or something similar

http://pobox.com/~djb/checkpwd.html
6. Start qmail and test
7. Ensure that your users change over to use smtp on this server
8. Maildirs: Create Maildirs for everybody
9. Disable smtp on you old mailserver. (Either via inetd.conf or by stopping
sendmail). Read the qmail
documentation REMOVE.sendmail
10. All mail will automatically be delivered to the new server.
11. Your next concern is to get hold of the mail on the old server. One
solution is to ensure that all users POP
the mail, but as you cannot necessarly trust users ....
12. Otherwise do a temporary mount of /var/spool/mail (probably via NFS).
MAILDIR: Run mbox2maildir for each user. This will safely convert the mbox
files to maildirs.
MAILBOX: Copy the old mbox files to Mailbox file in each user's home. If
you are to do this, do it before
enabling smtp on the machine as mail might be lost!
13. Having done all this you will have porbably have mail left in the queue on
the old server.
a) Remove the MX for the old server to ensure that no mail will go there
anymore.
b) Change the sendmail.cf file to ensure that all mail is relayed via the
new server.
c) Manually run sendmail -q until /var/spool/mqueue is empty.

Other Notes:
========
** From inetd.conf
imap stream tcp nowait root /usr/sbin/imapd

pop3 stream tcp nowait root /usr/local/qmail/bin/qmail-popup
/usr/local/qmail/bin/qmail-popup YOUR.DOMAIN /usr/local/bin/checkpassword
/usr/local/qmail/bin/qmail-pop3d Maildir

smtp stream tcp nowait qmaild /usr/local/qmail/bin/tcp-env tcp-env
/usr/local/qmail/bin/qmail-smtpd

** Relaying
If you are to use one host for mail relay purposes and you have a qmail to
qmail relay over smtp, the relay host suffers when run under inetd switch off
for upto ten minutes at a time. In such cases you should consider installing
tcpserver

I hope I did not leave anything out.

-Marcel
 
One more way to migrate mailboxes

Hi, if you just want to convert mailboxes from mbox (sendmail, ensim) to Maildir (qmail)...

I have used mb2md.pl, a perl script that uses mbox2maildir, and it is available in plesk:

1 - Copy mbox files to /var/spool/mail

2 - Create users with the name of mbox

3 - for each mbox: su - user

4 - for each mbox: '/usr/local/psa/PMM/mb2md.pl -m'

Then you will have the Maildir in /home/user/Maildir
You can change your destination directory by adding '-d destdir'
For more options, just look inside mb2md.pl.

Regards
 
Back
Top