Hi list,
I'm running 2.4.1 (upgraded from 2.0) and happy with the
results so far. I
have a couple of separate but related questions. I've tried
reading the
docs, Google, and even TFSource, but I'm not getting some
of the more
esoteric bits :-(.
First, I can see that my Bayes db is being populated, but I
can't tell
whether it's autolearning according to my settings. I have
the following
in /etc/mail/spamassassin/local.cf:
bayes_auto_learn 1
bayes_auto_learn_threshold_nonspam -4.0
bayes_auto_learn_threshold_spam 5.0
and the bayes database is being populated according to
sa-learn:
$ sa-learn --dump magic
0.000 0 3 0 non-token data:
bayes db version
0.000 0 41439 0 non-token data:
nspam
0.000 0 18767 0 non-token data: nham
0.000 0 294746 0 non-token data:
ntokens
0.000 0 1150717961 0 non-token data:
oldest atime
0.000 0 1150781394 0 non-token data:
newest atime
0.000 0 1150781397 0 non-token data: last
journal sync atime
0.000 0 1150761258 0 non-token data: last
expiry atime
0.000 0 43200 0 non-token data: last
expire atime delta
0.000 0 422598 0 non-token data: last
expire reduction count
How can I get the autolearn status to be added to the log,
or at least the
headers? I'm using the long $log_templ from
amavisd.conf-sample, which is
a bit line-noise-y. The amavisd source does look like it
keeps track of
autolearn status.
Second, when I try and dump tokens from sa-learn, I don't
seem to get the
actual tokens any more, just something that looks like a hex
signature.
How can I tell what my actual tokens are in the db?
Last, is it possible to include the virus name in the
quarantine filename
when quarantining to local disk? Or is that something I'm
better off using
SQL for? And also, how do I use amavisd-release when the
quarantine
directory is hashed into subdirs? I keep getting errors
whether I use the
complete file name, the file name relative to
$quarantine_base,
I've read README.customise, but sadly am not much the
wiser.
TIA
rob
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|
Rob,
> First, I can see that my Bayes db is being populated,
but I can't tell
> whether it's autolearning according to my settings. I
have the following
> in /etc/mail/spamassassin/local.cf:
>
> bayes_auto_learn 1
> bayes_auto_learn_threshold_nonspam -4.0
> bayes_auto_learn_threshold_spam 5.0
> How can I get the autolearn status to be added to the
log, or at least the
> headers? I'm using the long $log_templ from
amavisd.conf-sample, which is
> a bit line-noise-y. The amavisd source does look like
it keeps track of
> autolearn status.
With 2.4.x you can add autolearn status to the main log
entry
with the use of macro AUTOLEARN, e.g.:
autolearn=[:AUTOLEARN],
like in the following template replacement which can be
placed
in amavisd.conf:
$log_templ = <<'EOD';
[?%#D|#|Passed #
[? [:ccat_maj] THER|CLEA
N|TEMPFAIL VERSIZED|
BAD-HEADER|SPAMMY|SPAM|\
UNCHECKED|BANNED (%F)|INFECTED (%V)]#
#([:ccat_maj],[:ccat_min])#
, [? %p ||%p ][?%a||[?%l||LOCAL ]\[%a\] ][?%e||\[%e\]
]%s -> [%D|,]#
[? %q ||, quarantine: %q]#
[? %Q ||, Queue-ID: %Q]#
[? %m ||, Message-ID: %m]#
[? %r ||, Resent-Message-ID: %r]#
, mail_id: %i#
, Hits: %c#
, size: %z#
#, boost: [:score_boost]#
#, fwd_to: [:remote_mta]#
[~[:remote_mta_smtp_response]|["^$"]||[",
queued_as: "]]\
[remote_mta_smtp_response|[~%x|["queued as
([0-9A-Z]+)$"]|["%1"]|["%0"]]|
/]#
[? %j ||, Subject: "%j\"]#
[? %#T ||, Tests: \[[%T|,]\]]#
[? [:AUTOLEARN] ||, autolearn=[:AUTOLEARN]]#
, %y ms#
]
[?%#O|#|Blocked #
[? [:ccat_maj] THER|CLEA
N|TEMPFAIL VERSIZED|
BAD-HEADER|SPAMMY|SPAM|\
UNCHECKED|BANNED (%F)|INFECTED (%V)]#
#([:ccat_maj],[:ccat_min])#
, [? %p ||%p ][?%a||[?%l||LOCAL ]\[%a\] ][?%e||\[%e\]
]%s -> [%O|,]#
[? %q ||, quarantine: %q]#
[? %Q ||, Queue-ID: %Q]#
[? %m ||, Message-ID: %m]#
[? %r ||, Resent-Message-ID: %r]#
, mail_id: %i#
, Hits: %c#
, size: %z#
#, boost: [:score_boost]#
#, smtp_resp: [:smtp_response]#
[? %j ||, Subject: "%j\"]#
[? %#T ||, Tests: \[[%T|,]\]]#
[? [:AUTOLEARN] ||, autolearn=[:AUTOLEARN]]#
, %y ms#
]
EOD
> Second, when I try and dump tokens from sa-learn, I
don't seem to get the
> actual tokens any more, just something that looks like
a hex signature.
> How can I tell what my actual tokens are in the db?
This is a question for the SA list. Maybe the SA wiki can
tell.
> Last, is it possible to include the virus name in the
quarantine filename
> when quarantining to local disk?
You could modify the following code section in sub
mail_to_local_mailbox:
$suggested_filename =~ s{%(.)}
{ $1 eq 'b' ? $msginfo->body_digest
: $1 eq 'm' ? $msginfo->mail_id
: $1 eq 'i' ?
iso8601_timestamp($msginfo->rx_time,1,'-')
: $1 eq 'n' ? am_id()
: $1 eq '%' ? '%' : '%'.$1 }egs;
and add new stubs to existing %b, %m, %i, and %n.
Be careful not to spill special characters to file names.
Virus names found in the current mail are stored in the
global list virusname (I know, ugly).
> Or is that something I'm better off using SQL for?
It is currently not stored to SQL logging/reporting
database.
The code should go to sub save_info_final.
For statistical purposes virus names and their count is
stored
in a snmp-like database and reported by amavisd-agent.
> And also, how do I use amavisd-release when the
quarantine
> directory is hashed into subdirs?
> I keep getting errors whether I use the
> complete file name, the file name relative to
$quarantine_base,
Should work out of the box. The argument to amavisd-release
should be the exact string that is also logged as a
quarantine location:
(83682-08-2) Blocked SPAM, [...] ... <...> ->
<...>,
quarantine: spam/h/hiXE2fSV2X6y.gz, ...
^^^^^^^^^^^^^^^^^^^^^^
and is also stored in SQL (if enabled), field msgs.quar_loc
.
Mark
All the advantages of Linux Managed Hosting--Without the
Cost and Risk!
Fully trained technicians. The highest number of Red Hat
certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
AMaViS-user mailing list
AMaViS-user lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/
|