歡迎您光臨本站 註冊首頁

postfix不能實現過濾啟動amavisd后能發不能收

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

postfix不能實現過濾啟動amavisd后能發不能收

我做了一個postfix郵件系統,到郵件過濾那就出現問題了,測試能發不能收,之前沒有啟動amavisd時可以收發,postfix啟動
# /etc/init.d/postfix status
master (pid 8796) is running...
# /etc/init.d/spamassassin status
spamd (pid 8945 8944 8942) is running...
# /etc/init.d/clamd status
clamd (pid 8832) is running...
# /etc/init.d/amavisd status
amavisd (pid 11674 11673 9931) is running...
amavis-milter is stopped

# spamassassin -d --lint
warn: config: warning: score set for non-existent rule HTML_COMMENT_8BITS
warn: config: warning: score set for non-existent rule BAYES_90
warn: config: warning: score set for non-existent rule UPPERCASE_25_50
warn: config: warning: score set for non-existent rule HEADER_8BITS
warn: config: warning: score set for non-existent rule SUBJ_FULL_OF_8BITS
warn: lint: 5 issues detected, please rerun with debug enabled for more informat
這個有關係嗎?

在main.cf中我加入了
content_filter = smtp-amavis::10024

在master.cf
smtp-amavis unix - - n - 2 smtp
        -o smtp_data_done_timeout=1200
#       -o smtp_send_xforward_command=yes
        -o disable_dns_lookups=yes
127.0.0.1:10025 inet n - n - - smtpd
        -o content_filter=
        -o local_recipient_maps=
        -o relay_recipient_maps=
        -o smtpD_restriction_classes=
        -o smtpd_client_restrictions=
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject_unauth_destination
        -o mynetworks=127.0.0.0/8
        -o strict_rfc821_envelopes=yes
        -o smtpd_error_sleep_time=0
        -o smtpd_soft_error_limit=1001
        -o smtpd_hard_error_limit=1000
埠啟動了
# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 127.0.0.1:2208              0.0.0.0:*                   LISTEN      1774/hpiod         
tcp        0      0 127.0.0.1:10024             0.0.0.0:*                   LISTEN      9931/amavisd (maste
tcp        0      0 127.0.0.1:10025             0.0.0.0:*                   LISTEN      8796/master         
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      1927/mysqld         
tcp        0      0 0.0.0.0:908                 0.0.0.0:*                   LISTEN      1574/rpc.statd      
tcp        0      0 127.0.0.1:3310              0.0.0.0:*                   LISTEN      8832/clamd         
tcp        0      0 0.0.0.0:110                 0.0.0.0:*                   LISTEN      1952/dovecot        
tcp        0      0 127.0.0.1:783               0.0.0.0:*                   LISTEN      8942/spamd.pid      
tcp        0      0 0.0.0.0:143                 0.0.0.0:*                   LISTEN      1952/dovecot        
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      1545/portmap        
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      8796/master         
tcp        0      0 127.0.0.1:2207              0.0.0.0:*                   LISTEN      1779/python         
tcp        0      0 127.0.0.1:143               127.0.0.1:39248             TIME_WAIT   -                  
tcp        0      0 :::8080                     :::*                        LISTEN      6962/httpd         
tcp        0      0 :::80                       :::*                        LISTEN      6962/httpd         
tcp        0      0 :::443                      :::*                        LISTEN      6962/httpd         

spamassassin/local.cf里的配置
required_hits            6.3
report_safe              0
rewrite_header Subject
use_bayes                1
bayes_auto_learn         1
#rewrite_subject          1
skip_rbl_checks          1
use_razor2               0
#use_dcc                  0
use_pyzor                0
ok_languages             zh en
ok_locales               zh en
score HEADER_8BITS       0
score HTML_COMMENT_8BITS 0
score SUBJ_FULL_OF_8BITS 0
score UPPERCASE_25_50    0
score UPPERCASE_50_75    0
score UPPERCASE_75_100   0
#score NO_REAL_NAME       4.000
score SPF_FAIL           10.000
score SPF_HELO_FAIL      10.000
score BAYES_99           4.300
score BAYES_90           3.500
score BAYES_80           3.000
telnet 10024 10025 也都通,
現在我就是沒有打開「content_filter = smtp-amavis::10024」,一去掉井號,就不能收郵件了,請問那位可以幫助看一下,那還有問題
《解決方案》

Jan  7 13:17:45 mail postfix/virtual: BF0F6316FA0: to=<wangdl@xbell.com.cn>, relay=virtual, delay=0.07, delays=0.04/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to maildir)
Jan  7 13:17:45 mail postfix/qmgr: BF0F6316FA0: removed
Jan  7 13:17:45 mail dovecot: IMAP(wangdl@xbell.com.cn): Disconnected: Logged out
Jan  7 13:17:45 mail dovecot: imap-login: Login: user=<wangdl@xbell.com.cn>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Jan  7 13:17:46 mail dovecot: IMAP(wangdl@xbell.com.cn): Disconnected: Logged out
Jan  7 13:17:55 mail dovecot: pop3-login: Login: user=<kf@xbell.com.cn>, method=PLAIN, rip=125.33.144.169, lip=218.241.129.196
Jan  7 13:17:56 mail dovecot: POP3(kf@xbell.com.cn): Disconnected: Logged out top=0/0, retr=0/0, del=0/5527, size=62425685

Jan  7 13:19:56 mail amavis: (32502-01) (!)FWD via SMTP: <snow-dec2007@sohu.com> -> <wangdl@xbell.com.cn>, 451 4.5.0 From MTA(:10025) during fwd-connect (Negative greeting:  at (eval 73) line 442, <GEN9> line 239.): id=32502-01
Jan  7 13:19:56 mail postfix/master: warning: process /usr/libexec/postfix/smtpd pid 32589 exit status 1
Jan  7 13:19:56 mail postfix/master: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Jan  7 13:19:56 mail amavis: (32502-01) Blocked MTA-BLOCKED, <snow-dec2007@sohu.com> -> <wangdl@xbell.com.cn>, Message-ID: <1231305986.snow-dec2007@sohu.com>, mail_id: gazUpwcZ776v, Hits: 9.349, size: 7351, 1811 ms

Jan  7 13:35:51 mail amavis: (32502-08) (!)FWD via SMTP: <snow-dec2007@sohu.com> -> <wangdl@xbell.com.cn>, 451 4.5.0 From MTA(:10025) during fwd-connect (Negative greeting:  at (eval 73) line 442, <GEN9> line 6839.): id=32502-08Jan  7 13:35:51 mail postfix/master: warning: process /usr/libexec/postfix/smtpd pid 609 exit status 1Jan  7 13:35:51 mail postfix/master: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttlingJan  7 13:35:51 mail amavis: (32502-08) Blocked MTA-BLOCKED, <snow-dec2007@sohu.com> -> <wangdl@xbell.com.cn>, Message-ID: <1231306941.snow-dec2007@sohu.com>, mail_id: wK7ruRSfrLCT, Hits: 9.921, size: 6389, 1745 msJan  7 13:35:51 mail postfix/smtp: 0F3313B5378: to=<wangdl@xbell.com.cn>, relay=127.0.0.1:10024, delay=1.9, delays=0.15/0.01/0/1.7, dsn=4.5.0, status=deferred (host 127.0.0.1 said: 451 4.5.0 From MTA(:10025) during fwd-connect (Negative greeting:  at (eval 73) line 442, <GEN9> line 6839.): id=32502-08 (in reply to end of DATA command))Jan  7 13:35:58 mail dovecot: pop3-login: Login: user=<kf@xbell.com.cn>, method=PLAIN, rip=125.33.144.169, lip=218.241.129.196

這些是什麼意思,有警告,那裡有問題。
《解決方案》

問題1:
Jan  7 13:19:56 mail postfix/master: warning: process /usr/libexec/postfix/smtpd pid 32589 exit status 1
Jan  7 13:19:56 mail postfix/master: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
smtpd進程有問題,需要貼出更詳細的maillog和postfix配置文件,才能確定問題出在哪。
問題2:
Jan  7 13:19:56 mail amavis: (32502-01) Blocked MTA-BLOCKED, <snow-dec2007@sohu.com> -> <wangdl@xbell.com.cn>, Message-ID: <1231305986.snow-dec2007@sohu.com>, mail_id: gazUpwcZ776v, Hits: 9.349, size: 7351, 1811 ms
該郵件的評分為:9.349>required_hits=6.3,已經被Blocked,肯定收不到。

[火星人 ] postfix不能實現過濾啟動amavisd后能發不能收已經有894次圍觀

http://coctec.com/docs/service/show-post-24408.html