Giuseppe,
> Hi, I was trying amavisd-new bundled with spamassassin 3.2.5 and postfix
> and clamav, and I was wondering these things:
>
> 1) spamassassin can compile ruleset into native mode, and sound these
> are used trough the plugin |Mail::SpamAssassin::Plugin::Rule2XSBody|.
> Is amavisd-new using this by default?
It is entirely up to SpamAssassin config files (.cf, .pre) to decide whether
to use it or not. If the plugin is loaded, SpamAssassin will use it, even when
invoked by amavisd.
> And if so, what are the operation to do whether the ruleset are updated
> through the sa-update and the native mode recompiled?
amavisd needs to be restarted ('amavisd reload') for new rules to take effect.
> Which one of these scenarios:
> a) none, they will be used automatically
> b) just restart|reload the spamd daemon
> c) just restart|reload the amavisd-new daemon
> d) just restart|reload both (amavisd-new and spamd and maybe postfix)
The (c). The spamd is not used and is not needed by amavisd.
If you use spamd for some other purpose, it needs to be restarted too,
otherwise it is redundant and should not be running.
> and also is there a way to test the efficiency in using the compiled
> native mode set vs plain one?
One way is to look at the TIMING report by amavisd at log level 2
or above, the 'SA check' entry.
If you run SpamAssassin version 3.3 (from CVS), the TIMING-SA
as logged by amavisd-new-2.6.2 provides a SA timing breakdown,
see for example a typically largest consumer of regexp CPU: tests_pri_0.
A third way, perhaps most accurate, is to load the HitFreqsRuleTiming
plugin (found in: masses/plugins/HitFreqsRuleTiming.pm of the
current SA 3.3), which writes a detailed timing report for each
of the more time consuming rules, and writes it to a file timing.log
in a current directory, so it's best to invoke it from a command line
through a 'spamassassin -t' command on some test message.
> 2) is there a way to get good statistics about percentage of spam and
> ham?
amavisd-agent reports:
InMsgs 39985 1732/h 100.0 % (InMsgs)
InMsgsBounce 154 7/h 0.4 % (InMsgs)
InMsgsBounceKilled 49 2/h 31.8 % (InMsgsBounce)
ContentBadHdrMsgs 11 0/h 0.0 % (InMsgs)
ContentCleanMsgs 1813 79/h 4.5 % (InMsgs)
ContentSpamMsgs 37389 1619/h 93.5 % (InMsgs)
ContentSpammyMsgs 34 1/h 0.1 % (InMsgs)
ContentVirusMsgs 175 8/h 0.4 % (InMsgs)
> I remember some perl script doing that, but when I tried were failing
> because the postfix|mailer log wasn't in the format they was expecting,
> and thus many messages were counted twice or three times
> because they were resent locally across the various ports
> (10025:10026, etc.)
Try logwatch module by Mike Cappella
http://www.ijs.si/software/amavisd/#contrib
It is being updated in sync with versions of amavisd-new.
> 3) when amavisd-new are produced in a standalone file, e.g. setting in
> amavisd.conf the line:
> $LOGFILE = "/var/log/amavis/amavisd.log
> what is the safest way to get log rotations?
Don't let amavisd log directly to a log file. It is inefficient
and log rotation requires restarting of amavisd.
The preferred way is through syslog, it is the most flexible,
is efficient and is trouble-free. All regular syslog maintenance
procedures can be used, e.g. for log rotation, for duplicating
high priority messages to another log file, for providing separate
debug file when needed, ...
> Usually a SIGHUP is sent trough a daemon and the daemon closes
> the old and open a new log file (and logrotate rename the
> old to a new one). Is this approach supported?
HUP used to be supported back in the old days, but no longer is
for the last four years, since amavisd-new-2.0 / 20040701.
Mark
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/