[Mimedefang] Caching the results of a SpamAssassin scan

David F. Skoll dfs at roaringpenguin.com
Thu Apr 3 10:49:01 EST 2003


On Thu, 3 Apr 2003, Michael Sims wrote:

> Did you have to modify SpamAssassin itself to acheive this, or does
> it already support some sort of caching mechanism?

No; we do an end-run around SpamAssassin, kind of like this pseudocode:

hash = compute_hash(msg);
score = find_cached_score(hash);
if (!defined(score)) {
   score = run_spam_assassin(msg);
   save_cached_score(hash, score);
}

The "find_cached_score" and "save_cached_score" routines have nothing to
do with SpamAssassin (we use PostgreSQL to hold all this info.)

Regards,

David.



More information about the MIMEDefang mailing list