内部邀请码: C8E245J (不写邀请码,没有现金送)
国内私募机构九鼎控股打造,九鼎投资是在全国股份转让系统挂牌的公众公司,股票代码为430719,为“中国PE第一股”,市值超1000亿元。
若从源码安装 dovecot,解压dovecot 源码,安装。安装时注意带上 --with-pam 选项
配置
- # cp /usr/local/share/doc/dovecot/example-config/dovecot.conf /etc/dovecot/ # 建立dovecot配置文件
- # cp -r /usr/local/share/doc/dovecot/example-config/conf.d /etc/dovecot/ # 建立dovecot配置文件的需求文件
- # vi /etc/dovecot/dovecot.conf
- 20 protocols = imap pop3 lmtp # 支持邮局协议
- # vi /etc/dovecot/conf.d/10-auth.conf
- 9 disable_plaintext_auth = no#允许明文密码验证
- # vi /etc/dovecot/conf.d/10-ssl.conf
- 6 ssl = no # 禁用s
- # vi /etc/dovecot/conf.d/10-mail.conf
- 24 mail_location = maildir:~/Maildir # 邮件存储格式及位置
- // 创建PAM认证文件
- # vi /etc/pam.d/dovecot
- auth required pam_nologin.so
- auth include system-auth
- account include system-auth
- sesssion include system-auth
- # dovecot # 启动服务
【注意】在 dovecot 2.0 以后,已经使用 bin/doveadm pw 替换了 bin/dovecotpw
测试:
# telnet localhost 110
出现+Ok Dovecot ready.则正确
还记得我们上一篇发的一个测试邮件吧… 这里我们就收到了
错误总结
1、
错误:
dovecot 启动时 显示 ssl_cert_file:Can't use /etc/ssl/certs/dovecot.pem
解决
// 创建两个文件夹
mkdir –p /etc/ssl/certs/
mkdir –p /etc/ssl/private
进入到源码包解压目录
cd doc
sh mkcert.sh
错误:
telnet 110端口的时候停在Escape character is ‘^]’.
不出现+Ok Dovecot ready.
日志信息:
Aug 4 16:52:35 localhost dovecot: auth: Fatal: Support not compiled in for passdb driver 'pam'
Aug 4 16:52:35 localhost dovecot: master: Error: service(auth): command startup failed, throttling
Aug 4 16:53:17 localhost dovecot: master: Warning: Killed with signal 15 (by pid=17402 uid=0 code=kill)
Aug 4 16:53:18 localhost dovecot: pop3-login: Error: auth: connect(login) failed: Connection refused
Aug 4 16:53:54 localhost dovecot: pop3-login: Disconnected: Shutting down (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
解决:
预编译时加入参数 –with-pam
yum –y install pam-devel
./configure –sysconfdir=/etc –with-pam –with-mysql
make && make install