[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smtp-policy q-s and wishes



On Tue, Feb 13, 2001 at 12:51:40PM +0200, Sergei Fomin wrote:
> Hi all (especially Matti)!
> 
> 	I was never looked in spam-blocking filters before this time,
> but last week boss ask me to setup filters for his incoming mail and
> customers who will ask for it. Unfortunately i've problem in
> filter setup for single user.
> 
> 	I've following smtp-policy.src:
> 
> .                       relaycustomer - relaytarget - senderokwithdns +
> [0.0.0.0]/0             relaycustomer - relaytarget - senderokwithdns + = _rbl0
> _rbl0           rcpt-dns-rbl    spamsources.orbs.org:inputs.orbs.org
> _rbl1           test-rcpt-dns-rbl +
> boss@mydomain.net	relaytarget + = _rbl1
> 
> ( btw, including "boss@mydomain.net test-rcpt-dns-rbl + " in
> smtp-policy.mx as recomended in manual did't working because of single %s 
> "{printf "%s = _relaytarget\n",$1;}" in policy-builder)

  I have changed a while back the policy-builder AWKs to print there  $0
  (the entire line) just for this very reason.

> But in RCPT TO: phase rbl test did't invoked:
> 
> 000- Key: 19/USER/'boss@mydomain.net'
> 000-   Attribute: 4/relaytarget/'+'
> 000-     accepted!
> 000- Alias-recursion: 4
> 000- Key: 8/TAG/'_rbl1'
> 000-   Attribute: 4/test-rcpt-dns-rbl/'+'
> 000-     not interested, skipped...
> 000- Results: rejectnet . freezenet . rejectsource . freezesource . relaycustomer . relaycustnet . relaytarget + acceptifmx . acceptifdns . senderokwithdns . acceptbutfreeze . sendernorelay . test-dns-rbl . message . localdomain . maxinsize . maxoutsize . fulltrustnet . trustrecipients . trust-whoson . rcpt-dns-rbl . test-rcpt-dns-rbl .
> 
> Is there way to resolve this task ?

  The test is invoked at connection time, that 'test-rcpt-dns-rbl' is
  just to read the test RESULT.

  Hmm..  Oh, it really doesn't look for that entry in the "full user" case.
  Source patch needed for it at smtpserver/policytest.c at around line 1396,
  and a bit further.

> Second question is it possible to implement connection source test
> at rcpt to: phase only ? It's wasting a time and bandwidth for quering RBL
> against every incoming smtp connection while filtering required for
> few customers only.

  Yes, more code changes needed, but it is possible.

  The more I think of it, I think it really begins to need a script facility
  for this use, not only simple attributes + hardcoded logic about the order
  of things.

  ... but the intention of things has been that this current solution is
  less heavy than running ZMailer router synchronously at each reception.
  Not having to run the ROUTER process syncronously for each received message
  is quite important.

  Delaying the lookup means also that the IP address of contactee must be
  stored into policy-test internal state data structure.  Then we can delay
  the "RBL" lookups until the first analysis of said data.

> --
> Sergei Fomin, Networks dept. head, SF721-RIPE
> Lincom ISP. http://www.lin.com.ua

-- 
/Matti Aarnio	<mea@nic.funet.fi>