Spamassassin 2.50 & SQL logging

Julian Field mailscanner at
Fri Feb 21 14:33:44 GMT 2003

At 13:06 21/02/2003, you wrote:
>Hi all,
>I'm evaluating MailScanner + SA 2.50/DCC/Razor2 on RedHat 7.3 for use at my
>company in place of MIMEsweeper that we use at the moment and I'm wondering
>how to use the new Bayesian features effectively.
>At the moment I'm thinking that I configure SpamAssassin to use auto
>learning on all messages that it processes (auto_learn 1 in

According to the docs (man Mail::SpamAssassin::Conf) that should be on by
default anyway.
        auto_learn ( 0 | 1 )     (default: 1)
            Whether SpamAssassin should automatically feed high-scoring mails
            (or low-scoring mails, for non-spam) into its learning systems.

>Also - I was wondering if anyone had tried getting MailScanner to log to a
>MySQL database?? - I was looking at the and was thinking
>that I could create a custom function that would connect to the database and
>do something like 'INSERT INTO maillog VALUES
>('$message->{id}','$message->{size}','$message->{from}' etc..)' - or is this
>just a really bad idea??  The existing software we use does this into an
>Access database but we don't use it because it causes too much overhead, but
>I thought Perl's DBI/DBD and MySQL would probably be much more efficient
>than Access/ODBC!

You are still talking a database "insert" for every batch of messages.
That's going to carry a fair sized overhead. How about writing them to a
file and then periodically pushing the file data into a database?
Julian Field
MailScanner thanks transtec Computers for their support

More information about the MailScanner mailing list