Dovecot无法为指定邮箱创建autoexpunge锁文件问题排查
Dovecot autoexpunge锁文件创建失败问题
配置详情
当前Dovecot邮箱存储路径配置:
mail_location = maildir:/var/vmail/%d/%n/Maildir
错误日志
每个邮箱对应的错误记录如下:
Error: autoexpunge: Couldn't create dovecot.autoexpunge.lock lock: file_create_locked(/var/vmail/<full_email>/dovecot.autoexpunge.lock) failed: safe_mkstemp(/var/vmail/<full_email>/dovecot.autoexpunge.lock) failed: No such file or directory
问题根源
Dovecot执行autoexpunge操作时,会尝试在/var/vmail/<full_email>/目录下生成dovecot.autoexpunge.lock锁文件,但程序未自动检查并创建<full_email>目录,导致因目录不存在触发“No such file or directory”错误。
临时修复方案
手动创建缺失的目录:
mkdir /var/vmail/<full_email>
执行该命令后,锁文件可正常创建和删除,错误不再出现。
已知配置限制
目前没有针对autoexpunge锁文件路径的专用配置项,尝试通过CONTROL选项指定锁文件到其他目录的方案也无法生效。
内容的提问来源于stack exchange,提问作者Sergey K
相关产品推荐
相关产品推荐

