大网数据广告活动
服务器运维问答

How to force Dovecot to reindex raw email files?

· 52CE 我爱测

I have an email server running (Postfix and Dovecot). I also have an archive of a bunch of raw email files that look like this: 1492038516.M77184P7110.mail2.mysite.com,S=39609,W=40258:2,Sab I would've used imapsync to get these o…

问题原文

原帖链接 · ffxsam · CC BY-SA 3.0

I have an email server running (Postfix and Dovecot). I also have an archive of a bunch of raw email files that look like this:

1492038516.M77184P7110.mail2.mysite.com,S=39609,W=40258:2,Sab

I would've used imapsync to get these onto the mail server, but they're already archived on my Mac. So I copied about 1500 of these files directly into /var/vmail/domain/user/.Sent/cur on my mail server, however, things look a bit odd in RoundCube:

Just dozens of pages of a single (no subject) message.

Is there some way to force Dovecot to properly reindex everything? Because something is definitely wrong here, but I have no idea how to fix it. Or if there's a better way to import raw email files, I'd love to hear it.

社区高分解答

原帖链接 · Jens Erat · CC BY-SA 4.0

Usually, Dovecot is very good at recognizing broken mailboxes and fixes issue on its own. Anyway, doveadm force-resync can be used to reindex in this very case.

Anyway, you should rather use doveadm import to copy those mails back into Dovecot instead of directly fiddling with Dovecot's mailbox folders, even if using MailDir: it will prevent wrong indexes from the beginning.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-05-04)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。