On Sat, May 16, 2009 at 01:36, Mark <ad...@asarian-host.net> wrote: > -----Original Message----- > From: Mike Cardwell [mailto:spamassassin-us...@lists.grepular.com] > Sent: vrijdag 15 mei 2009 11:44 > To: Spamassassin Mailing List > Subject: An SMTP transaction, SpamAssassin interface > >> I know this would be a massive job, would be resource hungry, and >> would also require the co-operation of mta developers to update their >> mail servers with this interface so I'm not expecting it to happen. > > It's not that bleak, really. No changes would have to be made to ANY > up-to-date MTA: a simple milter could gather all information you want, and > write it to, say, a BerkeleyDB database. SA could then simply pick up the > info from the database. In fact, I do something similar on my own server. > I have a milter (socketmap, actually) which gathers pertinent info and > stores the hash of data, via BerkeleyDB, per connection-id. In a > custom-rolled SA plugin, I then just retrieve the array of info for the > current message, and apply scores accordingly. Of course, I'm not doing > the same things you want, but the implementation idea is fairly simple, > really.
there's a much simpler way -- just record the info in synthetic headers, either in the Received hdr the MTA generates, or it additional X- headers alongside, and place those headers in the message that SA processes. SA rules can then read those hdrs and act on them. no additional database required. (I've used this approach in several systems btw. works great) --j.