postfix常用错误解决方案
来源:互联网 发布:通信网络维护 编辑:程序博客网 时间:2024/06/16 19:54
FAQ
1. 启动 postfix 报错
#/usr/sbin/postfix start
postfix: fatal: /etc/postfix/main.cf, line 34: missing '=' after attribute name: "permit_mynetworks,"
1. 启动 postfix 报错
#/usr/sbin/postfix start
postfix: fatal: /etc/postfix/main.cf, line 34: missing '=' after attribute name: "permit_mynetworks,"
原因 smtpd_recipient_restrictions =后面的选项要连续,不能换行
改成
smtpd_recipient_restrictions =permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination,permit
改成
smtpd_recipient_restrictions =permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destination,permit
2. 不能正常启动 postfix ,无报错
查看 tail -f /var/log/maillog
Jun 16 17:57:45 ud20009 postfix/postfix-script[2770]: starting the Postfix mail system
Jun 16 17:57:45 ud20009 postfix/master[2771]: fatal: /etc/postfix/master.cf: line 103: bad transport type: user=vmail:vmail
查看 tail -f /var/log/maillog
Jun 16 17:57:45 ud20009 postfix/postfix-script[2770]: starting the Postfix mail system
Jun 16 17:57:45 ud20009 postfix/master[2771]: fatal: /etc/postfix/master.cf: line 103: bad transport type: user=vmail:vmail
修改
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
3.fatal: open database /etc/aliases.db: No such file or directory
文件存在,但是格式不对,导致的原因可能是aliases.db文件是由Berkeley DB版本1创建的,
但是你 现在使用的是版本2或者3,或者这个文件是用btree格式建立的,但是postfix能识别的格式是hash,
解决的方法是以root的身份执 行newaliases,这样就能建立一个postfix能识别的aliases.db文件。
# touch /etc/aliases
# newaliases
# newaliases
4. warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
warning: unsupported SASL server implementation: cyrus
fatal: SASL per-process initialization failed
warning: process /usr/libexec/postfix/smtpd pid 16840 exit status 1
warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
warning: unsupported SASL server implementation: cyrus
fatal: SASL per-process initialization failed
warning: process /usr/libexec/postfix/smtpd pid 16840 exit status 1
warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
原因2.3版本以后需要加入对CYRUS的认证
解决方法 加入-DUSE_CYRUS_SASL选项,重新编译。
make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include -DUSE_CYRUS_SASL -I/usr/local/include/sasl' 'AUXLIBS=-L/usr/local/mysql/lib -lmysqlclient -lz -lm -L/usr/local/lib -lsasl2'
make && make install
make && make install
5. postfix启动报错
Jun 17 12:09:25 ud20009 postfix/smtpd[11023]: warning: smtpd_sasl_auth_enable is true, but SASL support is not compiled in
Jun 17 12:09:25 ud20009 postfix/smtpd[11023]: connect from unknown[125.34.78.179]
Jun 17 12:09:25 ud20009 postfix/trivial-rewrite[11026]: warning: do not list domain win123.cn in BOTH virtual_mailbox_domains and relay_domains
原因还是在编译postfix时没有 加入-DUSE_SASL_AUTH。
正确的是
make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include \
-DUSE_CYRUS_SASL -DUSE_SASL_AUTH -I/usr/local/include/sasl' \
'AUXLIBS=-L/usr/local/mysql/lib -lmysqlclient -lz -lm -L/usr/local/lib -lsasl2'
make && make install make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include \
-DUSE_CYRUS_SASL -DUSE_SASL_AUTH -I/usr/local/include/sasl' \
'AUXLIBS=-L/usr/local/mysql/lib -lmysqlclient -lz -lm -L/usr/local/lib -lsasl2'
0 0
- postfix常用错误解决方案
- postfix 发信错误
- postfix 错误汇总
- Linux常用的postfix命令
- 嵌入式 内核编译错误常用解决方案
- Postfix
- postfix
- postfix
- postfix
- postfix
- postfix
- postfix的esmtp用saslauthd 认证错误
- postfix smtpd_recipient_restrictions配置错误导致smtpd问题
- Postfix 日志 connect from unknown错误
- Postfix配置文件main.cf中的常用参数
- Android Studio常用插件——postfix
- Postfix 邮件系统常用测试与管理命令
- cocos2d-x 常用错误解决方案(遇到一个更新一个)
- AOJ759会绕圈的数
- 计算机视觉领域期刊
- javaSE第三部分下 面向对象下
- Redis实现分布式锁
- Android studio 正式签名打包
- postfix常用错误解决方案
- Easy Problem VI
- mysql的存储引擎innodb、myisam对插入影响和索引对插入的影响
- HTML--学习笔记第一天
- docker安装的bug(Win10)
- final常量和Scanner输入
- Git使用总结(包含Git Bash和Git GUI的使用)(赞)
- java编程思想-第18章-java I/O系统
- java 基础知识二(抽象类‘、接口)