


courier-imap-4.0.6.20051004.tar.bz2をコンパイルしてpop3を導入したメールサーバの移行時メモ
今回は最近のディストリビューションに含まれているdovecotを利用することになりパスワードファイル、ホームディレクトリの移行後にUIDLのコンバートを行いました
The Courier IMAP server
http://www.courier-mta.org/imap/
Dovecot Secure IMAP server
http://www.dovecot.org/
UIDLはpop3プロトコルでどのメールまで読んだかを記録する仕組みです
さて今回のUIDL移行ではDovecotに移行スクリプトが用意されていましたので、これを利用しました。本当に有り難いことです
Migration/Courier Courier v0.43 and later to Dovecot v1.1+
http://wiki2.dovecot.org/Migration/Courier
このサイトから courier-dovecot-migrate.pl をダウンロードします
スクリプトはPerlで作成されていますのでpathが異なる場合は修正して下さい
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
#!/usr/bin/perl # Copyright 2008-2002 Timo Sirainen # Last updated: 2012-07-28 # NOTE: Requires Dovecot v2.0.13+ for POP3 'O' entries # Based largely on courier-dovecot-migrate.pl v1.1.7: # cpanel12 - maildir-migrate Copyright(c) 2008 cPanel, Inc. # All Rights Reserved. # copyright@cpanel.net http://cpanel.net # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of the cPanel, Inc. nor the # names of its contributors may be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY CPANEL, INC. "AS IS" AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL CPANEL, INC BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
移行テストを行います
指定した/home以下を再帰検索してCourier IMAPのcourierpop3dsizelistファイル検索してテストします
1 2 3 4 5 6 7 8 9 10 11 |
[root@host1 ~]# ./courier-dovecot-migrate.pl --to-dovecot --recursive /home Testing conversion to Dovecot format Finding maildirs under /home /home/testuser01/Maildir: No imap/pop3 uidlist files /home/testuser02/Maildir: No imap/pop3 uidlist files Total: 346 mailboxes / 346 users 0 errors No actual conversion done, use --convert parameter WARNING: Badly done migration will cause your IMAP and/or POP3 clients to re-download all mails. Read http://wiki.dovecot.org/Migration carefully. |
–convertオプションを付加して実際に移行します
1 2 3 4 5 6 7 8 9 10 11 |
[root@host01 ~]# ./courier-dovecot-migrate.pl --to-dovecot --recursive --convert /home Converting to Dovecot format Finding maildirs under /home /home/testuser01/Maildir: No imap/pop3 uidlist files /home/testuser02/Maildir: No imap/pop3 uidlist files Total: 346 mailboxes / 346 users 0 errors 346 dovecot-uidlist files written WARNING: Badly done migration will cause your IMAP and/or POP3 clients to re-download all mails. Read http://wiki.dovecot.org/Migration carefully. |