将配置文件dovecot.conf的内容替换成以下代码,其他配置文件默认,基本上都能实现正常接收。
记得先行备份原文件。
附ubuntu下常用的dovecot相关命令:
查看dovecot监听的端口:sudo netstat -nutpl | grep dovecot
重启dovecot:sudo service dovecot restart
本篇适用于dovecot2.0版本配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
## Dovecot configuration file !include_try /usr/share/dovecot/protocols.d/*.protocol dict { #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext } !include conf.d/*.conf !include_try local.conf protocols = pop3s //根据需要可以增加pop3 imap等 service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0660 user = postfix } unix_listener auth-master { mode = 0600 user = vmail } user = root } passdb { driver = sql args = /etc/dovecot/dovecot-sql.conf } userdb { driver = static args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes } ## conf.d/auth.conf disable_plaintext_auth = yes //禁止明文密码认证,就是禁止通过110端口接收 ## conf.d/logging.conf log_timestamp = "%Y-%m-%d %H:%M:%S " ## conf.d/mail.conf mail_location = maildir:/home/vmail/%d/%n/Maildir namespace { inbox = yes location = prefix = INBOX. separator = . } ## conf.d/ssl.conf ssl = yes # ssl_cert = </etc/ssl/certs/dovecot.pem # ssl_key = </etc/ssl/private/dovecot.pem ## conf.d/lda.conf protocol lda { auth_socket_path = /var/run/dovecot/auth-master log_path = /home/vmail/dovecot-deliver.log postmaster_address = info@xxxxx.com //自定义修改为自己的地址 } ## conf.d/pop3.conf protocol pop3 { pop3_uidl_format = %08Xu%08Xv } |