[milters] Archive

Lists Index Date Thread Search

Article: 1755
From: Greg Matthews
Date: 2007-10-02 07:20:26 -0400
Subject: Re: milter-ahead questions

Removal...........: milters-request@milter.info?subject=remove
More information..: http://www.milter.info/#Support
--------------------------------------------------------

Hi Anthony...

Anthony Howe wrote:
> There is a cache entry that records the success or failure of a 
> recipient address call-ahead result (temp. fails are not recorded). A 
> separate cache entry is recorded for for the SMTP client IP.
> 
> However, looking at the code logic, the client IP entry is generated for 
> every success and failure and updated for repeat failures. The problem 
> though in counting successes for the client-IP would drive the counter 
> high such that a single failure could then trigger max-failures. If the 
> counter needs to be reset after each success or only count failures; the 
> latter is probably more correct.
> 
> Try changing milter-ahead.c line 1068 from:
> 
> 	if (rc != SMFIS_TEMPFAIL) {
> 
> to
> 
> 	if (rc == SMFIS_REJECT) {
> 
> This should only create a client IP record if the original call-ahead 
> returned a 5xy result.

this should help, certainly. However, the problem I was seeing was that 
legitimate servers particularly those sending to large groups or lists 
would get caught by the max-failures because they tend to have a number 
of lapsed mailboxes as part of their lists. This is more legitimate than 
address harvesting and must be tolerated. I'm not sure of the best way 
to address this, the possibilities I thought of were:

1. set max-failures arbitrarily high (say 50) and hope this is high enough.
or
2. make the rejection "soft" (ie 4xx rather than 5xx)
or
3. reset counter after each success, this would only count consecutive 
failures.

it might help to have a separate cache ttl for max failures?

What do you think is the appropriate solution to this problem? Any of 
the above or something different?

I'd like to use max-failures but I cant because of the above problem.

>> 2. is the cache refreshed with each hit or only after the original cache 
>> entry has expired?
> 
> An cache entry is touched time it is updated with each hit, prolonging 
> the life of the record. This is the correct thing to do for recipient 
> records, but debatable for client IP count-failure records.

ah ok. I'm not sure of the most suitable behaviour in this case either.

GREG

> 


-- 
Greg Matthews           01491 692445
Head of UNIX/Linux, iTSS Wallingford

-- 
This message (and any attachments) is for the recipient only. NERC
is subject to the Freedom of Information Act 2000 and the contents
of this email and any reply you make may be disclosed by NERC unless
it is exempt from release under the Act. Any material supplied to
NERC may be stored in an electronic records management system.


Lists Index Date Thread Search