原文地址:http://space.doit.com.cn/51460/viewspace-4943.html

在配置Postfix中遇到的一些问题及相关的解决方法,希望在遇到相同的问题时能起参考的作用.在这里有必要提到一些相关的日志文件,因为很多的错误都会在日志中有体现,日志文件的存放位置可以由用户定义,这里所说的日志文件是按前面的文章中定义的存放位置(http://waringid.blog.51cto.com/65148/58210),请自行参照更改.

显示信件列表:postqueue -p
显示信件內容:postcat -q Queue_ID
刪除各別信件:postsuper -d Queue_ID
全部刪除:postsuper -d ALL
扣住信件:postsuper -h Queue_ID
回复:postsuper -H Queue_ID
重新排程:
postsuper -r Queue_ID
postsuper -r ALL
清除信件:
postqueue -f (全部)
postqueue -s 主机名称(个别对象)
要查看Postfix的当前主要配置文件的存放路径:
postconf -n

系统日志:tail -f /var/log/messages
邮件日志:tail -f /var/log/maillog
clamd相关:tail -f /var/log/clamav/clamd.log  tail -f /var/log/clamav/freshclam.log
maildrop相关:tail -f /var/log/maildrop.log
apache相关:tail -f /usr/local/httpd/logs/error_log  tail -f /usr/local/httpd/logs/suexec_log
mysql相关:tail -f /usr/local/mysql/data/linux.linux.com.err
测试amavisd:amavisd -d config debug-sa
测试spam:spamassassin -D --lint
测试maildrop:maildrop -V 10 -dtest@test.com

问题一:
Q
Aug 7 22:26:22 mail postfix/smtpd[16829]: warning: xsasl_cyrus_server_get_mechanism_list:
no applicable SASL mechanisms
Aug 7 22:26:22 mail postfix/smtpd[16829]: fatal: no SASL authentication mechanisms
Aug 7 22:26:23 mail postfix/master[16825]: warning: process /usr/libexec/postfix/smtpd
pid 16829 exit status 1
Aug 7 22:26:23 mail postfix/master[16825]: warning: /usr/libexec/postfix/smtpd:
bad command startup -- throttling
Aug 7 22:28:06 mail postfix/smtpd[16830]: warning: xsasl_cyrus_server_get_mechanism_list:
no applicable SASL mechanisms
Aug 7 22:28:06 mail postfix/smtpd[16830]: fatal: no SASL authentication mechanisms
Aug 7 22:28:07 mail postfix/master[16825]: warning: process /usr/libexec/postfix/smtpd
pid 16830 exit status 1
A
ln -s /usr/local/lib/sasl2 /usr/lib/sasl2
问题二:
Q
Jan 15 20:24:43 localhost postfix/smtpd[3048]: warning: SASL authentication problem:
unable to open Berkeley db /etc/sasldb2: No such file or directory
A
系统已经安装sasl-cyrus 删除掉,然后编译重装
问题三:
Q
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains:
A
[root@redhat tmp]#tar zxvf DBD-mysql-3.0008.tar.gz 重新安装
问题四:
Q
Can't chdir to /home/mailbox//Maildir, No such file or directory
A
不能进入邮件目录,请先在extman后台建立postmaster用户
问题五:
Q
SELECT username, password, "", '1001', '1001', concat('/var/mailbox/',maildir), "", "",
username, "" FROM mailbox WHERE username = "test@test.com"
maildrop: Timeout quota exceeded.
A
请检查/usr/local/authlib/etc/authlib/mysqlauthrc的quota配置项
问题六:
Q
sh: /usr/sbin/sendmail: No such file or directory
A
ln -s /usr/local/postfix-2.2.8/src/sendmail/sendmail /usr/sbin/sendmail
问题八:
Q
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
A
[root@linux tmp]#rpm -ivh compat-libstdc++-33-3.2.3-47.3.i386.rpm
问题九:
Q
Starting mail statistics grapher: mailgraph_ext
Can't locate RRDs.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.5/i386-linux-thread-multi
A
ln -sv /usr/local/rrdtool/lib/perl/5.8.5/i386-linux-thread-multi/RRDs.pm \
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/
问题十:
Q
Can't locate loadable object for module RRDs in @INC (@INC contains:
/usr/lib/perl5/5.8.5/i386-linux-thread-multi
A
ln -sv /usr/local/rrdtool/lib/perl/5.8.5/i386-linux-thread-multi/auto/RRDs/RRDs.so \
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/
问题十一:
Q
Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/GD/GD.so'
for module GD: libgd.so.2:
cannot open shared object file: No such file or directory at
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm
line 230., referer:http://192.168.44.200/extman/cgi/index.cgi
A
[root@linux tmp]#vi /etc/ld.so.conf
[root@linux tmp]#less /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/X11R6/lib
/usr/local/mysql/lib
/usr/local/BerkeleyDB/lib
/usr/local/authlib/lib/courier-authlib
/usr/local/sasl2/lib
/usr/local/sasl2/lib/sasl2
/usr/local/clamav/lib
/usr/local/lib
/usr/local/authlib/lib/courier-authlib
/usr/local/gd/lib
/usr/local/jpeg/lib
/usr/local/fontconfig/lib
/usr/local/freetype2/lib
/usr/local/png/lib
[root@linux tmp]#ldconfig -v
问题七:
Q
Jan 28 05:04:56 linux postfix/pickup[13892]: DEBD68075: uid=0 from=<root>
Jan 28 05:04:56 linux postfix/cleanup[14026]: DEBD68075: hold: header Received:
by linux.test.com (Postfix, from userid 0)??id DEBD68075; Mon, 28 Jan 2008 05:04
:56 +0800 (CST) from local; from=<root@test.com>
Jan 28 05:04:56 linux postfix/cleanup[14026]: DEBD68075: message-id=<20080127210
456.DEBD68075@linux.test.com>
A
不要将amavisd和MailScanner装在一起##可能有其它解决办法吧
 
问题十二:
Q
httpd: Syntax error on line 99 of /etc/httpd/httpd.conf:
Cannot load /usr/local/\httpd/modules/libphp5.so into server: /usr/local/\httpd/modules/libphp5.so:
cannot restore segment prot after reloc: Permission denied
A
1:禁用selinux
2:chcon -t texrel_shlib_t /usr/local/apache2/modules/*.so
 
问题十三:
Q
Jun 20 15:29:08 mail authdaemond: authldaplib: sysusername=<null>, sysuserid=1001, sysgroupid=1001,
homedir=/var/mailbox/test.com/test01,address=test01@test.com, fullname=test01,
maildir=test.com/test01/Maildir/, quota=5242880S, ptions=<null>
Jun 20 15:29:08 mail authdaemond: authldaplib: clearpasswd=<null>,
passwd=$1$8pBM6cXc$Va6UkybwOdSyExU82pQ1A0
Jun 20 15:29:08 mail authdaemond: rebinding with DN
'mail=test01@test.com,virtualDomain=test.com,o=extmailAccount,dc=test.com'
to validate password
Jun 20 15:29:08 mail authdaemond: authentication bind failed, invalid credentials
A
vi /etc/authlib/authldaprc
72 #LDAP_AUTHBIND 1
 
问题十四:
Q
pop3d: chdir test.com/test01: No such file or directory
A
vi /etc/authlib/authldaprc
#LDAP_MAILDIR mailMessageStore
 
问题十五:
Q
configure: error: Please fix the library issues listed above and try again.
A
cp /usr/local/png/lib/pkgconfig/libpng.pc /usr/lib/pkgconfig/
问题十六:
Q
Can't locate GD.pm in @INC (@INC contains:
A
安装GD-2.35.tar.gz
问题十七:
Q
怎样查看postfix日志成功接收到邮件:(交货到邮件目录)
A
cat /var/log/maillog |grep "delivered to maildir"
cat /var/log/maillog |grep "delivered to maildir" | egrep -o "(\w+)([@]{1}\w+[.]{1,})(\w+)"
问题十八:
Q
怎样取当天日志:
A
cat /var/log/maillog | egrep "`data | awk "`'{print ""$2" "$3""}'`"
问题十九:
Q
怎样取指定日期日志:
A
cat /var/log/maill | grep "^Sep\ 25" | egrep "reject|warning|error|fatal|panic" | more
  慢慢再增加吧.

Postfix配置Q&A的更多相关文章

  1. linux邮件服务器postfix配置实例

    linux邮件服务器postfix配置实例(超级详细!!!) 2013-03-13 13:30:21 标签:邮件服务器 linux 1. 系统安装:1)centos4.3 选上MAIL组件里的全部.2 ...

  2. postfix配置积累(不断的积累)

    postfix 配置 1.mail_name 默认是Postfix.在收件人信头可以查看,如果不想让别人知道你是用postfix发的,则可以改成其它名字,如:postconf -e mail_name ...

  3. postfix配置&使用

    myorigin = $mydomain #以“user@example.com”(而不是“user@hostname.example.com”)发送邮件, #这样就没有理由将邮件发送到“user@h ...

  4. postfix配置spf认证和dkim认证

    1.为邮箱域名添加spf认证: 登录域名解析控制台添加txt记录: v=spf1 include:spf1.domain.com ~all spf1.domain.com  A记录解析到你的固定IP ...

  5. Linux postfix配置方法

    第七题 配置邮件服务器 postfix学习网站:https://blog.csdn.net/mycms5/article/details/78773308  system1和systemc2分别执行 ...

  6. Nginx配置Q&A

    隐藏响应头 How can remove Nginx from http response header? - Stack Overflow more_set_headers 'Server: my- ...

  7. Linux学习19-gitlab配置邮箱postfix(新用户激活邮件)

    前言 gitlab新增新用户有两种方式,第一种可以用户主动注册(自己设置密码):第二种也可以通过root管理员用户直接添加用户,发个邮件到用户的邮箱里,收到邮件后激活. 如果是第二种方式添加新用户的话 ...

  8. Linux中Postfix邮件安装配置(二)

    本套邮件系统的搭建,从如何发邮件到收邮件到认证到虚拟用户虚拟域以及反病毒和反垃圾邮件等都有详细的介绍.在搭建过程中必须的参数解释以及原理都有告诉,这样才能更好地理解邮件系统. 卸载自带postfix ...

  9. 烂泥:Postfix邮件服务器搭建之软件安装与配置

    本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb Postfix邮件服务器的搭建需要使用到几个软件,分别是cyrus-sasl.postf ...

随机推荐

  1. Pyhon中的除法

    Python中分为3种除法:传统除法.精确除法.地板除. 传统除法: 如果是整数除法则执行地板除,如果是浮点数除法则执行精确除法. >>>1/2 0 >>>1.0/ ...

  2. Hive简介

    实验简介 我们本节课程主要介绍 Hive 的相关知识,将会涉及以下内容: Hive 的定义 Hive 的体系结构 Hive 与关系数据库的区别 Hive 的应用场景 Hive 的存储 一.什么是 Hi ...

  3. 第二部分 MediaPlayer的接口与架构

    第二部分 MediaPlayer的接口与架构 2.1 整体框架图         MediaPlayer的各个库之间的结构比较复杂,可以用下图的表示     在各个库中,libmedia.so位于核心 ...

  4. innodb 悲观锁,乐观锁

    转 http://www.cnblogs.com/chenwenbiao/archive/2012/06/06/2537508.html CREATE TABLE `products` ( `id` ...

  5. 深入理解Java虚拟机 - 虚拟机内存划分

    在内存管理方面,Java相对于C和C++的区别在于Java具有内存动态分配以及垃圾收集技术,但平时我们很少去关注JVM的内存结构以及GC,在出现内存泄露或溢出方面的问题,排查工作将变得异常艰难.   ...

  6. ubuntu下安装JDK详解

    码农博客 即将到期,现将博客中部分文章转载到博客园.本文发表与2012年,转载时略有删减 安装JDK其实只要搞定两个问题,安装目录以及配置文件.如果你只想要快速安装JDK,请略过此部分直接看安装篇. ...

  7. selenium Grid

    Selenium Grid 的机制是启动一个 hub,然后启动多个 Selenium RC 注册到 hub 上, 当测试请求到 hub 时,hub 会将测试分发给 Selenium RC, Selen ...

  8. PHP 安全检测代码片段

    /** * html转换输出(只转义' " 保留Html正常运行) * @param $param * @return string */ function htmlEscape($para ...

  9. 微软Azure云主机及blob存储的网络性能测试

    http://www.cnblogs.com/sennly/p/4137024.html 微软Azure云主机及blob存储的网络性能测试 1. 测试目的 本次测试的目的在于对微软Azure的云主机. ...

  10. input file里的JQ change() 事件的只生效一次

    文件选择框的onchange事件只在第一次改变时生效,以后再选择文件不会触发onchange事件. 解决方法1:用jQuery的live代替直接使用change. 错误代码: $("#Upl ...