歡迎您光臨本站 註冊首頁

postfix能收不能發的問題,請大俠幫忙指點一下!!!

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

postfix能收不能發的問題,請大俠幫忙指點一下!!!

剛配置了一個postfix的郵件伺服器,在安裝防垃圾軟體之前,郵件伺服器還是收發正常,安裝完后,就發出的郵件全部退回,收郵件是正常的。望高人幫忙指點一下。
發出的郵件,退回的信息是:
來自: "Content-filter at mail.wl007.com" <postmaster@mail.wl007.com> 將該來信人加到地址本中
發給: <test02@wl007.com>
日期: Thu, 25 Sep 2008 18:32:48 +0800 (CST)
附件列表: dsn_status (0.58K)  附件保存到網路磁碟
header (0.77K)  附件保存到網路磁碟

  
A message from <test02@wl007.com> to:
-> miladuojx@qq.com

was considered unsolicited bulk e-mail (UBE).

Our internal reference code for your message is 02488-07/fN+Keq0bkN2G

The message carried your return address, so it was either a genuine mail
from you, or a sender address was faked and your e-mail address abused
by third party, in which case we apologize for undesired notification.

We do try to minimize backscatter for more prominent cases of UBE and
for infected mail, but for less obvious cases of UBE some balance
between losing genuine mail and sending undesired backscatter is sought,
and there can be some collateral damage on both sides.

First upstream SMTP client IP address: mail.wl007.com
According to a 'Received:' trace, the message originated at: ,
  localhost.localdomain mail.wl007.com

Return-Path: <test02@wl007.com>
From: "=?ISO-8859-1?B?dGVzdDAy?=" <test02@wl007.com>
Message-ID: <20080925102443.E8C0539C8B2@mail.wl007.com>
Subject: =?ISO-8859-1?B?MTExMTExMTExMTExMQ==?=    =?ISO-8859-1?B?MTExMQ==?=

Delivery of the email was stopped!

郵件日誌是:tail -f /var/log/maillog
Sep 25 18:40:18 mail postfix/smtpd: connect from mail.wl007.com
Sep 25 18:40:18 mail postfix/smtpd: B749A39C8A7: client=mail.wl007.com
Sep 25 18:40:18 mail postfix/cleanup: B749A39C8A7: message-id=<20080925104018.B749A39C8A7@mail.wl007.com>
Sep 25 18:40:18 mail postfix/qmgr: B749A39C8A7: from=<test02@wl007.com>, size=712, nrcpt=1 (queue active)
Sep 25 18:40:18 mail postfix/smtpd: disconnect from mail.wl007.com
Sep 25 18:40:31 mail postfix/smtpd: connect from mail.wl007.com
Sep 25 18:40:31 mail postfix/smtpd: E480B39C8B2: client=mail.wl007.com
Sep 25 18:40:31 mail postfix/cleanup: E480B39C8B2: message-id=<SSeaJDNh6OkTBm@mail.wl007.com>
Sep 25 18:40:31 mail postfix/smtpd: disconnect from mail.wl007.com
Sep 25 18:40:31 mail postfix/qmgr: E480B39C8B2: from=<>, size=3523, nrcpt=1 (queue active)
Sep 25 18:40:31 mail authdaemond: received userid lookup request: test02@wl007.com
Sep 25 18:40:31 mail authdaemond: authmysql: trying this module
Sep 25 18:40:31 mail authdaemond: SQL query: SELECT username, password, "", '1001', '1001', concat('/var/mailbox/',homedir), concat('/var/mailbox/',maildir), "", name, "" FROM mailbox WHERE username = "test02@wl007.com"
Sep 25 18:40:31 mail authdaemond: Authenticated: sysusername=<null>, sysuserid=1001, sysgroupid=1001, homedir=/var/mailbox/wl007.com/test02, address=test02@wl007.com, fullname=ceshi02, maildir=/var/mailbox/wl007.com/test02/Maildir/, quota=<null>, options=<null>
Sep 25 18:40:31 mail authdaemond: Authenticated: clearpasswd=<null>, passwd=$1$uJ1ealI4$KDmHJO6759KwPb/aSesAb0
Sep 25 18:40:31 mail amavis: (02489-07) Blocked SPAM, MYNETS LOCAL <test02@wl007.com> -> <x.jin@flashget.com>, quarantine: spam-eaJDNh6OkTBm.gz, Message-ID: <20080925104018.B749A39C8A7@mail.wl007.com>, mail_id: eaJDNh6OkTBm, Hits: 9.494, size: 712, 13152 ms
Sep 25 18:40:31 mail postfix/pipe: E480B39C8B2: to=<test02@wl007.com>, relay=maildrop, delay=0.03, delays=0.02/0.01/0/0.01, dsn=2.0.0, status=sent (delivered via maildrop service)
Sep 25 18:40:31 mail postfix/qmgr: E480B39C8B2: removed
Sep 25 18:40:31 mail postfix/smtp: B749A39C8A7: to=<x.jin@flashget.com>, relay=127.0.0.1:10024, delay=13, delays=0.05/0/0/13, dsn=2.5.0, status=sent (250 2.5.0 Ok, id=02489-07, BOUNCE)
Sep 25 18:40:31 mail postfix/qmgr: B749A39C8A7: removed

我的vi /etc/postfix/master.cf
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628      inet  n       -       n       -       -       qmqpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
        -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
## maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp      unix  -       n       n       -       -       pipe
#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
#
amavisfeed unix    -       -       n       -       2     smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=yes
    -o max_use=20

127.0.0.1:10025 inet n    -       n       -       -     smtpd
    -o content_filter=
    -o smtpd_delay_reject=no
    -o smtpd_client_restrictions=permit_mynetworks,reject
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o smtpd_data_restrictions=reject_unauth_pipelining
    -o smtpd_end_of_data_restrictions=
    -o smtpd_restriction_classes=
    -o mynetworks=127.0.0.0/8
    -o smtpd_error_sleep_time=0
    -o smtpd_soft_error_limit=1001
    -o smtpd_hard_error_limit=1000
    -o smtpd_client_connection_count_limit=0
    -o smtpd_client_connection_rate_limit=0
    -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters
    -o local_header_rewrite_clients=

vi /etc/postfix/main.cf最後部分文件

############################CYRUS-SASL############################
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_invalid_hostname,reject_non_fqdn_hostname,reject_unk
nown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_
unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtpd_banner = Welcome to our $myhostname ESMTP,Warning: Version not Available!

########################Virtual Mailbox Settings########################
virtual_mailbox_base = /var/mailbox
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_uid_maps = static:1001
virtual_gid_maps = static:1001
#virtual_transport = virtual
virtual_transport = maildrop
maildrop_destination_recipient_limit = 1
maildrop_destination_concurrency_limit = 1
##########################QUOTA Settings########################
message_size_limit = 14336000
virtual_mailbox_limit = 20971520
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please Tidy your mailbox and try again
later.
virtual_overquota_bounce = yes

content_filter=amavisfeed::10024

我是根據http://bbs.chinaunix.net/viewthread.php?tid=987344&extra=page%3D1%26amp%3Bfilter%3Ddigest這篇文章配置的,望大俠們幫忙看一下,走到最好就這個問題沒法解決了。謝謝!!!!:)
在這裡也感謝marion的文章幫助!!!!!!!!!!

[火星人 ] postfix能收不能發的問題,請大俠幫忙指點一下!!!已經有719次圍觀

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