Guy Waugh wrote: > Hi folks, > > I'm pretty new to SpamAssassin. I have two MXes running sendmail > 8.13.6, smtp-vilter 1.2.4, SA 3.1.1 and clamav 0.88. Sendmail uses > smtp-vilter as a milter, and smtp-vilter calls clamd and spamd to scan > incoming messages at the point of delivery. > > For most messages, it works fine - clamd does the virus scanning in a > flash, and SA takes between 0.1 seconds and 3 seconds to do its job. > > However, for some emails, the SA scan goes over the 20 second timeout > that we currently have defined (in /etc/smtp-vilter/spamd.conf). When > this happens, sendmail tells the sender "451 4.3.2 - Please try again > later". > 20 seconds is *WAY* to short.. By default, SA will attempt to oportunistically perform bayes database maintenance (expiring old tokens, merging journals, etc).. this can take several minutes at a time, but doesn't happen often (every 12 hrs at most, I think...) > So, I have a few questions: > > * Anyone know why there would be such a gap between SA scanning for > spam (up to 15:36:57 in the example above) and learning spam/ham (from > 15:37:21)? Waiting for a write lock.. turning on bayes_learn_to_journal helps this much, but does make the maintenance runs slightly longer. It also causes "lag" in that your learning is not made live until a journal sync occurs.
> > * The Bayes database is in Berkeley DB format... would having it in an > RDBMS help, perhaps? Using SQL is the perfered method, and generally speaking much faster. SDBM is another option, but it's not 100% bug free when I last tested the conversion tools. > > * I only turned on SA debugging for bayes and learn to get the above > log entries. Are bayes, learn and dns the only debugging flags > available? Maybe next time I should turn on dns debugging as well? I know of at least one other... "all" message, config, check, plugin and rules also appear to be other working options, but I've not tested them. There's probably more.. grep the code for "dbg".. the text preceding the colon is the debug category needed to log it (unless all is enabled) i.e: dbg("plugin: loading $package from $path"); requires all or plugin. > > * One thing I may want to do is configure the email server to only > scan for spam for messages coming from the Internet. smtp-vilter does > not seem to have this functionality, but it appears a few other milter > packages do (amavisd-new, MIMEDefang?). Any thoughts on changing from > smtp-vilter to one of these other milter packages? Difficulties, traps > etc.? Seems like it should be pretty straightforward... I'm not a milter user, can't comment (I use mailscanner) > > * Any other comments or thoughts? > > Thanks in advance, > Guy. > >