[milters] Archive

Lists Index Date Thread Search

Article: 1754
From: Anthony Howe
Date: 2007-10-02 03:25:26 -0400
Subject: Re: milter-ahead questions

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

Greg Matthews wrote:
> Back in August I asked a couple of questions about milter-ahead. I've 
> attached the mail below. In summary:
> 1. is it possible to defer rather than reject? and would this help me 
> use max-failures?

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) {


	if (rc == SMFIS_REJECT) {

This should only create a client IP record if the original call-ahead 
returned a 5xy result.

> 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.

Anthony C Howe          Skype: SirWumpus                    SnertSoft
+33 6 11 89 73 78         ICQ: 7116561          BarricadeMX & Milters

Lists Index Date Thread Search