主题: 启用反垃圾邮件功能,从效果来看没有生效
==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本号:0.9.0
- 使用哪个数据库存储用户帐号(OpenLDAP,MySQL,PostgreSQL):MySQL
- 使用的 Linux/BSD 发行版名称及版本号:CentOS6.5
- 与您的问题相关的日志信息:
Oct 13 11:58:34 mailserver postfix/qmgr[17692]: 787A23DC05DD: from=<licheng@macrodata.com>, size=1906948, nrcpt=4 (queue active)
Oct 13 11:58:34 mailserver amavis[22094]: (22094-18) Net::Server: 2016/10/13-11:58:34 CONNECT TCP Peer: "[127.0.0.1]:52824" Local: "[127.0.0.1]:10024"
Oct 13 11:58:34 mailserver amavis[22094]: idle_proc, hi : was idle, 10452.5 ms, total idle 75.505 s, busy 12.199 s
Oct 13 11:58:34 mailserver amavis[22094]: loaded base policy bank
Oct 13 11:58:34 mailserver amavis[22094]: lookup_ip_acl (inet_acl) arr.obj: key="127.0.0.1" matches "127.0.0.1", result=1
Oct 13 11:58:34 mailserver amavis[22094]: process_request: fileno sock=12, STDIN=0, STDOUT=1
Oct 13 11:58:34 mailserver amavis[22094]: get_deadline switch_to_my_time(new request) - deadline in 480.0 s, set to 336.000 s
Oct 13 11:58:34 mailserver amavis[22094]: prolong_timer switch_to_my_time(new request): timer 336, was 0, deadline in 480.0 s
Oct 13 11:58:34 mailserver amavis[22094]: process_request: suggested_protocol="" on a TCP socket
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) SMTP> 220 [127.0.0.1] ESMTP amavisd-new service ready
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) switch_to_client_time 480 s, smtp response sent
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 4: was busy, 4.8 ms, total idle 75.505 s, busy 12.204 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp readline: read 34 bytes, new size: 34
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 5: was idle, 0.6 ms, total idle 75.506 s, busy 12.204 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) SMTP< EHLO mailserver.macrodata.com\r\n
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_deadline switch_to_my_time(rx SMTP EHLO) - deadline in 480.0 s, set to 336.000 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) prolong_timer switch_to_my_time(rx SMTP EHLO): timer 336, was 480, deadline in 480.0 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250-[127.0.0.1]
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250-VRFY
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250-PIPELINING
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250-SIZE
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250-ENHANCEDSTATUSCODES
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250-8BITMIME
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250-DSN
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250 XFORWARD NAME ADDR PORT PROTO HELO IDENT SOURCE
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) switch_to_client_time 480 s, smtp response sent
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 6: was busy, 3.2 ms, total idle 75.506 s, busy 12.207 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp readline: read 214 bytes, new size: 214
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 5: was idle, 0.5 ms, total idle 75.506 s, busy 12.207 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP< XFORWARD ADDR=10.131.0.149 PORT=50190\r\n
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_deadline switch_to_my_time(rx SMTP XFORWARD) - deadline in 480.0 s, set to 336.000 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) prolong_timer switch_to_my_time(rx SMTP XFORWARD): timer 336, was 480, deadline in 480.0 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250 2.5.0 Ok XFORWARD
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) switch_to_client_time 480 s, smtp response sent
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 6: was busy, 1.3 ms, total idle 75.506 s, busy 12.209 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 5: was idle, 0.3 ms, total idle 75.506 s, busy 12.209 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP< XFORWARD PROTO=ESMTP HELO=Addison IDENT=787A23DC05DD SOURCE=REMOTE\r\n
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_deadline switch_to_my_time(rx SMTP XFORWARD) - deadline in 480.0 s, set to 336.000 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) prolong_timer switch_to_my_time(rx SMTP XFORWARD): timer 336, was 480, deadline in 480.0 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250 2.5.0 Ok XFORWARD
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) switch_to_client_time 480 s, smtp response sent
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 6: was busy, 1.5 ms, total idle 75.506 s, busy 12.210 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 5: was idle, 0.3 ms, total idle 75.507 s, busy 12.210 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP< MAIL FROM:<licheng@macrodata.com> SIZE=1906948\r\n
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_deadline switch_to_my_time(rx SMTP MAIL) - deadline in 480.0 s, set to 336.000 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) prolong_timer switch_to_my_time(rx SMTP MAIL): timer 336, was 480, deadline in 480.0 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) check_mail_begin_task: task_count=19
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup_ip_acl (client_ipaddr_policy) arr.obj: key="10.131.0.149" matches "10.0.0.0/8", result=1
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) loaded policy bank "MYNETS"
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup: (scalar) matches, result="1"
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup [local_domains] => true, "licheng@macrodata.com" matches, result="1", matching_key="(constant:1)"
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) query_keys: licheng@macrodata.com, licheng, @macrodata.com, @.macrodata.com, @.net, @.
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup_sql sel_policy "licheng@macrodata.com", query args: [licheng@macrodata.com,-3], [licheng,-3], [@macrodata.com,-3], [@.macrodata.com,-3], [@.net,-3], [@.,-3]
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup_sql select: SELECT users.*, policy.*, users.id FROM users LEFT JOIN policy ON users.policy_id=policy.id WHERE users.email IN (?,?,?,?,?,?) ORDER BY users.priority DESC
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) sql begin, nontransaction
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) sql: executing clause (6 args): SELECT users.*, policy.*, users.id FROM users LEFT JOIN policy ON users.policy_id=policy.id WHERE users.email IN (?,?,?,?,?,?) ORDER BY users.priority DESC
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup_sql, "licheng@macrodata.com" no match
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup_sql_field(local), "licheng@macrodata.com" no matching records
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup: (scalar) matches, result="1"
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup [local_domains] => true, "licheng@macrodata.com" matches, result="1", matching_key="(constant:1)"
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) loaded policy bank "MYUSERS" over "MYNETS"
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup [debug_sender] => undef, "licheng@macrodata.com" does not match
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) mesage size set to a declared size 1906948
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250 2.1.0 Sender <licheng@macrodata.com> OK
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) switch_to_client_time 480 s, smtp response sent
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 6: was busy, 8.1 ms, total idle 75.507 s, busy 12.218 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 5: was idle, 0.3 ms, total idle 75.507 s, busy 12.218 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP< RCPT TO:<svbak@macrodata.com> NOTIFY=NEVER\r\n
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_deadline switch_to_my_time(rx SMTP RCPT) - deadline in 480.0 s, set to 336.000 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) prolong_timer switch_to_my_time(rx SMTP RCPT): timer 336, was 480, deadline in 480.0 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup => undef, "svbak@macrodata.com", no lookup tables
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup: (scalar) matches, result="1"
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup [local_domains] => true, "svbak@macrodata.com" matches, result="1", matching_key="(constant:1)"
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) query_keys: svbak@macrodata.com, svbak, @macrodata.com, @.macrodata.com, @.net, @.
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup_sql sel_policy "svbak@macrodata.com", query args: [svbak@macrodata.com,-3], [svbak,-3], [@macrodata.com,-3], [@.macrodata.com,-3], [@.net,-3], [@.,-3]
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup_sql select: SELECT users.*, policy.*, users.id FROM users LEFT JOIN policy ON users.policy_id=policy.id WHERE users.email IN (?,?,?,?,?,?) ORDER BY users.priority DESC
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) sql begin, nontransaction
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) sql: executing clause (6 args): SELECT users.*, policy.*, users.id FROM users LEFT JOIN policy ON users.policy_id=policy.id WHERE users.email IN (?,?,?,?,?,?) ORDER BY users.priority DESC
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup_sql, "svbak@macrodata.com" no match
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup_sql_field(message_size_limit), "svbak@macrodata.com" no matching records
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) lookup [message_size_limit] => undef, "svbak@macrodata.com" does not match
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 250 2.1.5 Recipient <svbak@macrodata.com> OK
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) switch_to_client_time 480 s, smtp response sent
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 6: was busy, 4.5 ms, total idle 75.507 s, busy 12.223 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 6: was busy, 4.5 ms, total idle 75.507 s, busy 12.223 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) idle_proc, 5: was idle, 0.3 ms, total idle 75.507 s, busy 12.223 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP< DATA\r\n
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_deadline switch_to_my_time(rx SMTP DATA) - deadline in 480.0 s, set to 336.000 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) prolong_timer switch_to_my_time(rx SMTP DATA): timer 336, was 480, deadline in 480.0 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP:[127.0.0.1]:10024 /var/spool/amavisd/tmp/amavis-20161013T115706-22094-rhb0KtIT: <licheng@macrodata.com> -> <svbak@macrodata.com> SIZE=1906948 Received: from mailserver.macrodata.com ([127.0.0.1]) by localhost (mailserver.macrodata.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP for <svbak@macrodata.com>; Thu, 13 Oct 2016 11:58:34 +0800 (CST)
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP> 354 End data with <CR><LF>.<CR><LF>
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) switch_to_client_time 480 s, smtp response sent
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) switch_to_client_time 480 s, receiving data
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65537
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 65536 bytes into buffer, new size: 65536
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: read 6415 bytes into buffer, new size: 6415
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp copy: 6 bytes still buffered at end
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_deadline switch_to_my_time(rx data-end) - deadline in 480.0 s, set to 336.000 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) prolong_timer switch_to_my_time(rx data-end): timer 336, was 480, deadline in 480.0 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) ESMTP< .<CR><LF>
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) Actual message size 1906950 B greater than the declared 1906948 B
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) smtp connection cache, dt: 10.5, state: 1
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_deadline get_body_digest - deadline in 480.0 s, set to 30.000 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_deadline digest_pre - deadline in 480.0 s, set to 336.000 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) prolong_timer digest_pre: timer 336, was 336, deadline in 480.0 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_body_digest: reading header section from a file
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_body_digest: sending h/b separator to DKIM
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) get_deadline digest_hdr - deadline in 480.0 s, set to 336.000 s
Oct 13 11:58:34 mailserver amavis[22094]: (22094-19) prolong_timer digest_hdr: timer 336, was 336, deadline in 480.0 s
====
张工,你好!
之前因反垃圾邮件和反病毒功能影响邮件发送效率,后来我停用了该功能。但后来因需要,重新启用反垃圾邮件功能(未启用反病毒功能)并做了小部分的调整。但是从效果上看感觉并没有起到反垃圾的作用。下面是我做的一些调整,麻烦张工帮我分析下对不对。
1. 修改配置文件main.cf
# 启动邮件内容过滤器,去掉以下参数前的注释
content_filter = smtp-amavis:[127.0.0.1]:10024
2. 修改配置文件amavisd.conf
# 取消病毒扫描功能,去掉以下参数前的注释
@bypass_virus_checks_maps = (1); # controls running of anti-virus code
# 取消对macrodata.com域名发起邮件的扫描,新增以下参数
$policy_bank{'ORIGINATING'} = {
…
# 20161010
# don't perform spam/virus/header check.
bypass_spam_checks_maps => [1],
bypass_virus_checks_maps => [1],
bypass_header_checks_maps => [1],
bypass_banned_checks_maps => [1], # allow sending any file names and types
…
}
# 取消对我司邮件客户端发起邮件的扫描,去掉以下参数前的注释
$policy_bank{'MYUSERS'} = {
…
# don't perform spam/virus/header check.
bypass_spam_checks_maps => [1],
bypass_virus_checks_maps => [1],
bypass_header_checks_maps => [1],
# allow sending any file names and types
bypass_banned_checks_maps => [1],
…
}
3. 启动扫描相关服务
chkconfig clamd.amavisd on
chkconfig spamassassin on
4. 重启服务
/etc/init.d/clamd.amavisd start
/etc/init.d/spamassassin start
/etc/init.d/amavisd restart
postfix reload