祥磊部落

随机出现的你

VestaCP - Roundcube Webmail登录出现“连接至 IMAP 服务器失败”解决

半年来一次博客,总是出现大大小小的问题.今天在验证部分邮箱时出现了这个问题。

官方论坛也有相应的解决方法,简简单单.一般先检查运行状态还有相关的日志。

检查imap(dovecot)是否在正常运行.

service dovecot status

查看imap(dovecot)日志

tail /var/log/dovecot.log

日志已经说明了详细内容.懒得上图了.

 

解决方案

在15-mailboxes.conf配置文件中添加上“inbox = yes”即可

编辑15-mailboxes.conf

vi /etc/dovecot/conf.d/15-mailboxes.conf

配置文件如下.

##
## Mailbox definitions
##
# NOTE: Assumes "namespace inbox" has been defined in 10-mail.conf.
namespace inbox {
inbox = yes # added this one
  #mailbox name {
    # auto=create will automatically create this mailbox.
    # auto=subscribe will both create and subscribe to the mailbox.
    #auto = no

    # Space separated list of IMAP SPECIAL-USE attributes as specified by
    # RFC 6154: \All \Archive \Drafts \Flagged \Junk \Sent \Trash
    #special_use =
  #}

  # These mailboxes are widely used and could perhaps be created automatically:
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Trash {
    special_use = \Trash
  }

  # For \Sent mailboxes there are two widely used names. We'll mark both of
  # them as \Sent. User typically deletes one of them if duplicates are created.
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }

  # If you have a virtual "All messages" mailbox:
  #mailbox virtual/All {
  #  special_use = \All
  #}

  # If you have a virtual "Flagged" mailbox:
  #mailbox virtual/Flagged {
  #  special_use = \Flagged
  #}
 inbox = yes
}

 

sed命令添加

sed -i "s#namespace inbox {#namespace inbox {\n inbox = yes#" /etc/dovecot/conf.d/15-mailboxes.conf

然后重启dovecot解决

service dovecot restart

 

相关参考信息:https://github.com/serghey-rodin/vesta/commit/c32fa673e15272779de2934d410fff72cb6702c3

点赞

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据