文档章节

dovecot主要配置文件

 超级超级管理员
发布于 2015/06/10 15:14
字数 501
阅读 76
收藏 0

主配置文件 /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
  }
}

© 著作权归作者所有

粉丝 2
博文 183
码字总数 77424
作品 0
成都
运维
私信 提问
centos7.3配置邮件服务器(postfix+dovecot+sasl认证)亲测可用

简介: 邮件系统中的角色:MUA(邮件用户代理)MTA(邮件传输代理)MDA(邮件投递代理)。 postfix:发信服务软件,简单的邮件传输协议(SMTP),tcp25端口; dovecot:收信服务软件,是开源得IMA...

一场大火
2017/07/27
0
0
postfix+dovecot+foxmail虚拟用户配置

本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 在前一篇文章《烂泥:Postfix邮件服务器搭建之软件安装与配置》中,我们介绍了psotfix邮件服...

焉哉乎也
2017/05/08
0
0
[邮件] Postfix + Dovecot + Postfixadmin + Roundcubemail 企业邮件解决方案

近期给一个朋友的公司搭建一套邮件服务系统,于是在这方面做了一些调查和选型的工作,对比了诸多邮件服务器的解决方案,最后决定采用 iRedmail (http://www.iredmail.org/ ) 里面所提供的 Po...

长平狐
2013/07/01
5.4K
2
CentOS 7之Postfix部署系列(三)postfix和Dovecot配置

-----提供ADExchangeLyncSharepointCRMSCO365等微软产品实施及外包,QQ:185426445.电话18666943750 https://tecadmin.net/install-and-configure-postfix-on-centos-redhat/ https://blog.c......

zhou_ping
2018/07/30
0
0
[邮件] Postfix + Dovecot + Postfixadmin + Roundcubemail 企业邮件解决方案

近期给一个朋友的公司搭建一套邮件服务系统,于是在这方面做了一些调查和选型的工作,对比了诸多邮件服务器的解决方案,最后决定采用 iRedmail (http://www.iredmail.org/ ) 里面所提供的 Po...

长平狐
2012/11/19
367
0

没有更多内容

加载失败,请刷新页面

加载更多

VMware Workstation 15基本介绍

VMware Workstation 15中文版是PC上最强大的虚拟机软件,也是功能强大的桌面虚拟计算机软件,中文名“威睿工作站”,提供用户可在单一的桌面上同时运行不同的操作系统,和进行开发、测试 、部...

linjin200
10分钟前
0
0
开源抢票软件,助你回家过端午

不知道有多少小伙伴跟我一样,是个在外漂泊的程序猿。逢年过节最头疼的就是购买一张回家的车票。所以我今天来分享一款最新的开源12306抢票软件,当然,也是在GitHub上开源分享的精品软件。 ...

编程资源库
18分钟前
1
0
feign 请求超时,请求没有到服务端

加了个请求头后请求有时候会超时,最开始把所有的头都加进来了,后来只加了个sessionid就没有问题了 @Slf4jpublic class FeignBasicAuthRequestInterceptor implements RequestIntercepto...

xiaomin0322
22分钟前
1
0
centos6经验

由于配置文件中没有include项,故添加了此项的配置文件中的任务均识别不出来,故只能放在软件自带的配置文件中方能正常识别。

dragon_tech
23分钟前
1
0
我的Linux系统开始学习的过程

Linux系统,不知大家是否了解。接触计算机不多或对计算机不感冒的人可能对其比较陌生,曾经的我也是。上大学前的我的确对Linux一无所知,那时候接触面窄,都没有听说过此名字,上了大学后,身...

linux-tao
28分钟前
4
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部