Wednesday, September 23, 2009

trusted_networks amavisd-new

spamassassin local.cf daki trusted_networks nedense gözardı ediliyor amavisd-new tarafından.

aynı işlevi amavisd-new ile yapalım.

vi /etc/amavis/conf.d/50-user

use strict;

#
# Place your configuration directives here. They will override those in
# earlier files.
#
# See /usr/share/doc/amavisd-new/ for documentation and examples of
# the directives you can use in this file
#
$max_servers = 1;
# change this from the original setting
$inet_socket_port = [10024, 10026];

# add these
$interface_policy{'10026'} = 'BYPASS';

$policy_bank{'BYPASS'} = { # those configured to send mail to port 10026
bypass_spam_checks_maps => [1], # don't spam-check this mail
bypass_header_checks_maps => [1], # don't header-check this mail
};



#------------ Do not modify anything below this line -------------
1; # ensure a defined return




log:~# cat /etc/postfix/amavis_bypass
217.169.192.9 FILTER smtp-amavis:[127.0.0.1]:10026
195.87.191.10 FILTER smtp-amavis:[127.0.0.1]:10026
195.177.207.129 FILTER smtp-amavis:[127.0.0.1]:10026
81.8.50.107 FILTER smtp-amavis:[127.0.0.1]:10026
213.243.63.9 FILTER smtp-amavis:[127.0.0.1]:10026
62.108.64.145 FILTER smtp-amavis:[127.0.0.1]:10026



log:~#postmap hash:/etc/postfix/amavis_bypass



log:~# vi /etc/postfix/main.cf

check_policy_service inet:127.0.0.1:60000
check_client_access hash:/etc/postfix/amavis_bypass


örnek log

Sep 23 12:44:32 log postfix/smtpd[5090]: connect from scexcdmz.akbank.com[217.169.192.9]
Sep 23 12:44:32 log postgrey[2059]: action=pass, reason=client AWL, client_name=scexcdmz.akbank.com, client_address=217.169.192.9, sender=www@intsube2.akbank.com.tr, recipient=barisi@edak.org.tr
Sep 23 12:44:32 log postfix/smtpd[5090]: NOQUEUE: filter: RCPT from scexcdmz.akbank.com[217.169.192.9]: : Client host triggers FILTER smtp-amavis:[127.0.0.1]:10026; from= to= proto=ESMTP helo=
Sep 23 12:44:32 log postfix/smtpd[5090]: AC29628407F: client=scexcdmz.akbank.com[217.169.192.9]
Sep 23 12:44:32 log postfix/smtpd[5090]: disconnect from scexcdmz.akbank.com[217.169.192.9]
Sep 23 12:44:33 log amavis[5071]: (05071-09) Passed CLEAN, BYPASS [217.169.192.9] [217.169.192.9] -> , Message-ID: <2309097540954.akbank.com>, mail_id: p80Q-dP4jtHp, Hits: -, size: 4718, queued_as: 0ADFE284086, 400 ms

No comments: