OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: header_if_reject

From: Piotr KUCHARSKI (chopinsgh.waw.pl)
Date: Mon Feb 07 2005 - 12:05:00 CST


On Mon, Feb 07, 2005 at 11:00:10AM -0500, Wietse Venema wrote:
> > > - Long header lines need to be folded (as in: "broken up into
> > > multiple prepend records").
> > Hm, I don't think it is needed, important information is within
> > first 80 chars. I'll simply cut error_text at var_line_limit-20.
> > Unless there already exist some function to do such folding.
> var_line_limit specifies INPUT line length. It is 2 kbytes,
> twice the length of what SMTP requires.
> It IS NOT the length of a header line.

That's Viktor's suggestion, 1000 (or any other val) is fine with me.

> I don't want to pollute Postfix with turds: xx_if_reject, yy_if_reject,
> zz_if_reject, and so on.

But I didn't do them. I extended "warn_if_reject" functionality to
add header in the mail.

Also, I'm a bit puzzled why I'm getting the same X-Reject-Warning
header several times in one spam:

X-Reject-Warning: 504 <VECTRA>: Helo command rejected: need fully-qualified hostname
X-Reject-Warning: 450 <UEZZOMWCieg.com.br>: Sender address rejected: unverified
  address: Address verification in progress
X-Reject-Warning: 504 <VECTRA>: Helo command rejected: need fully-qualified hostname
X-Reject-Warning: 450 <UEZZOMWCieg.com.br>: Sender address rejected: unverified
  address: Address verification in progress
X-Reject-Warning: 504 <VECTRA>: Helo command rejected: need fully-qualified hostname
X-Reject-Warning: 450 <UEZZOMWCieg.com.br>: Sender address rejected: unverified
  address: Address verification in progress
X-Reject-Warning: 504 <VECTRA>: Helo command rejected: need fully-qualified hostname
X-Reject-Warning: 550 <UEZZOMWCieg.com.br>: Sender address rejected: undeliverable
  address: host 200.226.132.20[200.226.132.20] said: 554 Usu?rio Inv?lido ou
  Inexistente. Sorry, no mailbox here by that name. (#5.1.1) <UEZZOMWCieg.com.br>
  (in reply to RCPT TO command)
X-Reject-Warning: 504 <VECTRA>: Helo command rejected: need fully-qualified hostname
X-Reject-Warning: 550 <UEZZOMWCieg.com.br>: Sender address rejected: undeliverable
  address: host 200.226.132.20[200.226.132.20] said: 554 Usu?rio Inv?lido ou
  Inexistente. Sorry, no mailbox here by that name. (#5.1.1) <UEZZOMWCieg.com.br>
  (in reply to RCPT TO command)
X-Reject-Warning: 504 <VECTRA>: Helo command rejected: need fully-qualified hostname
X-Reject-Warning: 550 <UEZZOMWCieg.com.br>: Sender address rejected: undeliverable
  address: host 200.226.132.20[200.226.132.20] said: 554 Usu?rio Inv?lido ou
  Inexistente. Sorry, no mailbox here by that name. (#5.1.1) <UEZZOMWCieg.com.br>
  (in reply to RCPT TO command)
X-Reject-Warning: 504 <VECTRA>: Helo command rejected: need fully-qualified hostname
X-Reject-Warning: 550 <UEZZOMWCieg.com.br>: Sender address rejected: undeliverable
  address: host 200.226.132.20[200.226.132.20] said: 554 Usu?rio Inv?lido ou
  Inexistente. Sorry, no mailbox here by that name. (#5.1.1) <UEZZOMWCieg.com.br>
  (in reply to RCPT TO command)

I have this
smtpd_recipient_restrictions = reject_invalid_hostname reject_non_fqdn_sender
 reject_non_fqdn_recipient reject_unknown_sender_domain
 check_sender_mx_access cidr:/usr/local/etc/postfix/mx_access.cidr
 reject_unknown_recipient_domain
 warn_if_reject reject_non_fqdn_hostname
 check_helo_access regexp:/usr/local/etc/postfix/helo-me
 warn_if_reject reject_unverified_sender
 reject_unverified_recipient permit_mynetworks reject_unauth_destination

And would expect at most 2 X-Reject-Warning headers, one from each
warn_if_reject -- what am I missing?

p.

--
Beware of he who would deny you access to information, for in his
heart he dreams himself your master. -- Commissioner Pravin Lal
http://nerdquiz.sgh.waw.pl/ -- polska wersja quizu dla nerdów ;)