[Mimedefang] Off Topic - Mail Message and MySQL

schmaus schmaus at ties2.net
Wed Jun 18 12:36:01 EDT 2003


> The culprit is almost surely SA.  Our tests show the DB
> overhead is minimal compared to SA scanning.  The general
> rule for filter-writing is: Avoid calling SpamAssassin!
> If 10% of your mail comes from a big client or partner,
> and you can skip SA on mail from there, do it.
> For example, in some situations, we avoid calling SA
> altogether (but still do a number of DB queries).  Filter
> times are typically on the order of 20-50ms (AMD Duron,
> 900MHz.)  As soon as SA gets involved, we see filter times
> in the hundreds or even thousands of milliseconds.
> (Of course, if your DB schema is poorly-tuned, it can kill
> you.  If you have to do a sequential scan on a table with
> a million rows, well...)
> Hmm.  I should do some tests with and without the DB for
> real numbers...

Understanding that SA was a processor hog, I implemented the
blacklists and whitelists into my MD filter.  The filter
checks a domain against a table in the MySQL DB. If it is
blacklisted it does what the filter should do (discard,
quarantine, bounce) for that recipient domain and if it is
whitelisted it sends the message on. It never even gets to
SA. I don't use the SA whitelists or blacklists.

Benjamin



More information about the MIMEDefang mailing list