我想问一下,正常迁移后,extmail与roundwebmail都能正常的使用且显示迁移前的邮箱吗?

driver = mysql
default_pass_scheme = CRYPT
connect = host=localhost dbname=vmail user=vmail password=56789)8665
password_query = SELECT password FROM mailbox WHERE username='%u' AND active='1' AND expired >= NOW()
user_query = SELECT CONCAT("/home/vmail/", maildir) AS home,     "/home/vmail/sieve/%Ld/%Ln/" AS sieve_dir,     CONCAT('*:bytes=', quota*1048576) AS quota_rule      FROM mailbox     WHERE username='%u'     AND active='1'     AND enable%Ls='1'     AND expired >= NOW()
麻烦Bibby了!!!

mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/
ls -l /home/vmail/a0/b0/test.com/e0/7a/aaa/
total 40
-rwx------ 1 vmail vmail  141 Jun  5 13:51 abook.cf
drwx------ 2 vmail vmail 4096 May 26 11:17 cur
-rwx------ 1 vmail vmail 8192 Jun  5 13:50 extmail-curcache.db
-rwx------ 1 vmail vmail   11 Jun  5 13:50 extmail-curcnt
drwx------ 3 vmail vmail 4096 Jun  5 13:51 test.com
drwx------ 9 vmail vmail 4096 Jun  5 15:18 Maildir
-rw------- 1 vmail vmail   45 Jun  5 14:51 maildirsize
drwx------ 2 vmail vmail 4096 May 26 11:16 new
drwx------ 2 vmail vmail 4096 Jun  5 14:50 tmp
Roundcubemail自己又建了test.com

dovecot: Jun 05 15:18:32 Info: auth(default): client out: OK    1       user=aaa
@test.com
dovecot: Jun 05 15:18:32 Info: auth(default): master in: REQUEST        8       
2473    1
dovecot: Jun 05 15:18:32 Info: auth-worker(default): sql(aaa@test.com,127
.0.0.1): SELECT CONCAT("/home/vmail/", maildir) AS home,     "/home/vmail/sieve/
test.com/aaa/" AS sieve_dir,     CONCAT('*:bytes=', quota*1048576) AS quo
ta_rule      FROM mailbox     WHERE username='aaa@test.com'     AND activ
e='1'     AND enableimap='1'     AND expired >= NOW()
dovecot: Jun 05 15:18:32 Info: auth(default): master out: USER  8       aaa@test
.com     home=/home/vmail/a0/b0/test.com/e0/7a/aaa/       sieve_di
r=/home/vmail/sieve/test.com/aaa/        quota_rule=*:bytes=1099511627776
dovecot: Jun 05 15:18:32 Info: imap-login: Login: user=<aaa@test.com>, me
thod=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
dovecot: Jun 05 15:18:32 Info: IMAP(aaa@test.com): Loading modules from d
irectory: /usr/lib/dovecot/imap
dovecot: Jun 05 15:18:32 Info: IMAP(aaa@test.com): Module loaded: /usr/li
b/dovecot/imap/lib10_quota_plugin.so
dovecot: Jun 05 15:18:32 Info: IMAP(aaa@test.com): Module loaded: /usr/li
b/dovecot/imap/lib11_imap_quota_plugin.so
dovecot: Jun 05 15:18:32 Info: IMAP(aaa@test.com): Module loaded: /usr/li
b/dovecot/imap/lib20_zlib_plugin.so
dovecot: Jun 05 15:18:32 Info: IMAP(aaa@test.com): Effective uid=500, gid
=500, home=/home/vmail/a0/b0/test.com/e0/7a/aaa/
dovecot: Jun 05 15:18:32 Info: IMAP(aaa@test.com): Quota root: name= back
end=maildir args=
dovecot: Jun 05 15:18:32 Info: IMAP(aaa@test.com): Quota rule: root= mail
box=* bytes=1099511627776 (0%) messages=0 (0%)
dovecot: Jun 05 15:18:32 Info: IMAP(aaa@test.com): maildir: data=//home/v
mail/a0/b0/test.com/e0/7a/aaa//Maildir/:INDEX=//home/vmail/a0/b0/test
.com/e0/7a/aaa//Maildir/
dovecot: Jun 05 15:18:32 Info: IMAP(aaa@test.com): maildir++: root=//home
/vmail/a0/b0/test.com/e0/7a/aaa//Maildir, index=, control=, inbox=//home/
vmail/a0/b0/test.com/e0/7a/aaa//Maildir
dovecot: Jun 05 15:18:32 Info: IMAP(aaa@test.com): Disconnected: Logged o
ut bytes=337/1052
dovecot: Jun 05 15:18:32 Info: auth(default): new auth connection: pid=2475

[ 本帖最后由 ikic 于 2009-6-5 16:20 编辑 ]

dovecot不重建邮箱目录了,但现在,用extmail登录后显示迁移前的邮箱,可是不能接收邮件,而用roundcubemail是可以接受邮件,但不显示迁移前的邮箱!!!:L

按您的新的迁移文档作了后,那我将原先 ExtMail/EMOS 邮件系统里的邮件目录直接复制到/home/vmail下,把原先实际的邮箱路径 A0/B0/test.com/E0/7A/aaa/Maildir/,都改为a0/b0/test.com/e0/7a/aaa/这样对吗?

[ 本帖最后由 ikic 于 2009-6-5 15:14 编辑 ]

这个路径是装EMOS的后自动产生的,
那sql里保存的目录,也改成小写的吗?

这是迁移后实际的邮箱路径 A0/B0/test.com/E0/7A/aaa/Maildir/
这是Dovecot 自己又创建的路径 a0/b0/test.com/e0/7a/aaa/maildir/

mail_location = maildir:/%Lh/:INDEX=/%Lh/

下面是sql
| aaa@test.com       | $1$jXUX0BR9$nGTv8VcGIc.dAn/fM5n/r0 |            | A0/B0/test.com/E0/7A/aaa/Maildir/    | 1048576 | test.com |            | normal |          1 |          1 |          1 |             1 |              1 | 2009-03-25 14:42:34 | 0000-00-00 00:00:00 | 9999-12-31 00:00:00 |      1 |          |        | 1048576      |
| bbb@test.com     | $1$B1HtbWGp$jE/Y.xE8hU.tKXFJCqVeJ1 |            | A0/B0/test.com/31/F2/bbb/Maildir/  | 1048576 | test.com |            | normal |          1 |          1 |          1 |             1 |              1 | 2009-03-25 14:43:18 | 0000-00-00 00:00:00 | 9999-12-31 00:00:00 |      1 |          |        | 1048576      |

而且发现dovecot会自己重建邮箱目录:L

现在数据库的帐户是倒进去了,但原先EXTMAIL的邮箱里的帐户不能正常使用,例如:我用roundcubemail登录后,邮箱里是空的,但收发邮件可以。可是用EXTMAIL登录邮箱有迁移过来的邮件,可是不能接受邮件

mysql> SOURCE /tmp/mailbox.sql.iredmail;
现在显示
ERROR 1062 (23000): Duplicate entry 'aaa@test.com' for key 1
ERROR 1062 (23000): Duplicate entry 'bbb@test.com' for key 1

[ 本帖最后由 ikic 于 2009-6-4 17:28 编辑 ]

这是mailbox.sql的部分
aaa@test.com    $1$nnp8U7do$L1Wo6pb7/SYb8RiQOnl470    test.com/aaa/Maildir/    252428800000S    252428800000S    test.com    2008-06-16 09:30:00    1    aaa
bbb@test.com    $1$ZrxmNo1o$Kt1oWyzwvIIxn4/THdl1u1    test.com/bbb/Maildir/    252428800000S    252428800000S    test.com    2008-05-14 14:19:57    1    bbb

[ 本帖最后由 ikic 于 2009-6-4 14:59 编辑 ]

INSERT INTO mailbox (username, password, maildir, quota, netdiskquota, domain, created, active) values ("aaa@test.com", "$1$nnp8U7do$L1Wo6pb7/SYb8RiQOnl470", "test.com/aaa/Maildir/", 246512500, "test.com", "2008-06-16 09:30:00", "1");
INSERT INTO mailbox (username, password, maildir, quota, netdiskquota, domain, created, active) values ("bbb@test.com", "$1$ZrxmNo1o$Kt1oWyzwvIIxn4/THdl1u1", "test.com/bbb/Maildir/", 246512500, "test.com", "2008-05-14 14:19:57", "1");

我觉得是migrate_extmail_mailbox.sh有问题

我确认,每一步都是按您的DOC操作的

在此步:mysql> USE vmail;
mysql> SOURCE /tmp/mailbox.sql.iredmail;

按照你的提供的DOC迁移,会报错的,ERROR 1136 (21S01): Column count doesn't match value count at row 1
ERROR 1136 (21S01): Column count doesn't match value count at row 1
用EXTMAIL已经一年多了,之所以想迁移到IREDMAIL就是觉得EXTMAIL的技术文档太少,且对一些发现的BUG也无法解决。
由于单位的员工太多,而且用户的邮箱已经有40多G ,所以想完整的迁移到IREDMAIL,希望能看到新的迁移DOC,使迁移正常进行!!!