postfix安装记录五-安装过程的出现的问题

配置过程中出现的一些问题:


1,如果日志中出现如下提示


Oct5 15:07:03 mail postfix/smtpd[3522]: connect frommail.test.com[192.168.80.58]

Oct 5 15:07:30 mail authdaemond: received authrequest, service=smtp, authtype=login

Oct5 15:07:30 mail authdaemond: authmysql: trying this module

Oct5 15:07:30 mail postfix/smtpd[3522]: warning: SASL authenticationfailure: could not verify password

Oct 5 15:07:30 mail postfix/smtpd[3522]: warning:mail.test.com[192.168.80.58]: SASL login authentication failed: generic failure

Oct5 15:07:30 mail authdaemond: failed to connect to mysql server(server=localhost, userid=extmail): Can't connect to local MySQL server through

socket '/tmp/mysql.sock ' (2)

Oct5 15:07:30 mail authdaemond: authmysql: TEMPFAIL - no more modules willbe tried


解决思路:除了要坚持smtpd.confauthdaemon的权限之外还需要彻底的检查authmydqlrc这个配置文件,尽量不要去复制网上的文件,手工配置.



[root@mail authlib]# perl -MMIME::Base64 -e"print encode_base64('[email protected]');"

dGVzdDFAdGVzdC5jb20=

[root@mail authlib]#

[root@mail authlib]# perl -MMIME::Base64 -e"print encode_base64('123456');"

MTIzNDU2

[root@mail authlib]#

[root@mail authlib]# cd /

[root@mail /]# hostname

mail.test.com

[root@mail /]# telnet mail.test.com 25

Trying 192.168.80.58...

Connected to mail.test.com (192.168.80.58).

Escape character is '^]'.

220 Welcome to our mail.test.comESMTP,Warning: Version not Available!

ehlo test1

250-mail.test.com

250-PIPELINING

250-SIZE 52428800

250-ETRN

250-AUTH PLAIN LOGIN

250-ENHANCEDSTATUSCODES

250-8BITMIME

250 DSN

auth login

334 VXNlcm5hbWU6

dGVzdDFAdGVzdC5jb20=

334 UGFzc3dvcmQ6

MTIzNDU2

235 2.7.0 Authentication successful



2、日志中出现许多类似的日志提示:


Oct6 18:13:56 mail imapd: Maximum connection limit reached for192.168.40.218

而且客户端出现下面的提示,


110249274.jpg


解决如下

[root@mail ~]# perl -p -i -e's/^MAXDAEMONS=40/MAXDAEMONS=80/g'

/usr/local/courier-imap/etc/imapd

[root@mail ~]# perl -p -i -e's/^MAXPERIP=4/MAXPERIP=40/g' /usr/local/courier-imap/etc/imapd


/etc/init.d/courier-imap stop

/etc/init.d/courier-imap start





3、如果报错提示


DBD::mysql::st execute failed: DELETEcommand denied to user 'extmail'@'localhost' for table 'domain_manager' at

/var/www/extsuite/extman/libs/Ext/Mgr/MySQL.pmline 757.


解决:进入mysql

grant all privileges on *.* to'extmail'@'localhost' identified by 'extmail' with grant option;

Query OK, 0 rows affected (0.00 sec)


4、验证不通过问题

[root@mail extra]# perl -e 'useMIME::Base64; print

encode_base64("postmaster\@extmail.org")';

cG9zdG1hc3RlckBleHRtYWlsLm9yZw==

[root@mail extra]# perl -e 'useMIME::Base64; print encode_base64("extmail")';

ZXh0bWFpbA==

[root@mail extra]# telnet localhost 25

Trying 127.0.0.1...

Connected to localhost.localdomain(127.0.0.1).

Escape character is '^]'.

220 mail.beijihu.com ESMTP Postfix (2.8.15)

auth login

334 VXNlcm5hbWU6

cG9zdG1hc3RlckBleHRtYWlsLm9yZw==

334 UGFzc3dvcmQ6

ZXh0bWFpbA==

5355.7.8 Error: authentication failed: generic failure



解决

1、查看/usr/local/sasl2/lib/sasl2/smtpd.conf的权限

-rw-r--r-- 1 root root148 Oct1 21:14 smtpd.conf


修改为

-rwxr-xr-x 1 root root148 Oct1 21:14 smtpd.conf



2、查看/usr/local/courier-authlib/authdaemon 权限

drwxr-x--- 2 vmail vmail 4096 Oct3 00:53 authdaemon


修改为

[root@mail spool]# chmod 755 authdaemon/

drwxr-xr-x 2 vmail vmail 4096 Oct3 00:53 authdaemon


[root@mail spool]# cd authdaemon/

[root@mail authdaemon]# ll

total 4

-rw-r--r-- 1 root root 5 Oct3 00:53 pid

-rw------- 1 root root 0Oct1 20:54 pid.lock修改为下面的权限

srwxrwxrwx 1 root root 0 Oct3 00:53 socket

[root@mail authdaemon]# chmod 755 pid.lock

[root@mail authdaemon]# ll

total 4

-rw-r--r-- 1 root root 5 Oct3 00:53 pid

-rwxr-xr-x 1 root root 0 Oct120:54 pid.lock

srwxrwxrwx 1 root root 0 Oct3 00:53 socket



5、如果邮件服务器搭建完毕后只收不到邮件,有可能是你装了反垃圾邮件后,在测试邮件时垃圾邮件被过滤掉了,因为默认的

# $final_spam_destiny = D_BOUNCE; //不传递给收件人

修改为

$final_spam_destiny = D_PASS; //不做任何处理,直接传送给收件人



6、没有加载mysql连接出现的问题

configuration files.
config_directory: [] /etc/postfix
bin/postconf: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
bin/postconf: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
bin/postconf: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory


Please specify the final destination directory for installed Postfix
administrative commands. This directory should be in the command search
path of adminstrative users.



解决方法如下


# vi /etc/ld.so.conf
/usr/local/mysql/lib
# ldconfig


7、卸载sasl软件

--nodeps来卸载,出现error: specifies multiple packages错误,于是再加一个--allmatches这下可以成功卸载了。
[root@localhost]# rpm -qa | grep cyrus-sasl | xargs rpm -e --nodeps
  error: "cyrus-sasl-lib-2.1.22-5.el5_4.3" specifies multiple packages
  error: "cyrus-sasl-lib-2.1.22-5.el5_4.3" specifies multiple packages
  error: "cyrus-sasl-plain-2.1.22-5.el5_4.3" specifies multiple packages
  error: "cyrus-sasl-plain-2.1.22-5.el5_4.3" specifies multiple packages
  [root@localhost courier-imap-4.1.0]# rpm -qa | grep cyrus-sasl | xargs rpm -e -nodeps
  -nodeps: unknown option
[root@localhost]# rpm -qa | grep cyrus-sasl | xargs rpm -e --allmatches
  error: Failed dependencies:
  libsasl2.so.2()(64bit) is needed by (installed) openldap-2.3.43-12.el5.x86_64
  libsasl2.so.2()(64bit) is needed by (installed) autofs-5.0.1-0.rc2.143.el5.x86_64
  libsasl2.so.2()(64bit) is needed by (installed) sendmail-8.13.8-8.el5.x86_64
  libsasl2.so.2 is needed by (installed) openldap-2.3.43-12.el5.i386
  /usr/sbin/saslauthd is needed by (installed) sendmail-8.13.8-8.el5.x86_64



[root@localhost]# rpm -qa | grep cyrus-sasl | xargs rpm -e --allmatches --nodeps




8、在初安装时maillog里面会有如下的提示:

Prototype mismatch: sub Encode::IMAPUTF7::decode ($$;$) vs none at /opt/www/extman/libs/Encode/IMAPUTF7.pm line 76.
Prototype mismatch: sub Encode::IMAPUTF7::decode ($$;$) vs none at /opt/www/extman/libs/Encode/76



在网上根据ttp://www.siutung.org/post/508/ 这个网友写的 采用第一种方法解决
解决:
(1)、下载并解压
# axel -a http://search.cpan.org/CPAN/authors/id/P/PM/PMAKHOLM/Encode-IMAPUTF7-1.05.tar.gz (官方当前最新版本)
# tar -zxvf Encode-IMAPUTF7-1.05.tar.gz
2、编译并复制到目标目录覆盖源文件(建议覆盖前将源文件备份)
# cd Encode-IMAPUTF7-1.05
# perl Makefile.PL
# cd lib/Encode
# cp IMAPUTF7.pm extman/libs/Encode/ (此处请根据实际输入正确的extman路径)1
另:


(2)、extmail官方解决方法:
编辑Encode-IMAPUTF7.pm文件(修改之前注意备份)
将“no warnings 'redefine';^M”那一行修改成“no warnings;”或“no warnings qw(prototype redefine);”
Tags: postfix , encode , imaputf7.pm , line , 76



9、在启动postfix时日志里可能会出现以下问题:

Mar 29 06:04:06 bogon postfix/bounce[22442]: fatal: open /etc/postfix/bounce.cf: No such file or directory


解决方法:
cd /etc/postfix/
cp -p bounce.cf.default bounce.cf




你可能感兴趣的:(postfix,amavisd,垃圾邮件过滤)