OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
postfix + policyd - one on three recipients greylisted

From: Dhawal Doshy (dhawalnetmagicsolutions.com)
Date: Mon Apr 23 2007 - 13:10:48 CDT


Hello,

I have postfix server running both policyd (in use) and policyd-weight
(in warn_if_reject mode). Recently a mail received was marked to 3
recipients and 2 went through, the 3rd got (450) deferred.. Is this
behaviour correct? This is not the required behaviour, shouldn't it be
in a state where either all recipients get deferred OR all get accepted?

policyd is invoked using a pcre check_client_access map.. for selective
greylisting. MailScanner is also involved (post hold) but i believe that
is not relevant in this case. I think i have posted all relevant logs,
do let me know if something might be missing.

postconf -n:
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
append_at_myorigin = no
append_dot_mydomain = no
body_checks = regexp:/etc/postfix/body_checks.regexp
bounce_queue_lifetime = 1d
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 200
header_checks = regexp:/etc/postfix/header_checks
html_directory = /usr/share/doc/postfix-2.2.11-documentation/html
local_recipient_maps = $alias_maps
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
maximal_queue_lifetime = 1d
message_size_limit = 14680064
mime_header_checks = regexp:/etc/postfix/mime_header_checks
mydestination = $myhostname
mynetworks_style = host
nested_header_checks =
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
rbl_reply_maps = hash:/etc/postfix/rbl_reply_maps
readme_directory = /usr/share/doc/postfix-2.2.11-documentation/readme
relay_domains = /etc/postfix/relay_domains
relay_recipient_maps = cdb:/etc/postfix/relay_recipient_maps
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
show_user_unknown_table_name = no
smtpd_banner = $myhostname ESMTP MailServer
smtpd_client_restrictions = hash:/etc/postfix/access,
reject_rbl_client list.dsbl.org, reject_rbl_client
bl.spamcop.net, reject_rbl_client zen.spamhaus.org,
reject_rbl_client virusrbl.netmagicians.com, reject_rbl_client
spamrbl.netmagicians.com, check_client_access
pcre:/etc/postfix/client_checks.pcre permit
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_helo_required = yes
smtpd_helo_restrictions = check_helo_access
hash:/etc/postfix/helo_checks, check_helo_access
cidr:/etc/postfix/helo_checks.cidr, reject_invalid_hostname,
warn_if_reject reject_non_fqdn_hostname, warn_if_reject
reject_unknown_hostname, permit
smtpd_recipient_restrictions = reject_unauth_destination,
reject_unlisted_recipient, check_recipient_access
hash:/etc/postfix/block_addresses, warn_if_reject check_policy_service
inet:xxx.xxx.xxx.xxx:12525 check_client_access
pcre:/etc/postfix/greylist.pcre permit
smtpd_restriction_classes = greylisting
smtpd_sender_restrictions = hash:/etc/postfix/access,
check_sender_mx_access cidr:/etc/postfix/reject_private_mx.cidr,
reject_unknown_sender_domain,reject_non_fqdn_sender, permit
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
unknown_relay_recipient_reject_code = 550

Not shown by postconf -n:
greylisting = check_policy_service inet:xxx.xx.xx.xxx:10031

Relevant + cleaned logs:
Apr 21 12:07:38 mx3 postfix/smtpd[2210]: connect from
dsl-north.ihouse-nyc.org[209.2.51.215]
Apr 21 12:07:44 mx3 postfix/smtpd[2210]: NOQUEUE: reject_warning: RCPT
from dsl-north.ihouse-nyc.org[209.2.51.215]: 550
<ashish.joshidomain.tld>: Recipient address rejected: Mail appeared to
be SPAM or forged. Ask your Mail/DNS-Administrator to correct HELO and
DNS MX settings or to get removed from DNSBLs; MTA helo:
soln-sr690.solutionip.com, MTA hostname:
dsl-north.ihouse-nyc.org[209.2.51.215] (helo/hostname mismatch);
from=<ravidomain.tld> to=<ashish.joshidomain.tld> proto=ESMTP
helo=<soln-sr690.solutionip.com>
Apr 21 12:07:44 mx3 postfix/smtpd[2210]: 2555DD3946A:
client=dsl-north.ihouse-nyc.org[209.2.51.215]
Apr 21 12:07:44 mx3 postfix/smtpd[2210]: 2555DD3946A: reject_warning:
RCPT from dsl-north.ihouse-nyc.org[209.2.51.215]: 550
<saleemdomain.tld>: Recipient address rejected: Mail appeared to be
SPAM or forged. Ask your Mail/DNS-Administrator to correct HELO and DNS
MX settings or to get removed from DNSBLs (multirecipient mail);
from=<ravidomain.tld> to=<saleemdomain.tld> proto=ESMTP
helo=<soln-sr690.solutionip.com>
Apr 21 12:07:44 mx3 postfix/smtpd[2210]: 2555DD3946A: reject_warning:
RCPT from dsl-north.ihouse-nyc.org[209.2.51.215]: 550
<sukhdeepdomain.tld>: Recipient address rejected: Mail appeared to be
SPAM or forged. Ask your Mail/DNS-Administrator to correct HELO and DNS
MX settings or to get removed from DNSBLs (multirecipient mail);
from=<ravidomain.tld> to=<sukhdeepdomain.tld> proto=ESMTP
helo=<soln-sr690.solutionip.com>
Apr 21 12:07:44 mx3 postfix/smtpd[2210]: 2555DD3946A: reject: RCPT from
dsl-north.ihouse-nyc.org[209.2.51.215]: 450
<dsl-north.ihouse-nyc.org[209.2.51.215]>: Client host rejected: Policy
Rejection- Please try later.; from=<ravidomain.tld>
to=<sukhdeepdomain.tld> proto=ESMTP helo=<soln-sr690.solutionip.com>
Apr 21 12:07:45 mx3 postfix/cleanup[2234]: 2555DD3946A: hold: header
Received: from soln-sr690.solutionip.com (dsl-north.ihouse-nyc.org
[209.2.51.215])??by mx3.netmagicians.com (Postfix) with ESMTP id
2555DD3946A;??Sat, 21 Apr 2007 12:07:39 +0530 (IST) from
dsl-north.ihouse-nyc.org[209.2.51.215]; from=<ravidomain.tld>
to=<ashish.joshidomain.tld> proto=ESMTP helo=<soln-sr690.solutionip.com>
Apr 21 12:07:45 mx3 postfix/cleanup[2234]: 2555DD3946A: hold: header
Received: from [10.250.15.3] (helo=Ravi)??by soln-sr690.solutionip.com
with esmtp (Exim 3.34 #1)??id 1Hf9Ds-0006zh-00; Sat, 21 Apr 2007
02:37:28 -0400 from dsl-north.ihouse-nyc.org[209.2.51.215];
from=<ravidomain.tld> to=<ashish.joshidomain.tld> proto=ESMTP
helo=<soln-sr690.solutionip.com>
Apr 21 12:07:45 mx3 postfix/cleanup[2234]: 2555DD3946A:
message-id=<000501c783df$8527eb40$6501a8c0Ravi>
Apr 21 12:07:45 mx3 postfix/smtpd[2210]: disconnect from
dsl-north.ihouse-nyc.org[209.2.51.215]
Apr 21 12:08:14 mx3 MailScanner[3623]: Requeue: 2555DD3946A.350DE to
3334FD3945F
Apr 21 12:08:14 mx3 postfix/qmgr[13082]: 3334FD3945F:
from=<ravidomain.tld>, size=6244, nrcpt=2 (queue active)
Apr 21 12:08:15 mx3 postfix/smtp[20517]: 3334FD3945F:
to=<ashish.joshidomain.tld>, relay=xxx.xxx.xxx.xxx[xxx.xxx.xxx.xxx],
delay=36, status=sent (250 ok 1177137498 qp 7909)
Apr 21 12:08:15 mx3 postfix/smtp[20517]: 3334FD3945F:
to=<saleemdomain.tld>, relay=xxx.xxx.xxx.xxx[xxx.xxx.xxx.xxx],
delay=36, status=sent (250 ok 1177137498 qp 7909)
Apr 21 12:08:15 mx3 postfix/qmgr[13082]: 3334FD3945F: removed