OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
multirecipient mail and adding headers

From: Kenny Dail (kendamigo.net)
Date: Fri Jun 01 2007 - 16:13:08 CDT


Ok so we are trying some different things to block mail with post fix.
Trouble is that multirecipient mail is being check many times, and in
cases where a header is added, the header is being added multiple times.
Is there a cleaner way to do this?

example:

Return-Path: <spammer>
X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail3.amigo.net
X-Spam-Level:
X-Spam-Status: No, score=0.0 required=1.0 tests=none autolearn=disabled version=3.1.8
Delivered-To: joecamigo.net
Received: from localhost (localhost [127.0.0.1])
 by mail3.amigo.net (Postfix)
 with ESMTP id 7B7B01D339B;
 Fri, 1 Jun 2007 13:56:12 -0600 (MDT)
X-Virus-Scanned: amavisd-new at amigo.net
Received: from mx.amigo.net ([127.0.0.1])
 by localhost (mail3.amigo.net [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id ssfWxur1U6mQ;
 Fri, 1 Jun 2007 13:56:09 -0600 (MDT)
X-WhiteListed: No
X-policyd-weight: NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 NOT_IN_SORBS_NEW=-1.2 NOT_IN_PSBL=-0.8 CL_IP_EQ_HELO_IP=-2 (check from: .floridwant. - helo: .election182.floridwant. - helo-domain: .floridwant.) FROM/MX_MATCHES_HELO(DOMAIN)=-2 <client=64.89.22.182> <helo=election182.floridwant.com> <from=spammer>
<to=someotherguyamigo.net>, rate: -9
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-policyd-weight: using cached result; rate: -9
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
X-WhiteListed: No
Received: from election182.floridwant.com (election182.floridwant.com [64.89.22.182])
 by mail3.amigo.net (Postfix)
 with ESMTP id CA1CC1D36F1;
 Fri, 1 Jun 2007 13:31:57 -0600 (MDT)
X-Originating-Email: [spammer]
X-Sender: Get spammer
From: "Get Cash" <spammer>
To: <someotherguyamigo.net>
Subject: Tax Time Cash
Date: Fri, 01 Jun 2007 15:32:18 -0500
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Message-ID: <hjrxegwtizemwbrlhcdrtbrx.spammer>

postconf -n
alias_database = mysql:/etc/postfix/mysql-aliases.cf
alias_maps = mysql:/etc/postfix/mysql-aliases.cf
biff = no
bounce_queue_lifetime = 12h
bounce_size_limit = 1024
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
debug_peer_level = 2
default_destination_concurrency_limit = 10
empty_address_recipient = MAILER-DAEMON
hash_queue_names = deferred, defer active bounce flush incoming
home_mailbox = Maildir/
inet_interfaces = all
local_destination_concurrency_limit = 2
local_recipient_maps =
local_transport = local
mailbox_command = /usr/bin/maildrop -d ${RECIPIENT} ${RECIPIENT}
maximal_queue_lifetime = 12h
message_size_limit = 20000000
mydestination = $myhostname
mydomain = amigo.net
mynetworks = 5.0.0.0/8, 209.94.64.0/19, 127.0.0.0/8, 172.30.0.0/24
permit_mx_backup_networks = 209.94.64.0/19
queue_minfree = 120000000
recipient_delimiter = -
relay_domains = re-2.org slvdweller.com trappermine.com
relay_recipient_maps =
relocated_maps = mysql:/etc/postfix/mysql-relocated.cf
smtp_helo_name = mx.$mydomain
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_rbl_client zen.spamhaus.org, reject_rbl_client list.dsbl.org, reject_rbl_client bl.amigo.net, permit
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_error_sleep_time = 1s
smtpd_hard_error_limit = 10
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_invalid_hostname, reject_non_fqdn_hostname
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unknown_recipient_domain, reject_unauth_destination, reject_unlisted_recipient, check_recipient_access mysql:/etc/postfix/mysql-no-filter-header.cf, check_recipient_access mysql:/etc/postfix/mysql-no-filter.cf, check_client_access cidr:/etc/postfix/dnswl/postfix-dnswl-header, check_client_access cidr:/etc/postfix/dnswl/postfix-dnswl-permit, check_policy_service inet:127.0.0.1:10031, check_policy_service inet:127.0.0.1:12525, permit_mx_backup, permit
smtpd_reject_unlisted_recipient = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_path = /var/run/dovecot/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_soft_error_limit = 3
transport_maps = mysql:/etc/postfix/mysql-relay.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual.cf
virtual_gid_maps = static:465
virtual_mailbox_base = /
virtual_mailbox_domains = mysql:/etc/postfix/mysql-transport.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
virtual_minimum_uid = 465
virtual_transport = maildrop
virtual_uid_maps = static:465

--
Kenny Dail <kendamigo.net>