[Mimedefang] Greylisting++

David F. Skoll dfs at roaringpenguin.com
Tue Jul 10 14:49:15 EDT 2007


Cormack, Ken wrote:

> I was already doing some filtering on subject-lines (see the archives), and
> figured I'd break out my subject-line "normalizing" into a sub of it's own,
> so that it now can be used to groom a raw $Subject into something I can
> safely store in my greylist database.

Well, we don't actually key directly off the 4-tuple.  We hash it
using appropriate delimiters between the bits.  So we end up with
something like:

sha1_hex($sender . '<@>' . $recipient . '<@>' . $ip_address . '<@>' . $subject)

The advantages of keying off a hash are that you don't need to change
your database schema if you throw something else into the mix and you
don't need to worry about weird characters in the subject.

(OK, this isn't *exactly* how CanIt does it -- there are a few refinements,
but I'll save those for our customers. :-))

Regards,

David.



More information about the MIMEDefang mailing list