dovecot主要配置文件

主配置文件 /usr/local/etc/dovecot/dovecot.conf

# Protocols we want to be serving.
protocols = imap pop3 lmtp
 
# A comma separated list of IPs or hosts where to listen in for connections. 
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
listen = *

认证文件 /usr/local/etc/dovecot/conf.d/10-auth.conf

disable_plaintext_auth = no
auth_mechanisms = plain login
#!include auth-system.conf.ext
!include auth-sql.conf.ext

ssl配置文件 /usr/local/etc/dovecot/conf.d/10-ssl.conf 设置为no,注释掉ssl_cert,如要启用,则要创建ssl_key

ssl = no
#ssl_cert = </etc/ssl/certs/dovecot.pem
#ssl_key = </etc/ssl/private/dovecot.pem

日志文件 /usr/local/etc/dovecot/conf.d/10-logging.conf 指定的日志文件记得给权限,我指定的777

log_path = /var/log/dovecot.log
auth_debug = yes
mail_debug = yes

邮箱配置 /usr/local/etc/dovecot/conf.d/10-mail.conf uid和gid是开始建立的postfix的id

mail_home = /home/xmail/%d/%n
mail_location = maildir:~/Maildir
first_valid_uid = 1010
first_valid_gid = 1010

配合postfix /usr/local/etc/dovecot/conf.d/10-master.conf

unix_listener auth-userdb {
    mode = 0600
    user = tmail
    group = tmail
  }
# Postfix smtp-auth
    unix_listener /var/spool/postfix/private/auth {
      mode = 0666
    user = postfix
    group = postfix
   }

指定sql配置文件 /usr/local/etc/dovecot/conf.d/auth-sql.conf.ext

passdb {
  driver = sql
  # Path for SQL configuration file, see example-config/dovecot-sql.conf.ext
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
}
userdb {
  driver = sql
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
}

mysql配置文件 /usr/local/etc/dovecot/dovecot-sql.conf.ext

driver = mysql
connect = host=localhost dbname=postfix user=root password=123456
default_pass_scheme = MD5
password_query = \
  SELECT username,password \
  FROM mailbox WHERE username = '%u' AND active = '1'
##下面的1020 是指邮件存储目录的uid gid
user_query = \
  SELECT maildir,1020 AS uid,1020 AS gid \
  FROM mailbox WHERE username = '%u' AND active = '1'

邮箱目录 /usr/local/etc/dovecot/conf.d/15-mailboxes.conf

##
## Mailbox definitions
##
 
# NOTE: Assumes "namespace inbox" has been defined in 10-mail.conf.
namespace inbox {
 
  #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 {
    auto = subscribe
    special_use = \Drafts
  }
  mailbox Junk {
    auto = subscribe
    special_use = \Junk
  }
  mailbox Trash {
    auto = subscribe
    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 {
    auto = subscribe # autocreate and autosubscribe the Sent mailbox
    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 {
    auto = subscribe
    special_use = \Flagged
  }
}

转载于:https://my.oschina.net/hxily/blog/465090

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Dovecot的完整配置文件包括以下几个部分: 1. SQL配置文件:路径为/usr/local/etc/dovecot/conf.d/auth-sql.conf.ext,其包括了用于身份验证和用户数据库的SQL驱动程序配置。\[1\] 2. 日志配置文件:路径为/usr/local/etc/dovecot/conf.d/10-logging.conf,其包括了指定的日志文件路径和权限设置,以及调试选项。\[2\] 3. 其他配置文件:除了上述两个文件外,Dovecot还有其他配置文件,用于配置各种功能和选项。这些文件可以根据需要进行配置,以满足特定的需求。 总的来说,Dovecot是一个开源的软件,用于提供IMAP和POP3服务。它的配置简单,性能高效,适用于各种规模的应用。\[3\] #### 引用[.reference_title] - *1* *2* [dovecot主要配置文件](https://blog.csdn.net/weixin_34090643/article/details/91671535)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [Dovecot配置笔记](https://blog.csdn.net/weixin_29877175/article/details/113563340)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值