postfix各類故障詳細分析與解決

以下問題是本人配置postfix時遇到的一些問題,我把自己的分析過程全程直播了出來,內容比較冗長,僅供參考。如果有錯誤的地方,歡迎指正!

 問題1  DNS無法正常解析郵件服務器

 
查看dns解析是否正常
[root@centos work]# nslookup  -type=mx mail.sun.com
Server: 10.3.0.100
Address: 10.3.0.100#53
 
mail.sun.com mail exchanger = 0 10.3.0.100.sun.com.
^
償試從其它機器給其發郵件
[root@centos work]# echo hello | mail -s 'hello' [email protected]
結果發現郵件被退回,查看郵件退回原因:
<[email protected]>: Host or domain name not found. Name service error for
    name=10.3.0.100.sun.com type=AAAA: Host not found
^
通過以上信息,我們發現郵件地址被解析成了10.3.0.100.sun.com,並不是mail.sun.com
 
其實在第6步就已經誤入歧途了!因爲我們要解析的應該是sun.com這個域的地址。而不是mail.sun.com這個主機名!
償試解析sun.com這個域的郵件交換記錄:
[root@centos work]# nslookup  -type=mx sun.com
Server: 10.3.0.100
Address: 10.3.0.100#53
 
*** Can't find sun.com: No answer
出錯了!證明dns服務器配置不正確!
 
看看原來的配置文件
[root@centos58 postfix]# vim /var/named/chroot/var/named/data/sun.com.zone 
$TTL 86400
@       IN      SOA     root.sun.com.   root. (
                        2012090301
                        120
                        240
                        360
                        86400 )
        IN      NS      centos58.sun.com.
mail    IN      MX 0    10.3.0.100   <-----這裏寫錯了!
www     IN      A       10.3.0.100
mail    IN      A       10.3.0.100
修改sun.com.zone配置文件
[root@centos58 postfix]# vim /var/named/chroot/var/named/data/sun.com.zone 
$TTL 86400
@       IN      SOA     root.sun.com.   root. (
                        2012090301
                        120
                        240
                        360
                        86400 )
        IN      NS      centos58.sun.com.
        IN      MX 0    10.3.0.100
www     IN      A       10.3.0.100
mail    IN      A       10.3.0.100
 
[root@centos58 postfix]# /etc/init.d/named restart 
[root@centos58 postfix]# nslookup -type=mx sun.com
Server: 10.3.0.100
Address: 10.3.0.100#53
 
sun.com mail exchanger = 0 10.3.0.100.sun.com.
本機解析成功!
再次發郵件成功!
--------------------------------------------------
問題2 myhostname字段填寫錯誤導致postfix無法收到郵件
 
在客戶端發郵件給服務器
[root@centos work]# echo test2 | mail -s "hello" [email protected]
在服務器端查看郵件,發現沒有郵件
[root@centos58 postfix]# mail
No mail for root
查看客戶端是否退信,沒有退信信息。
[root@centos work]# mail
No mail for root
 
以上現象說明客戶端已經將郵件發送至服務器端。客戶端投遞沒有問題,問題出在服務器上。
這個問題出在main.cf配置文件的myhostname = centos58.sun.com上。此行代表監聽主機名爲centos58.sun.com.而我發郵件的地址爲mail.sun.com。所以postfix處理髮給mail.sun.com的郵件!
注意:myhostname字段接的是郵件服務器監聽的主機名,與本機的主機名無關,應該與dns所解析的主機名一致!我開始填的centos58.sun.com代表的是本機的主機名。這是錯誤的!
 
解決:
修改myhostname = centos58.sun.com 爲 myhostname = mail.sun.com
重啓/etc/init.d/postfix restart 
再次用客戶端測試
[root@centos work]# echo test2 | mail -s "hello" [email protected]
[root@centos58 postfix]# mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/spool/mail/root": 1 message 1 new
>N  1 [email protected]   Mon Sep  3 02:59  21/739   "hello"
& 1
Message 1:
From [email protected]  Mon Sep  3 02:59:29 2012
X-Original-To: [email protected]
Delivered-To: [email protected]
Date: Mon, 03 Sep 2012 17:59:33 +0800
Subject: hello
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: [email protected] (root)
 
test2
 
& q
總結:myhostname代表的是postfix所監聽的主機名,與本機的主機名不一樣。應該與dns上解析的主機名保持一致。
ok!客戶端發郵件成功!
---------------------------------------------
問題3 mydestination字段錯誤導致不能以域名結尾來發信
 
前面我們用的主機名爲後綴發信
現在償試用短域名發郵件給自己
[root@centos58 postfix]# echo own | mail -s 'hello' [email protected]
[root@centos58 postfix]# mail
No mail for root
結果失敗。
查看配置文件,原來在mydestination字段後面沒有添加本地域名
修改配置文件,在mydestination後加上sun.com域。
mydestination = $myhostname, localhost.$mydomain, localhost, sun.com
[root@centos58 postfix]# /etc/init.d/postfix restart 
再次測試
[root@centos58 postfix]# echo own2 | mail -s 'hello' [email protected]
[root@centos58 postfix]# mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/spool/mail/root": 1 message 1 new
>N  1 [email protected]  Mon Sep  3 03:24  18/638   "hello"
& 1
Message 1:
From [email protected]  Mon Sep  3 03:24:46 2012
X-Original-To: [email protected]
Delivered-To: [email protected]
Date: Mon, 3 Sep 2012 03:24:45 -0700
From: root <[email protected]>
Subject: hello
 
own2
成功!
-----------------------------
問題4 訪問extmail出現500錯誤
 
用瀏覽器訪問mail.sun.com,會自動跳轉到/extmail/cgi/index.cgi目錄下。但頁面會報500錯誤。
先看看我apache虛擬主機配置情況
[root@centos58 cgi-bin]# vim /etc/httpd/conf/httpd.conf 
NameVirtualHost *:80
<VirtualHost *:80>
ServerName mail.sun.com
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
SuexecUserGroup postfix postfix
</VirtualHost>
看apache錯誤日誌
[root@centos58 extmail]# tail /var/log/httpd/error_log
......... 
[Wed Sep 05 20:16:48 2012] [error] [client 10.3.0.26] suexec policy violation: see suexec log for more details, referer: http://mail.sun.com/
[Wed Sep 05 20:16:48 2012] [error] [client 10.3.0.26] Premature end of script headers: index.cgi, referer: http://mail.sun.com/
[Wed Sep 05 20:16:48 2012] [error] [client 10.3.0.26] File does not exist: /var/www/extsuite/extmail/html/favicon.ico
提示查看suexec日誌獲得更詳細信息。
查看suexec日誌
[root@centos58 extmail]# tail /var/log/httpd/suexec.log 
..........
[2012-09-05 20:16:48]: uid: (89/postfix) gid: (89/89) cmd: index.cgi
[2012-09-05 20:16:48]: cannot run as forbidden uid (89/index.cgi)
可以看到postfix用戶的id是不允許執行這個cgi文件的。
用suexec -V查看一下
[root@centos58 extmail]# suexec -V
 -D AP_DOC_ROOT="/var/www"
 -D AP_GID_MIN=100
 -D AP_HTTPD_USER="apache"
 -D AP_LOG_EXEC="/var/log/httpd/suexec.log"
 -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
 -D AP_UID_MIN=500
 -D AP_USERDIR_SUFFIX="public_html"
由AP_UID_MIN可知,suexec執行的最小用戶uid必需大於500.
那讓我們創建一個普通用戶
[root@centos58 extmail]# useradd -s /sbin/nologin vuser
[root@centos58 extmail]# id vuser
uid=1002(vuser) gid=1002(vuser) groups=1002(vuser)  <-------注意:這裏id=1002對解決此問題雖有效,但會給後續配置帶來很多問題。強烈建議映射賬戶id指定爲1000!後面我會寫出此故障現象
修改httpd.conf中SuexecUserGroup字段。
[root@centos58 extmail]# sed -i '/Suexec/s/postfix/vuser/g' /etc/httpd/conf/httpd.conf 
[root@centos58 extmail]# /etc/init.d/httpd restart
再次訪問extmail,仍然提示同樣錯誤。
再次查看日誌
[root@centos58 extmail]# tail /var/log/httpd/suexec.log 
[2012-09-06 12:09:36]: uid: (1002/vuser) gid: (1002/1002) cmd: index.cgi
[2012-09-06 12:09:36]: target uid/gid (1002/1002) mismatch with directory (0/0) or program (0/0)
提示所執行用戶的uid/gid與目錄所屬用戶不匹配。提示目錄所屬用戶及組均爲root.
[root@centos58 extmail]# chown -R vuser.vuser cgi/
再次訪問,錯誤提示不同了,這次提示未安裝syslog.
Unix::Syslog not found, please install it first! (in cleanup) Undefined subroutine &Ext::Logger::do_closelog called at /var/www/extsuite/extmail/libs/Ext/Logger.pm line 86.
下載unix-syslog 地址:http://search.cpan.org/~mharnisch/Unix-Syslog-1.1/Syslog.pm
[root@centos58 src]# tar xf /usr/src/Unix-Syslog-1.1.tar.gz 
[root@centos58 src]# cd Unix-Syslog-1.1
[root@centos58 Unix-Syslog-1.1]# perl Makefile.PL 
[root@centos58 Unix-Syslog-1.1]# make;make install
再次訪問,終於ok!
總結:suexec可執行用戶身份默認最小uid要大於500,這個問題要注意下。
~~~~~~~參考文獻http://wenku.baidu.com/view/0e5aeac758f5f61fb73666b5.html~~~~~
----------------------------------
問題5  webman看不到圖形驗證碼
 
在瀏覽器中訪問extman看不到驗證碼圖片,因爲缺少GD插件。
下載gd軟件包
[root@centos58 extman]# wget http://search.cpan.org/CPAN/authors/id/L/LD/LDS/GD-2.46.tar.gz
[root@centos58 src]# tar xf GD-2.46.tar.gz 
編譯gd軟件包報錯,提示找不到gdlib-config文件。
[root@centos58 GD-2.46]# perl Makefile.PL 
**UNRECOVERABLE ERROR**
Could not find gdlib-config in the search path. Please install libgd 2.0.28 or higher.
查找gd-config所屬軟件包
[root@centos58 GD-2.46]# yum provides */gdlib-config
gd-devel-2.0.33-9.4.el5_4.2.x86_64 : The development libraries and header files
                                   : for gd
Repo        : base
Matched from:
Filename    : /usr/bin/gdlib-config
找到所屬軟件包爲gd-devel,安裝軟件包
[root@centos58 GD-2.46]# yum install gd-devel-2.0.33-9.4.el5_4.2.x86_64 -y
[root@centos58 GD-2.46]# whereis gdlib-config
gdlib-config: /usr/bin/gdlib-config
[root@centos58 GD-2.46]# perl Makefile.PL 
[root@centos58 GD-2.46]# make;make install 
編譯成功,再次訪問extman,能夠看到驗證碼了!默認用戶名[email protected],密碼extmail*123*,順利登錄。但登錄後又報錯!
Can't open /tmp/extman//sid_36e127fdd6ebcbb870b6b934b038df5e, No such file or directory
[ Go Back ] >> Re-Login
提示不能打開/tmp/extman。因爲我們沒有建立這個文件夾
[root@centos58 GD-2.46]# mkdir /tmp/extman
[root@centos58 GD-2.46]# chown -R vuser:vuser /tmp/extman/
再次登錄,一切ok!
總結:gd插件爲驗證碼插件,不裝無法提供驗證碼,安裝gd插件需要gd-devel包的支持,extman運行需要有/tmp/extman目錄來放緩存文件
------------------------------------
問題6 啓動圖形化日誌信息的報錯歸納。
 
在啓動mailgraph-init時報錯
[root@centos58 mailgraph_ext]# /var/www/extsuite/extman/addon/mailgraph_ext/mailgraph-init start
Starting mail statistics grapher: mailgraph_ext
nice: /usr/local/mailgraph_ext/mailgraph_ext.pl: No such file or directory
Starting queue statistics grapher: qmonitor
nice: /usr/local/mailgraph_ext/qmonitor.pl: No such file or directory
提示找不到/usr/local/mailgraph_ext/mailgraph_ext.pl和qmonitor.pl這兩個文件,因爲我們默認沒有建立這兩個路徑
根據提示建目錄
[root@centos58 mailgraph_ext]# mkdir /usr/local/mailgraph_ext
複製文件到指定目錄
[root@centos58 mailgraph_ext]# cp /var/www/extsuite/extman/addon/mailgraph_ext/mailgraph_ext.pl /usr/local/mailgraph_ext/
[root@centos58 mailgraph_ext]# cp /var/www/extsuite/extman/addon/mailgraph_ext/qmonitor.pl /usr/local/mailgraph_ext/
 
上述問題解決後,啓動mailgraph-init又出現新的問題。
[root@centos58 mailgraph_ext]# /var/www/extsuite/extman/addon/mailgraph_ext/mailgraph-init start
Starting mail statistics grapher: mailgraph_ext
Can't locate RRDs.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/local/mailgraph_ext/mailgraph_ext.pl line 292.
BEGIN failed--compilation aborted at /usr/local/mailgraph_ext/mailgraph_ext.pl line 292.
Starting queue statistics grapher: qmonitor
Can't locate RRDs.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/local/mailgraph_ext/qmonitor.pl line 8.
BEGIN failed--compilation aborted at /usr/local/mailgraph_ext/qmonitor.pl line 8.
提示找不到RRDs.pm,因爲沒有安裝rrd圖形採集工具。
安裝rrdtool來解決上述問題。
無法用yum install 來安裝rrdtool.添加yum源,使其支持yum安裝rrdtool.
[root@centos58 src]# vim /etc/yum.repos.d/CentOS-Base.repo 
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1
[root@centos58 src]# yum install rrdtool rrdtool-perl
 
rrds.pm的問題解決後,新的問題再次出現。
[root@centos58 mailgraph_ext]# /var/www/extsuite/extman/addon/mailgraph_ext/mailgraph-init start
Starting mail statistics grapher: mailgraph_ext
Can't locate File/Tail.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/local/mailgraph_ext/mailgraph_ext.pl line 296.
BEGIN failed--compilation aborted at /usr/local/mailgraph_ext/mailgraph_ext.pl line 296.
Starting queue statistics grapher: qmonitor
提示沒有安裝File-Tail
下載安裝File-Tail軟件。
[root@centos58 src]# wget http://search.cpan.org/CPAN/authors/id/M/MG/MGRABNAR/File-Tail-0.99.3.tar.gz
[root@centos58 File-Tail-0.99.3]# perl Makefile.PL ;make;make install
再次啓動終於成功!
[root@centos58 mailgraph_ext]# /var/www/extsuite/extman/addon/mailgraph_ext/mailgraph-init start
Starting mail statistics grapher: mailgraph_ext
Starting queue statistics grapher: qmonitor
[root@centos58 File-Tail-0.99.3]# /var/www/extsuite/extman/addon/mailgraph_ext/qmonitor.pl start & 
在瀏覽器中點擊Graph Log選項,可以看到出現了很多圖形化日誌界面!ok!
總結:要想啓動mailgraph-init和qmonitor.pl繪圖工具,必需建立/usr/local/mailgraph_ext,並將mailgraph_ext.pl,qmonitor.pl拷過去。否則會報錯。並且要安裝好rdtool rrdtool-perl File-Tail三個信賴包。
----------------------------
問題7 用extman管理界面添加新用戶報錯
 
償試用extman管理界面添加新用戶,結果報錯!
DBD::mysql::st execute failed: INSERT command denied to user 'extmail'@'localhost' for table 'mailbox' at /var/www/extsuite/extman/libs/Ext/Mgr/MySQL.pm line 333
提示extmail用戶沒有對mailbox表的插入權限。
決定extman採用哪個用戶身份來執行新建用戶操作的配置文件在/var/www/extsuite/extman/webman.cf裏面。
[root@centos58 extman]# vim /var/www/extsuite/extman/webman.cf
SYS_MYSQL_USER = extmail
SYS_MYSQL_PASS = extmail
SYS_MYSQL_DB = extmail
SYS_MYSQL_HOST = localhost
SYS_MYSQL_SOCKET = /var/lib/mysql/mysql.sock
以上指定了連接的用戶名及密碼extmail,以及數據庫等信息。
進入數據庫,查看extmail用戶對extmail數據庫的權限。
mysql> select user,db,host,insert_priv from mysql.db where db='extmail';
+---------+---------+-----------+-------------+
| user    | db      | host      | insert_priv |
+---------+---------+-----------+-------------+
| extmail | extmail | localhost | N           | 
| webman  | extmail | localhost | Y           | 
+---------+---------+-----------+-------------+
2 rows in set (0.00 sec)
可以看到extmail用戶對extmail數據庫而言是沒有插入表的權限的。那麼我們改變一下extmail用戶的權限。
mysql> grant all on extmail.* to extmail@'localhost' identified by 'extmail';
Query OK, 0 rows affected (0.00 sec)
mysql> select user,db,host,insert_priv from mysql.db where db='extmail';
+---------+---------+-----------+-------------+
| user    | db      | host      | insert_priv |
+---------+---------+-----------+-------------+
| extmail | extmail | localhost | Y           | 
| webman  | extmail | localhost | Y           | 
+---------+---------+-----------+-------------+
2 rows in set (0.00 sec)
已經擁有插入權限了!再回到web管理界面添加新用戶看看。
New user [email protected] Added
成功添加用戶,上述問題解決!注意:這裏也可以不更改extmail的權限,而只需要調整webman.cf中的SYS_MYSQL_USER=webman,SYS_MYSQL_PASS = webman 即可。因爲webman這個用戶默認就是具有插入刪除權限的!建議採用更改用戶爲webman的方式解決上述問題。
總結:extman的配置文件webman.cf裏面的默認用戶是填的extmail,但我們在導入extman默認的兩張表extmail.sql init.sql時,表中默認只給extmail這個用戶查詢數據庫的權限,而給webman這個用戶管理數據庫的權限,所以要麼更改extmail用戶的權限,要麼更換webman.cf中的用戶名爲webman解決上面問題。 
------------------------------------
問題8 新用戶無法登錄
 
添加成功後,我們登錄看看,結果登錄報錯,提示未知用戶或密碼。
Invalid account or password
查看日誌文件
[root@centos58 extman]# tail /var/log/maillog
Sep  7 11:19:56 centos58 extmail[17739]: user=<[email protected]>, client=10.3.0.26, module=login, status=badlogin <---用test登錄
Sep  7 11:21:20 centos58 extmail[17801]: user=<>, client=10.3.0.26, module=login, status=badlogin    <---用[email protected]用戶登錄情況
Sep  7 11:21:58 centos58 extmail[17823]: user=<[email protected]>, client=10.3.0.26, module=login, status=badlogin
進入mysql查看一下test用戶情況
[root@centos58 ~]# mysql -uextmail -pextmail
mysql> use extmail;
由前面無法新建用戶的故障我們知道了用戶信息是保存在mailbox這張表中,所以我們直接查看這張表的數據,看能不能發現什麼。
mysql> select username,uid,password,maildir,mailhost,domain from mailbox\G;
*************************** 2. row ***************************
     uid: test
password: $1$sikOoDKi$GMTYxGVX0h2qV5ID9qjsJ1
 maildir: extmail.org/test/Maildir/
mailhost: 
  domain: extmail.org
2 rows in set (0.00 sec)
可以看到我們新建的test用戶實際是屬於extmail.org域的,也就是和我的sun.com並不是同一個域。問題就在這。(當然,可以直接在web管理界面看到test用戶所屬域,更簡單)
進入到extman web管理界面,添加新的域sun.com 
Add sun.com ok
這時候在添加新用戶的時候就可以選則用戶所屬的域了。
New user [email protected] Added
回到extmail登錄界面,用test2用戶登錄,成功登錄!
總結:這個問題比較2b。粗心所致。
-------------------------------------
問題9 webmail發送郵件測試,結果一直停在發送界面,無法發送郵件。
 
查看日誌文件。
[root@centos58 ~]# tail /var/log/maillog -f
Sep  7 11:53:39 centos58 postfix/smtpd[19109]: fatal: open /etc/postfix/mysql_virtual_alias_maps.cf: No such file or directory
Sep  7 11:53:40 centos58 postfix/master[7686]: warning: process /usr/libexec/postfix/smtpd pid 19109 exit status 1
Sep  7 11:53:40 centos58 postfix/master[7686]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Sep  7 11:54:40 centos58 postfix/smtpd[19153]: fatal: open /etc/postfix/mysql_virtual_alias_maps.cf: No such file or directory
Sep  7 11:54:41 centos58 postfix/master[7686]: warning: process /usr/libexec/postfix/smtpd pid 19153 exit status 1
Sep  7 11:54:41 centos58 postfix/master[7686]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Sep  7 11:55:41 centos58 postfix/smtpd[19191]: fatal: open /etc/postfix/mysql_virtual_alias_maps.cf: No such file or directory
Sep  7 11:55:42 centos58 postfix/master[7686]: warning: process /usr/libexec/postfix/smtpd pid 19191 exit status 1
Sep  7 11:55:42 centos58 postfix/master[7686]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
沒有mysql_virtual_alias_maps.cf文件。
提示信息很明顯,在/etc/postfix文件夾下沒有mysql_virtual_maps.cf等文件。因爲我沒將extman下面的模板文件拷貝過來。這些包默認在extman的docs目錄下面。
[root@centos58 docs]# pwd
/var/www/extsuite/extman/docs
[root@centos58 docs]# cp mysql_virtual_* /etc/postfix/
再來訪問下看看報什麼錯!郵件發送成功,沒有此類報錯。問題解決! 
看看日誌記錄情況
[root@centos58 docs]# tail /var/log/maillog
Sep  7 15:50:38 centos58 postfix/smtpd[28365]: disconnect from localhost.localdomain[127.0.0.1]
Sep  7 15:53:49 centos58 extmail[28486]: user=<[email protected]>, client=10.3.0.26, module=login, status=badlogin
Sep  7 15:54:01 centos58 extmail[28490]: user=<[email protected]>, client=10.3.0.26, module=login, status=loginok
Sep  7 15:55:42 centos58 postfix/smtpd[28608]: warning: smtpd_sasl_auth_enable is true, but SASL support is not compiled in
Sep  7 15:55:42 centos58 postfix/smtpd[28608]: connect from localhost.localdomain[127.0.0.1]
Sep  7 15:55:42 centos58 postfix/smtpd[28608]: B74BEE3010: client=localhost.localdomain[127.0.0.1]
Sep  7 15:55:42 centos58 postfix/cleanup[28614]: B74BEE3010: message-id=<[email protected]>
Sep  7 15:55:42 centos58 postfix/qmgr[7688]: B74BEE3010: from=<[email protected]>, size=655, nrcpt=2 (queue active)
Sep  7 15:55:42 centos58 postfix/smtpd[28608]: disconnect from localhost.localdomain[127.0.0.1]
Sep  7 15:55:45 centos58 postfix/smtp[28616]: B74BEE3010: to=<[email protected]>, relay=163mx02.mxmail.netease.com[220.181.12.69]:25, delay=3, delays=0.26/0.15/0.59/2, dsn=2.0.0, status=sent (250 Mail OK queued as mx19,RcCowEDJXnyKqElQzTtvEQ--.1649S2 1347004556)
由以上日誌可以看到郵件已經被正確投遞出去了!進到163郵箱確認一下看。成功收到郵件!
總結:關於無法發送出郵件的原因很多,無法一一例舉。具體原因建議多看日誌來尋找答案!
-------------------------------------
問題10 mysql虛擬用戶認證不通過,無法發信
 
[root@centos581 postfix]# telnet mail.sun.com 25
Trying 10.3.0.100...
Connected to mail.sun.com (10.3.0.100).
Escape character is '^]'.
220 mail.sun.com ESMTP Postfix
ehlo da
250-mail.sun.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
250 2.1.0 Ok
550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table
提示我用戶未知,被拒絕。
那麼我們回到mysql中查看[email protected]這個用戶是否真的不存在
mysql> select domain from domain;
+--------------+
| domain       |
+--------------+
| extmail.org  | 
| mail.sun.com | 
| sun.com      | 
+--------------+
mysql> select name,username,uidnumber,password from mailbox where username='[email protected]';
+------------+------------------------+-----------+------------------------------------+
| name       | username               | uidnumber | password                           |
+------------+------------------------+-----------+------------------------------------+
| test1      | [email protected]          |      1000 | $1$qeG0Ns8D$63ABiq2nF7jgNQ7EyN7UC/ | 
+------------+------------------------+-----------+------------------------------------+
用戶是存在於數據庫中的
再查看maillog日誌情況
[root@centos58 ~]# tail /var/log/maillog
Sep 10 16:43:42 centos58 postfix/cleanup[7155]: D9329A6F8: message-id=<>
Sep 10 16:43:43 centos58 postfix/qmgr[19071]: D9329A6F8: from=<[email protected]>, size=175, nrcpt=1 (queue active)
Sep 10 16:43:43 centos58 postfix/trivial-rewrite[7125]: warning: do not list domain mail.sun.com in BOTH virtual_mailbox_domains and relay_domains
Sep 10 16:43:43 centos58 postfix/virtual[7157]: D9329A6F8: to=<[email protected]>, relay=virtual, delay=49, delays=49/0.05/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
Sep 10 16:43:43 centos58 postfix/qmgr[19071]: D9329A6F8: removed
Sep 10 16:43:46 centos58 postfix/smtpd[7101]: disconnect from unknown[10.3.0.101]
Sep 10 16:49:30 centos58 postfix/smtpd[7440]: warning: smtpd_sasl_auth_enable is true, but SASL support is not compiled in
Sep 10 16:49:30 centos58 postfix/smtpd[7440]: connect from unknown[10.3.0.101]
Sep 10 16:49:49 centos58 postfix/trivial-rewrite[7443]: warning: do not list domain sun.com in BOTH mydestination and virtual_mailbox_domains
Sep 10 16:49:49 centos58 postfix/smtpd[7440]: NOQUEUE: reject: RCPT from unknown[10.3.0.101]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<da>
 
日誌分析:
1,smtpd_sasl_auth_enable is true, but SASL support is not compiled in
sasl認證已經打開,但沒有加載sasl支持!因爲我用的是rpm版,而rpm版默認是不支持sasl認證的。這個問題與解決此問題無關,但我在後面會解決。
2,warning: do not list domain sun.com in BOTH mydestination and virtual_mailbox_domains
(我原來將這句話理解爲“沒有在mydestination和virtual_mailbox_domains參數中找到sun.com這個域!”這是錯誤的!)
意思應該是 不要在mydestination和virtual_mailbox_domains同時定義同一個域,會衝突!且在出現衝突的情況下,系統會默認以mydestination中定義的爲準,那就代表着mysql中添加的sun.com虛擬域不生效,那麼該域下的虛擬賬戶同樣也就無法生效了。這也就是爲什麼一直提示我的sun.com域中的test1用戶找不到的原因了,因爲本地用戶裏面根本沒這個賬戶,而mysql裏面雖然有,但根本沒生效!
3,Recipient address rejected: User unknown in local recipient table;
收件地址拒絕,沒有找到用戶[email protected]。受上面錯誤配置的影響。
 
解決辦法:
根據日誌分析,出現上述問題主要原因在於mydestination和virtual_mailbox_domains衝突所致!
那麼我們將mydestination字段留空!
[root@centos58 courier-authlib]# vim /etc/postfix/main.cf
mydestination = $mydomain
改爲
mydestination =
[root@centos58 courier-authlib]# /etc/init.d/postfix restart
再次測試
[root@centos Desktop]# telnet 10.3.0.100 25
Trying 10.3.0.100...
Connected to 10.3.0.100.
Escape character is '^]'.
220 mail.sun.com ESMTP Postfix
ehlo
501 Syntax: EHLO hostname
250 2.1.0 Ok
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
hello test mail!
.
250 2.0.0 Ok: queued as 76BB1E319C
quit
221 2.0.0 Bye
Connection closed by foreign host.
測試成功,沒有再報錯!
再看看日誌情況
[root@centos58 courier-authlib]# tail /var/log/maillog
Sep 12 09:16:55 centos58 postfix/postfix-script[15306]: starting the Postfix mail system
Sep 12 09:16:55 centos58 postfix/master[15307]: daemon started -- version 2.8.12, configuration /etc/postfix
Sep 12 09:17:32 centos58 postfix/smtpd[15347]: warning: smtpd_sasl_auth_enable is true, but SASL support is not compiled in
Sep 12 09:17:32 centos58 postfix/smtpd[15347]: connect from centos.sun.com[10.3.0.26]
Sep 12 09:18:09 centos58 postfix/smtpd[15347]: 76BB1E319C: client=centos.sun.com[10.3.0.26]
Sep 12 09:18:22 centos58 postfix/cleanup[15396]: 76BB1E319C: message-id=<>
Sep 12 09:18:22 centos58 postfix/qmgr[15309]: 76BB1E319C: from=<[email protected]>, size=193, nrcpt=1 (queue active)
Sep 12 09:18:22 centos58 postfix/virtual[15401]: 76BB1E319C: to=<[email protected]>, relay=virtual, delay=38, delays=38/0.05/0/0.05, dsn=2.0.0, status=sent (delivered to maildir)
Sep 12 09:18:22 centos58 postfix/qmgr[15309]: 76BB1E319C: removed
Sep 12 09:18:23 centos58 postfix/smtpd[15347]: disconnect from centos.sun.com[10.3.0.26]
ok!日誌記錄正常!
用瀏覽器登錄mail.sun.com,用test1用戶登錄郵箱看是否收到郵件。ok!test1順利收到郵件。看是否能發信給test2,ok順利發送!發給外網[email protected]看看,ok順利發送!
登錄[email protected][email protected]查看郵件。一路綠燈,都收到!
總結:在打開了虛擬認證後最好將mydestination字段留空或註釋掉,不要和virtual_mailbox_domains中定義的域相同而導致衝突。當然,如果mydestination中的域名和mysql中定義的虛擬域不相同的話也是可以的!
------------------------------------
問題11 pop3無法順利收信
 
測試pop3收信
下面又迎來了新的問題,發信雖然成功,收信仍需努力!pop3收信認證又有問題!
[root@centos Desktop]# telnet mail.sun.com 110
Trying 10.3.0.100...
Connected to mail.sun.com.
Escape character is '^]'.
+OK Dovecot ready.
+OK
pass 123456
+OK Logged in.
-ERR [IN-USE] Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2012-09-13 14:54:01]
Connection closed by foreign host.
直接提示無法打開收信夾。在服務器端看日誌
[root@centos58 postfix]# tail /var/log/maillog
Sep 13 14:54:01 centos58 dovecot: auth-worker(default): mysql: Connected to localhost (extmail)
Sep 13 14:54:01 centos58 dovecot: POP3([email protected]): stat(/home/domains/sun.com/test1/Maildir/cur) failed: Permission denied
Sep 13 14:54:01 centos58 dovecot: POP3([email protected]): stat(/home/domains/sun.com/test1/Maildir/cur) failed: Permission denied
Sep 13 14:54:01 centos58 dovecot: POP3([email protected]): Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2012-09-13 14:54:01]
Sep 13 14:54:01 centos58 dovecot: POP3([email protected]): Couldn't open INBOX top=0/0, retr=0/0, del=0/0, size=0
Sep 13 14:54:01 centos58 dovecot: pop3-login: Login: user=<[email protected]>, method=PLAIN, rip=::ffff:10.3.0.26, lip=::ffff:10.3.0.100
提示/home/domains/sun.com/test1/Maildir/cur文件夾無法訪問
我們看看這個目錄的權限
[root@centos58 domains]# ll -d /home/domains/
drwx------ 5 vuser vuser 4096 Sep  7 16:21 /home/domains/
[root@centos58 domains]# ll /home/domains/sun.com/
drwx------ 3 vuser vuser 4096 Sep 10 10:40 test1
drwx------ 3 vuser vuser 4096 Sep  7 11:50 test2
drwx------ 3 vuser vuser 4096 Sep 12 09:55 test3
所有目錄都屬於vuser,且只有vuser具有完全權限,其它用戶都沒有權限。
那麼我們試着更改一下權限看看。
[root@centos58 home]# chmod 755 domains/     <-----注意這個父目錄的權限,如果只改/home/domains/下面的子目錄而不改/home/domains目錄本身的話依然會無法訪問!
[root@centos58 domains]# chmod 755 sun.com/
[root@centos58 sun.com]# cp -a test1 test1.bak
[root@centos58 sun.com]# chmod -R 777 test1
[root@centos58 home]# ll -d domains/
drwxr-xr-x 5 vuser vuser 4096 Sep  7 16:21 domains/
[root@centos58 domains]# ll -d sun.com
drwxr-xr-x 6 vuser vuser 4096 Sep 13 15:26 sun.com
[root@centos58 domains]# ll -d sun.com/test1
drwxrwxrwx 3 vuser vuser 4096 Sep 10 10:40 sun.com/test1
現在test1文件夾及其父目錄所有用戶都能訪問了。下面我們再測試一下看
[root@centos Desktop]# telnet  mail.sun.com 110
Trying 10.3.0.100...
Connected to mail.sun.com.
Escape character is '^]'.
+OK Dovecot ready.
+OK
pass 123456
+OK Logged in.
list
+OK 7 messages:
1 279
2 666
3 1112
retr 1
+OK 279 octets
Return-Path: <[email protected]>
X-Original-To: [email protected]
Delivered-To: [email protected]
Received: from centos.sun.com (centos.sun.com [10.3.0.26])
by mail.sun.com (Postfix) with SMTP id 76BB1E319C
for <[email protected]>; Wed, 12 Sep 2012 09:17:44 +0800 (CST)
 
hello test mail!
改了權限後,pop3認證也成功了!那麼引發出一個問題,很明顯pop3並不是用的我們的vuser用戶來讀取用戶的郵件的,那麼它是用的哪個用戶呢?我們總不能將所有郵件權限都設爲777吧,那樣太不安全了!
一個偶然的機會發現了它的默認用戶
[root@centos58 Maildir]# ll
total 64
-rwxrwxrwx 1 vuser vuser   452 Sep 12 14:08 abook.cf
drwxrwxrwx 2 vuser vuser  4096 Sep 13 16:54 cur
-rw------- 1  1000  1000   240 Sep 13 16:54 dovecot.index
-rw------- 1  1000  1000 16384 Sep 13 15:43 dovecot.index.cache
-rw------- 1  1000  1000   360 Sep 13 16:54 dovecot.index.log
-rw------- 1  1000  1000   425 Sep 13 16:54 dovecot-uidlist
原來它用的是id=1000這個用戶,但這個用戶在我係統中並不存在。問題好解決了。把vuser的uid改爲1000應該就行了!
其實這個默認用戶不僅僅只是適用於dovecot,extmail/extman所用的虛擬賬戶也是默認映射爲id=1000的這個本地用戶。可以通查詢mailbox表來查看一下。
mysql> select username,uidnumber,gidnumber from mailbox ;
+------------------------+-----------+-----------+
| username               | uidnumber | gidnumber |
+------------------------+-----------+-----------+
| [email protected] |      1000 |      1000 | 
| [email protected]       |      1000 |      1000 | 
| [email protected]          |      1000 |      1000 | 
 
下面將相關目錄的uid,gid都改爲1000這個用戶
[root@centos58 Maildir]# id vuser
uid=1002(vuser) gid=1002(vuser) groups=1002(vuser)
[root@centos58 Maildir]# usermod -u 1000 vuser
[root@centos58 Maildir]# id vuser
uid=1000(vuser) gid=1002(vuser) groups=1002(vuser)
[root@centos58 Maildir]# usermod -g 1000 vuser
[root@centos58 Maildir]# id vuser
uid=1000(vuser) gid=1000(vuser) groups=1000(vuser)
[root@centos58 home]# chown -R vuser:vuser domains 
[root@centos58 home]# ll -d domains/
drwxr-xr-x 5 1002 1002 4096 Sep  7 16:21 domains/
[root@centos58 home]# chown -R vuser:vuser domains
[root@centos58 home]# ll -d domains/
drwxr-xr-x 5 vuser vuser 4096 Sep  7 16:21 domains/
好了,現在郵件的權限都爲vuser,並且uid,gid都爲1000了!
我們把test1的文件夾都恢復默認
[root@centos58 domains]# chmod 700 sun.com
[root@centos58 sun.com]# chmod -R 700 test1
[root@centos58 sun.com]# ll test1
total 8
drwx------ 10 vuser vuser 4096 Sep 13 17:38 Maildir
注意還要改一下postfix裏面的main.cf,因爲以前我們設的虛擬映射用戶爲1002要改過來
[root@centos58 ~]# vim /etc/postfix/main.cf
virtual_uid_maps = static:1002
virtual_gid_maps = static:1002
改爲
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000
[root@centos58 ~]# /etc/init.d/postfix restart
注意同時還得改變下網站家目錄的所屬用戶。因爲以前我們是用的uid=1002的用戶。不改回來會提示訪問拒絕。
[root@centos58 home]# find /var/www/ -uid 1002 -exec chown vuser:vuser  {} \;
現在再來telnet測試一下
[root@centos Desktop]# telnet  mail.sun.com 110
Trying 10.3.0.100...
Connected to mail.sun.com.
Escape character is '^]'.
+OK Dovecot ready.
+OK
pass 123456
+OK Logged in.
list
+OK 8 messages:
1 279
[email protected]來測試下
[root@centos Desktop]# telnet  mail.sun.com 110
Trying 10.3.0.100...
Connected to mail.sun.com.
Escape character is '^]'.
+OK Dovecot ready.
+OK
pass 123456
+OK Logged in.
這次真的都ok了!
登錄webmail也成功了!
至此,發信認證和收信認證都成功了!
總結:此次故障出現主要是“問題4”埋下的禍根,當時不知道uid=1000是必需的。問題本身並不難,看日誌提示就知道錯誤問題所在,但爲什麼dovecot默認用戶是uid=1000這個用戶?這個我也不太清楚。
------------------------------------
問題12 定製rpm版的postfix時報錯
 
由於前面我們默認的rpm版postfix軟件包並沒有支持sasl認證,現在我們用rpm定製版重新安裝postfix
下載定製版rpm
[root@centos58 postfix-2.8.12]# wget http://ftp.wl0.org/official/2.8/SRPMS/postfix-2.8.8-1.src.rpm
[root@centos58 postfix-2.8.12]# rpm -ivh /usr/src/postfix-2.8.8-1.src.rpm 
[root@centos58 SPECS]# vim /usr/src/redhat/SPECS/postfix.spec 
%define with_cdb          0
%define with_ldap         1
%define with_mysql        1
%define with_mysql_redhat 1
%define with_pcre         0
%define with_pgsql        0
%define with_sasl         2
%define with_spf          0
%define with_dovecot      1
%define with_tls          1
%define with_tlsfix       2
%define with_vda          0
with_mysql爲1代表支持www.mysql.com網站上面的mysql。
with_mysql_redhat爲1代表支持redhat的mysql,即我們用yum裝的就屬於這種。
with_sasl爲2代表支持sasl2。爲1代表支持sasl1。現在一般都是用sasl2了。所以選2。
 
[root@centos58 SPECS]# rpmbuild -ba postfix.spec 
error: Failed build dependencies:
MySQL-shared is needed by postfix-2.8.8-1.rhel5.x86_64
MySQL-devel is needed by postfix-2.8.8-1.rhel5.x86_64
出現報錯說要MySQL-shared MySQL-devel.
[root@centos58 SPECS]# yum list MySQL*
[root@centos58 SPECS]# yum list MySQL* |grep shared
[root@centos58 SPECS]# yum list MySQL* |grep devel
mysql-devel.x86_64                       5.0.95-1.el5_7.1              installed
mysql-devel.i386                         5.0.95-1.el5_7.1              updates  
yum中竟然沒有MySQL-shared!!
看下postfix.spec中的代碼
[root@centos58 SPECS]# vim postfix.spec
%if %{with_mysql}
Requires: MySQL-shared
BuildRequires: MySQL-shared, MySQL-devel
原來是加載mysql支持的時候要這個。
去掉mysq的支持,保留mysql-redhat試一下。
%define with_mysql        0
%define with_mysql_redhat 1
沒有看到error之類的報錯,編譯成功!
進入rpm包生成的位置
[root@centos58 RPMS]# ls /usr/src/redhat/RPMS/x86_64/
postfix-2.8.8-1.rhel5.x86_64.rpm  postfix-debuginfo-2.8.8-1.rhel5.x86_64.rpm
安裝定製好的rpm包
[root@centos58 x86_64]# rpm -ivh postfix-2.8.8-1.rhel5.x86_64.rpm 
[root@centos58 x86_64]# rpm -q postfix
postfix-2.8.8-1.rhel5
看看支持的模塊
[root@centos58 x86_64]# postconf -m
btree
cidr
environ
hash
internal
ldap
mysql
nis
proxy
regexp
static
tcp
texthash
unix
可看到支持mysql
[root@centos58 x86_64]# cp /etc/postfix/main.cf.bak /etc/postfix/main.cf
cp: overwrite `/etc/postfix/main.cf'? y
[root@centos58 x86_64]# /etc/init.d/postfix restart
查看是不是支持sasl認證了!
[root@centos58 local]# postconf  -a 
cyrus   <---------這裏出現這一行代表postfix已經支持了sasl認證模塊,與配置文件main.cf中是否打開sasl認證無關
dovecot
可以看到有了cyrus。。也可以用下面的telnet上去看,看到兩個AUTH證明成功了!
[root@centos Desktop]# telnet  mail.sun.com 25
Trying 10.3.0.100...
Connected to mail.sun.com.
Escape character is '^]'.
220 mail.sun.com ESMTP Postfix
ehlo test
250-mail.sun.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN   <---------這裏出現認證支持僅代表main.cf配置文件中已經打開了認證功能,與postfix是否支持sasl模塊無關
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
看來postfix已經支持sasl認證了。
總結:在定製版中,如果你沒有安裝oracle官網的mysql的時,就不要打開 with_mysql 這個參數的支持。直接打開 with_mysql_redhat 就行了。我們默認就是用的這個。
------------------------------------
問題13 用sasl發信認證失敗
 
我們來測試一下發信看看
首先用perl產生加密的登錄賬號和密碼
[root@centos58 postfix-2.8.12]# perl -MMIME::Base64 -e "print encode_base64('[email protected]');"
dGVzdDFAc3VuLmNvbQ==
[root@centos58 postfix-2.8.12]# perl -MMIME::Base64 -e "print encode_base64('123456');"
MTIzNDU2
回到客戶端來測試
[root@centos Desktop]# telnet  mail.sun.com 25
Trying 10.3.0.100...
Connected to mail.sun.com.
Escape character is '^]'.
220 mail.sun.com ESMTP Postfix
ehlo test  
250-mail.sun.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6
dGVzdDFAc3VuLmNvbQ==
334 UGFzc3dvcmQ6
MTIzNDU2
535 5.7.8 Error: authentication failed: generic failure
竟然認證失敗了!看日誌!
[root@centos58 ~]# tail /var/log/maillog
Sep 13 09:17:21 centos58 authdaemond: Installing libauthmysql
Sep 13 09:17:21 centos58 authdaemond: Installation complete: authmysql
Sep 13 09:18:32 centos58 extmail[5083]: user=<[email protected]>, client=10.3.0.26, module=login, status=loginok
Sep 13 09:19:20 centos58 postfix/smtpd[5149]: connect from centos.sun.com[10.3.0.26]
Sep 13 09:22:33 centos58 postfix/smtpd[5149]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Sep 13 09:22:33 centos58 postfix/smtpd[5149]: warning: centos.sun.com[10.3.0.26]: SASL login authentication failed: generic failure
說不能連接到saslauthd服務。因爲沒啓動saslauthd...!
[root@centos58 ~]# /etc/init.d/saslauthd start
Starting saslauthd:                                        [  OK  ]
[root@centos Desktop]# telnet mail.sun.com 25Trying 10.3.0.100...
Connected to mail.sun.com.
Escape character is '^]'.
220 mail.sun.com ESMTP Postfix
ehlo go
250-mail.sun.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6
dGVzdDFAc3VuLmNvbQ==
334 UGFzc3dvcmQ6
MTIzNDU2
535 5.7.8 Error: authentication failed: authentication failure
還是失敗了!
[root@centos58 ~]# tail /var/log/maillog
Sep 13 09:31:04 centos58 postfix/smtpd[5800]: connect from centos.sun.com[10.3.0.26]
Sep 13 09:31:44 centos58 postfix/smtpd[5800]: warning: centos.sun.com[10.3.0.26]: SASL login authentication failed: authentication failure
Sep 13 09:31:50 centos58 postfix/smtpd[5800]: disconnect from centos.sun.com[10.3.0.26]
這次不再是找不到服務器了,而是提示認證失敗了!
我們用本地用戶試試
[root@centos Desktop]# telnet mail.sun.com 25
Trying 10.3.0.100...
Connected to mail.sun.com.
Escape character is '^]'.
220 mail.sun.com ESMTP Postfix
ehlo helo
250-mail.sun.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
auth login
334 VXNlcm5hbWU6
c3Vu
334 UGFzc3dvcmQ6
MTIzNDU2
235 2.7.0 Authentication successful
本地認證是成功的!
爲什麼會出現這種情況?我們看看我們的sasl進程
[root@centos58 local]# ps aux |grep sasl
root      5535  0.0  0.1  48856  1140 ?        Ss   09:25   0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam
root      5536  0.0  0.1  48856  1128 ?        S    09:25   0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam
其中-m代表saslauthd的工作目錄在/var/run/saslauthd下面。-a代表所啓用的驗證機制。這裏代表用pam來驗證!pam驗證是啥?我們的系統登錄就是用的調用pam來驗證用戶密碼的啊!也就是說,這時候的saslauthd是調用的pam來驗證的我們的賬戶!而pam剛好可以驗證本地賬戶。這也就是爲什麼我用真實賬戶sun爲什麼能驗證通過的原因。而我們的虛擬賬號[email protected]並不是用pam機制來驗證,而是採用的mysql自身來驗證的,所以會提示驗證失敗!那麼saslauthd能否支持mysql的驗證呢?我們可以man saslauthd來看看,發現saslauthd支持多達10種認證方式,但偏偏沒有mysql的驗證!所以說,用saslauthd是不能驗證mysql虛擬賬戶的!那麼我們得改變一下postfix所採用的驗證機制!
[root@centos58 local]# vim /usr/lib64/sasl2/smtpd.conf
pwcheck_method: authdaemond  <-----這裏不再是saslauthd
mech_list: PLAIN LOGIN
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socke  <--------這裏有錯誤,我先不改過來,等着看後面的好戲吧!
 
[root@centos Desktop]# telnet mail.sun.com 25
.......
auth login
334 VXNlcm5hbWU6
dGVzdDFAc3VuLmNvbQ==
334 UGFzc3dvcmQ6
MTIzNDU2
535 5.7.8 Error: authentication failed: generic failure
還是失敗了!再看日誌
[root@centos58 usr]# tail /var/log/maillog
......
Sep 13 11:37:22 centos58 postfix/smtpd[31886]: warning: SASL authentication failure: cannot connect to Courier authdaemond: No such file or directory
Sep 13 11:37:22 centos58 postfix/smtpd[31886]: warning: centos.sun.com[10.3.0.26]: SASL login authentication failed: generic failure
提示無法連接到authdaemond進程,找不到文件或目錄。我們先看看有沒有啓動這個進程
[root@centos58 usr]# ps aux  | grep authdaemond
root     31384  0.0  0.0   3808   440 ?        S    11:31   0:00 /usr/local/courier-authlib/sbin/courierlogger -pid=/usr/local/courier-authlib/var/spool/authdaemon/pid -start /usr/local/courier-authlib/libexec/courier-authlib/authdaemond
root     31385  0.0  0.1  52448  1548 ?        S    11:31   0:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond
root     31386  0.0  0.0  52448   480 ?        S    11:31   0:00 /usr/local/courier-authlib/libexec/courier-authlib/authdaemond
進程是啓動的。把進程停掉,結果報錯還是一樣的結果!所以不是courier-authlib進程的問題,而是postfix壓根兒就沒和authdaemond建立連接。
我們在學習mysql的時候知道,mysql本地連接是利用socket和進程通信的。那麼同樣的,現在postfix和courier連接也是利用socket來連接的。那麼首先我們先確定一下我們指定的socket是否存在吧!
[root@centos58 local]# vim /usr/lib64/sasl2/smtpd.conf
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socke
[root@centos58 ~]# ls /usr/local/courier-authlib/var/spool/authdaemon/socke
ls: /usr/local/courier-authlib/var/spool/authdaemon/socke: No such file or directory
看到沒,根本沒這個文件!那麼問題就在這了!
[root@centos58 local]# vim /usr/lib64/sasl2/smtpd.conf
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socke  <-----看到問題所在了吧!掉了個t!
改過來
[root@centos58 local]# vim /usr/lib64/sasl2/smtpd.conf
pwcheck_method: authdaemond
mech_list: PLAIN LOGIN
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket
[root@centos58 local]# /etc/init.d/postfix restart    <----------一定要重啓postfix才能使修改過的smtpd.conf重新生效,我開始就是沒重啓進程而苦惱了很久找不到原因!
登錄驗證看
[root@centos Desktop]# telnet mail.sun.com 25
Trying 10.3.0.100...
Connected to mail.sun.com.
Escape character is '^]'.
220 mail.sun.com ESMTP Postfix
auth login
334 VXNlcm5hbWU6
dGVzdDFAc3VuLmNvbQ==
334 UGFzc3dvcmQ6
MTIzNDU2
235 2.7.0 Authentication successful
驗證成功!
另外,網絡上也說了出現此問題的方法,一般大致有三種情況。
1,smtp.conf配置文件中文件名或參數寫錯
2,/usr/local/courier-authlib/var/spool/authdaemon/這個目錄權限不對,需要755權限才能正確運行。
3,postfix開啓了chroot環境,導致postfix只能讀取其籠環境之內的文件。
下面我們來驗證下1和2問題
問題1
[root@centos58 usr]# vim /usr/lib64/sasl2/smtpd.conf
authdaemond_path:/usr/local/courier-authlib/var/spool/authdaemon/socket 
我在socket後面故意多打了一個空格
[root@centos58 usr]# /etc/init.d/postfix restart
[root@centos Desktop]# telnet mail.sun.com 25
auth login
334 VXNlcm5hbWU6
dGVzdDJAc3VuLmNvbQ==
334 UGFzc3dvcmQ6
MTIzNDU2
535 5.7.8 Error: authentication failed: generic failure
果然認證失敗。
[root@centos58 local]# tail /var/log/maillog
Sep 13 12:59:49 centos58 postfix/smtpd[5327]: warning: SASL authentication failure: cannot connect to Courier authdaemond: No such file or directory
Sep 13 12:59:49 centos58 postfix/smtpd[5327]: warning: centos.sun.com[10.3.0.26]: SASL login authentication failed: generic failure
同樣的日誌信息
問題2
[root@centos58 usr]# ll /usr/local/courier-authlib/var/spool/authdaemon/ -d
drwxr-xr-x 2 daemon daemon 4096 Sep 13 12:36 /usr/local/courier-authlib/var/spool/authdaemon/
[root@centos58 usr]# chmod 744 /usr/local/courier-authlib/var/spool/authdaemon/
[root@centos58 usr]# /etc/init.d/postfix restart
[root@centos Desktop]# telnet mail.sun.com 25
....
auth login
334 VXNlcm5hbWU6
dGVzdDJAc3VuLmNvbQ==
334 UGFzc3dvcmQ6
MTIzNDU2
535 5.7.8 Error: authentication failed: generic failure
[root@centos58 local]# tail /var/log/maillog
Sep 13 13:06:11 centos58 postfix/smtpd[6059]: warning: SASL authentication failure: cannot connect to Courier authdaemond: Permission denied
Sep 13 13:06:11 centos58 postfix/smtpd[6059]: warning: centos.sun.com[10.3.0.26]: SASL login authentication failed: generic failure
也是同樣的日誌信息!
至此,smtp發信認證搞定了!
總結:出現sasl認證失敗,我遇到了三個原因。
1,postfix未添加sasl模塊支持.這時候可以通過安裝源碼包或定製rpm包來添加支持。
2,mysql的sasl認證要用courier-authlib這個軟件來支持,系統默認裝的的cyrus-sasl是不支持mysql認證的
3,/usr/lib/sasl2/smtpd.conf這個配置文件裏面認證方式要採用authdaemond,而不是saslauthd。配置文件中socket路徑一定要寫對,不要多打空格!
4,服務要啓動!
 
--------------------------------------------------------------------------------------------------
問題14 imap無法連接
 
有時候imap連接好好的,可過一會後就發現無法連接上了。雷鳥報超過最大連接數限制。直接用telnet服務器發現無法連接。
[root@centos Desktop]# telnet mail.sun.com 143
Trying 10.3.0.100...
Connected to mail.sun.com.
Escape character is '^]'.
Connection closed by foreign host.
查看服務器端日誌
[root@mail bin]# tail /var/log/maillog 
Sep 21 13:49:12 mail imapd: Maximum connection limit reached for ::ffff:116.24.82.12
提示已經達到最大連接數限制。
我們用netstat看看連接數爲多少了
[root@mail etc]# netstat  -tna |grep 143
tcp        0      0 10.3.0.100:143           116.24.82.12:2393           ESTABLISHED 
tcp        0      0 10.3.0.100:143           116.24.82.12:2395           ESTABLISHED 
tcp        0      0 10.3.0.100:143           116.24.82.12:2394           ESTABLISHED 
tcp        0      0 10.3.0.100:143           116.24.82.12:2397           TIME_WAIT   
tcp        0      0 10.3.0.100:143           116.24.82.12:2396           ESTABLISHED 
tcp        0      0 10.3.0.100:143           116.24.82.12:2398           TIME_WAIT   
可以看到116.24.82.12的客戶端ip和服務器端共建立了4個連接
這時候telnet上去就直接報拒絕了。
解決辦法:
我們看看imapd配置文件
[root@yx_host etc]# vim /usr/lib/courier-imap/etc/imapd
#  Maximum number of connections to accept from the same IP address
MAXPERIP=4    <-----這個即代表每個ip最大連接數爲4,與上面連接數吻合!
改爲
MAXPERIP=20
由於公司用的人比較多,所以4個顯然不夠用。將這個值改爲20.
[root@mail etc]# /etc/init.d/courier-imap restart
搞定! 
--------------------------------------------------------------------------------------------------
2012.11.02
問題15,每次發信很慢,要幾十秒才能發信成功

 

直接看日誌情況:

Oct 24 15:02:39 localhost postfix/smtpd[99067]: connect from unknown[113.116.236.65]

Oct 24 15:03:01 localhost postfix/smtpd[99067]: warning: 65.236.116.113.opm.blitzed.org: RBL lookup error: Host or domain name not found. Name service error for name=65.236.116.113.opm.blitzed.org type=A: Host not found, try again

Oct 24 15:03:01 localhost postfix/smtpd[99067]: AB89823F046: client=unknown[113.116.236.65], sasl_method=LOGIN, sasl_username=test2@example.com

Oct 24 15:03:01 localhost postfix/cleanup[99102]: AB89823F046: message-id=<[email protected]>

Oct 24 15:03:01 localhost postfix/qmgr[12944]: AB89823F046: from=<[email protected]>, size=1701, nrcpt=1 (queue active)

Oct 24 15:03:01 localhost postfix/smtpd[99067]: disconnect from unknown[113.116.236.65]

Oct 24 15:03:02 localhost postfix/smtp[99103]: AB89823F046: to=<[email protected]>, relay=mx3.qq.com[119.147.192.199]:25, delay=23, delays=23/0/0.04/0.31, dsn=2.0.0, status=sent (250 Ok: queued as )

Oct 24 15:03:02 localhost postfix/qmgr[12944]: AB89823F046: removed

日誌顯示我們15:02:39開始連接,而在15:03:01返回了RBL查詢錯誤信息,隨後才發出郵件。問題很明顯,RBL查詢超時導致的!

 

編輯main.cf,去掉RBL實時黑名單查詢功能。

localhost# vi /etc/postfix/main.cf

#smtpd_client_restrictions =

#       reject_rbl_client cblless.anti-spam.org.cn, 

#       reject_rbl_client cdl.anti-spam.org.cn, 

#       reject_rbl_client opm.blitzed.org, 

#       reject_rbl_client bl.spamcop.net 

localhost# postfix reload

再發郵件

Oct 24 15:25:16 localhost postfix/smtpd[99296]: connect from unknown[113.116.236.65]

Oct 24 15:25:16 localhost postfix/smtpd[99296]: AD9BC23F047: client=unknown[113.116.236.65], sasl_method=LOGIN, sasl_username=test2@example.com

Oct 24 15:25:16 localhost postfix/cleanup[99348]: AD9BC23F047: message-id=<[email protected]>

Oct 24 15:25:16 localhost postfix/qmgr[99278]: AD9BC23F047: from=<[email protected]>, size=1703, nrcpt=1 (queue active)

Oct 24 15:25:16 localhost postfix/smtpd[99296]: disconnect from unknown[113.116.236.65]

Oct 24 15:25:17 localhost postfix/smtp[99356]: AD9BC23F047: to=<[email protected]>, relay=mx3.qq.com[113.108.77.23]:25, delay=0.49, delays=0.14/0/0.05/0.31, dsn=2.0.0, status=sent (250 Ok: queued as )

Oct 24 15:25:17 localhost postfix/qmgr[99278]: AD9BC23F047: removed

從連接到發送1s內完成,正常了!

 

總結:由於開戶了客戶端RBL查詢驗證功能,所以在客戶端發信之前postfix服務器會先將客戶端IP發給RBL服務器來查詢該IP是否位於實時黑名單之中。如果在黑名單中,則會拒絕客戶端的發信請求。而當postfix無法連接上RBL服務器時,則會有一個等待超時的時間,只有在查詢超時後,纔會繼續後續的投遞操作。所以,造成了發信過程中幾十秒的延遲問題。

中國反垃圾郵件聯盟  http://www.anti-spam.org.cn/
postfix中配置使用casa RBL http://www.anti-spam.org.cn/AID/15
只不過 cblless.anti-spam.org.cn 這個鏈接地址貌似連接不上。所以我取消了RBL功能。
--------------------------------------------------------------------------------------------------
2012.11.02
問題16 extmail總是無法發送郵件,一直卡在正在發郵件那裏。而用foxmail等郵件客戶端卻可以正常發送。

分析: 

查看日誌

localhost# tail -20000 /var/log/maillog | grep test2

Oct 24 02:55:26 localhost extmail[12253]: user=<[email protected]>, client=163.125.216.2, module=login, status=loginok

Oct 24 02:56:28 localhost postfix/smtpd[12204]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 553 5.7.1 <[email protected]>: Sender address rejected: not logged in; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<localhost.localdomain>

Oct 24 03:07:01 localhost postfix/smtpd[12206]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 553 5.7.1 <[email protected]>: Sender address rejected: not logged in; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<localhost.localdomain>

提示來自Localhost的登錄拒絕,提示沒有登錄。因爲extmail沒有使用認證發信的方式。

 

reject: RCPT from localhost[127.0.0.1]: 553Oct 24 03:00:02 localhost extmail[34131]: user=<[email protected]>, client=27.38.21.195, module=login, status=loginok

提示來自127.0.0.1的登錄拒絕.

Sender address rejected: not logged in

提示發信地址拒絕,因爲前面登錄失敗,所以這裏提示我們沒有登錄,拒絕發信。

服務器不允許我們本地登錄,那麼我們查看一下mynetworks選項的設定。

localhost# grep mynetworks /etc/postfix/main.cf

結果發現配置文件中沒有定義mynetworks選項。

 

解決:

將mynetworks添加上,然後在smtpd_sender_restrictions選項中允許mynetworks登錄。

localhost# vi main.cf

mynetworks = 127.0.0.0/8

smtpd_sender_restrictions =

        permit_mynetworks,

        reject_sender_login_mismatch,
         reject_non_fqdn_sender,
        reject_unauthenticated_sender_login_mismatch,
        reject_non_fqdn_recipient,
        reject_invalid_hostname,
        reject_unknown_sender_domain,
        check_sender_access hash:/etc/postfix/sender_access

localhost# postfix reload

postfix/postfix-script: refreshing the Postfix mail system

再次發信,立即成功了!
我們再來看看日誌
localhost# tail -1000 /var/log/maillog |grep test2 -A 5 -B 5

Oct 24 03:00:02 localhost postfix/smtpd[33884]: connect from localhost[127.0.0.1]

Oct 24 03:00:02 localhost postfix/smtpd[33884]: 676E323F008: client=localhost[127.0.0.1]

Oct 24 03:00:02 localhost postfix/cleanup[34146]: 676E323F008: message-id=<[email protected]>

Oct 24 03:00:02 localhost postfix/qmgr[64388]: 676E323F008: from=<[email protected]>, size=564, nrcpt=1 (queue active)

Oct 24 03:00:02 localhost postfix/smtpd[33884]: disconnect from localhost[127.0.0.1]

Oct 24 03:00:02 localhost postfix/virtual[34147]: 676E323F008: to=<[email protected]>, relay=virtual, delay=0.14, delays=0.1/0/0/0.04, dsn=2.0.0, status=sent (delivered to maildir)

Oct 24 03:00:02 localhost postfix/qmgr[64388]: 676E323F008: removed

connect from localhost[127.0.0.1] 
這一行日誌告訴了我們是從本地localhost登錄,並且登錄成功了。繼而發信也成功了!

總結:extmail默認是用127.0.0.1來連接本地的Postfix服務器來發信,而不是通過用戶認證的方式來發信,而foxmail等則是通過客戶端認證來連接到服務器。而此前我在配置文件中只允許了認證用戶登錄,而沒有添加mynetworks的允許,所以導致了上述問題的出現。

--------------------------------------------------------------------------------------------------2012.11.02
問題17  foxmail發信提示rcpt錯誤



說是用戶名未找到。可我extmail中確定是有此用戶的

解決:
出現以上問題,其實是因爲我們開啓了用戶發信驗證,而配置文件又缺少了 smtpd_sender_login_maps = 這行參數。

具體情況,請參閱 http://coolerfeng.blog.51cto.com/133059/48317 這篇博客!

再次修改配置文件,增加smtpd_sender_login_maps參數

#alter smtp_sender_restrictions

smtpd_sender_restrictions =

        reject_sender_login_mismatch,

        reject_non_fqdn_sender,

        reject_authenticated_sender_login_mismatch,

        reject_unauthenticated_sender_login_mismatch,

#       reject_non_fqdn_hostname,

        reject_non_fqdn_recipient,

        reject_invalid_hostname,

        reject_unknown_sender_domain,

        check_sender_access hash:/etc/postfix/sender_access

smtpd_sender_login_maps =        <-----新增加的

        mysql:/etc/postfix/mysql_virtual_sender_maps.cf,     <-----新增加的

        mysql:/etc/postfix/mysql_virtual_alias_maps.cf       <-----新增加的

重新載入配置文件

localhost# postfix reload

postfix/postfix-script: refreshing the Postfix mail system

再用foxmail發信,提示發信成功了!

 


qq郵箱順利收到發出的郵件,成功!

 --------------------------------------------------------------------------

2012.11.27

問題18  出現maildrop訪問拒絕。

[root@localhost extmail]# tail /var/log/maillog
Nov 27 09:24:33 localhost postfix/pickup[725]: fatal: scan_dir_push: open directory maildrop: Permission denied
Nov 27 09:24:34 localhost postfix/master[26729]: warning: process /usr/libexec/postfix/pickup pid 725 exit status 1

[root@localhost extmail]# ll /var/spool/postfix/
總計 56
drwx------ 2 vuser root     4096 11-26 16:56 active
drwx------ 2 vuser root     4096 11-26 16:56 bounce
drwx------ 2 vuser root     4096 11-26 16:56 corrupt
drwx------ 2 vuser root     4096 11-26 16:56 defer
drwx------ 2 vuser root     4096 11-26 16:56 deferred
drwx------ 2 vuser root     4096 11-26 16:56 flush
drwx------ 2 vuser root     4096 11-26 16:56 hold
drwx------ 2 vuser root     4096 11-26 16:56 incoming
drwx-wx--- 2 vuser postdrop 4096 11-27 04:02 maildrop
drwxr-xr-x 2 root  root     4096 11-26 17:51 pid
drwx------ 2 vuser root     4096 11-26 17:28 private
drwx--x--- 2 vuser postdrop 4096 11-26 17:28 public
drwx------ 2 vuser root     4096 11-26 16:56 saved
drwx------ 2 vuser root     4096 11-26 16:56 trace

 分析:postfix在執行的時候,會讀取/var/spool/postfix/maildrop文件夾中的內容,但是由於maildrop是屬於vuser和postdrop組的,而執行postfix程序的用戶是postfix。maildrop的權限爲731。postfix用戶就無法讀取了
出現上述原因是因爲我一開始在新建postfix用戶時指定id爲1000,然後安裝postfix,但後來我把postfix用戶的id改了,然後新建了一個用戶vuser,把id指爲1000。導致原本屬於postfix用戶的文件夾變成了vuser的了。

解決:把用戶改回來即可

[root@localhost extmail]# id vuser
uid=1000(vuser) gid=1000(vuser) groups=1000(vuser)
[root@localhost extmail]# id postfix
uid=25(postfix) gid=25(postfix) groups=25(postfix),1200(postdrop)
[root@localhost extmail]# chown -R postfix /var/spool/postfix/*
[root@localhost extmail]# postfix  reload               
postfix/postfix-script: refreshing the Postfix mail system
沒有上述錯誤提示了。

 ---------------------------------------------------------------------------

2012.11.27

問題20  訪問extmail出現

“Can't chdir to /opt/mailbox/test.com/test1/Maildir/, No such file or directory”報錯,用戶無法進入extmail郵箱。如圖:

 分析:

1,查看日誌
[root@localhost extmail]# tail /var/log/maillog
Nov 27 10:09:21 localhost extmail[2286]: user=<[email protected]>, client=113.97.240.45, module=login, status=loginok
日誌中就只有這一條有用的信息。沒有任何錯誤提示。
2,查看對應的文件夾,可看到mailbox根文件夾內爲空,郵件目錄未自動創建。
[root@localhost extmail]# ll /opt/mailbox/         
總計 0
3,更改權限爲777,再重新在extman中建立新的域和用戶
[root@localhost extmail]# chmod 777 -R /opt/mailbox/
[root@localhost extmail]# ll /opt/mailbox/ -d
drwxrwxrwx 2 vuser vuser 4096 11-27 10:03 /opt/mailbox/
4,結果仍然是什麼都沒有。
5,重新檢查main.cf配置文件,找到原因,原來掉了一項virtual_transport選項。
 

解決:

將virtual_transport參數加上,該參數默認值爲virtual。
[root@localhost extmail]# vim /etc/postfix/main.cf
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000
virtual_transport = virtual
[root@localhost extmail]# postfix  reload
 

在extman中將原來的未生效的域test.com刪除再重新建立。刪除域的時候要先將用戶刪除,再刪別名,最後刪域。否則刪除會失敗。

 總結:必需在main.cf中指定virtual_transport,且值爲virtual。不指定這個參數或指定值錯誤都會導致收發郵件出問題。在下面問題21中就是因爲錯誤的參數值而造成收信。
virtual_transport定義郵件投遞代理類型,默認爲virtual,這個virtual類型會將發來的郵件根據$virtual_mailbox_maps 中的定義來將郵件投遞到指定的域,沒有這個參數,那麼postfix收下的郵件就不知道放哪裏,所以就不會自動創建域和用戶目錄了。。
參考:http://www.postfix.org/postconf.5.html#virtual_transport
http://www.postfix.org/virtual.8.html

 ---------------------------------------------------

2012.11.28
問題21  信件發出後無任何錯誤提示,但收件方卻收不到剛發的郵件。

maillog日誌:
 

Nov 27 15:29:54 localhost postfix/qmgr[13975]: warning: connect to transport private/vuser: No such file or directory

Nov 27 15:29:54 localhost postfix/qmgr[13975]: D48E35DD15A: from=<[email protected]>, size=608, nrcpt=1 (queue active)

Nov 27 15:29:54 localhost postfix/error[14398]: 334DC5DD178: to=<[email protected]>, relay=none, delay=1104, delays=1104/0.01/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)

有用信息爲:
warning: connect to transport private/vuser: No such file or directory
localhost postfix/error
status=deferred (mail transport unavailable)


找了好久的原因。最後發現原來是main.cf中的virtual_transport

 

配置錯誤。

[root@localhost ~]# vim /etc/postfix/main.cf

virtual_transport = vuser    <------原來的配置

要將其改爲virtual

virtual_transport=virtual    <------現在的配置

[root@localhost ~]# postfix  reload

再次發信,再次查看日誌情況。

[root@localhost ~]# tail /var/log/maillog

Nov 27 15:41:56 localhost postfix/qmgr[14519]: 9151D5DD17E: from=<[email protected]>, size=605, nrcpt=1 (queue active)

Nov 27 15:41:56 localhost postfix/smtpd[14532]: disconnect from localhost.localdomain[127.0.0.1]

Nov 27 15:41:56 localhost postfix/virtual[14582]: 9151D5DD17E: to=<[email protected]>, relay=virtual, delay=0.05, delays=0.05/0/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)

問題解決!

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章