You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by David Mehler <da...@gmail.com> on 2017/05/06 21:41:07 UTC
txrep and spam lists
Hello,
I'm switching my Spamassassin (v3.41) from AWL to Txrep and with it
Mysql database access. I've run sa-learn --ham on many emails that I
cloned from my gmail account.
I then realized that a cron job/Dovecot autoexpunge killed all my spam
messages, all 1500 of them.
Does anyone have or know of a public spam list?
Thanks.
Dave.
Re: txrep and spam lists
Posted by RW <rw...@googlemail.com>.
On Sun, 07 May 2017 15:05:21 +0100
Martin Gregorie wrote:
> On Sun, 2017-05-07 at 13:27 +0100, RW wrote:
> > On Sun, 07 May 2017 10:33:56 +0100
> > Martin Gregorie wrote:
> > The only other thing you need is a way remove SA headers from your
> > > spam collection. A bash script using awk to do the heavy lifting
> > > works for me:
> > >
> >
> > That shouldn't be necessary. AFAIK as all the X-Spam-* headers are
> > stripped before Bayes can see them. The common SA headers are also
> > in the default "bayes_ignore_header".
> >
> Fair enough for playing with Bayes, but leaving them in place is a
> just nuisance when you're developing private rules because the old
> headers tend to obscure what you're looking for.
Actually I find it practically essential to leave them in. For example
if you want to see all spams that hit both pyzor and razor and scored
under 12, how else are you going to do it?
> If you push a message through spamc with X-Spam* headers already in
> it, the original headers are still there in the output, though now
> preceded by the ones added by the test.
I've never seen that happen because, as I said, SA strips them. It may
happen if some third-party software writes the headers.
Re: txrep and spam lists
Posted by Martin Gregorie <ma...@gregorie.org>.
On Sun, 2017-05-07 at 13:27 +0100, RW wrote:
> On Sun, 07 May 2017 10:33:56 +0100
> Martin Gregorie wrote:
> The only other thing you need is a way remove SA headers from your
> > spam collection. A bash script using awk to do the heavy lifting
> > works for me:
> >
>
> That shouldn't be necessary. AFAIK as all the X-Spam-* headers are
> stripped before Bayes can see them. The common SA headers are also in
> the default "bayes_ignore_header".
>
Fair enough for playing with Bayes, but leaving them in place is a just
nuisance when you're developing private rules because the old headers
tend to obscure what you're looking for.
If you push a message through spamc with X-Spam* headers already in
it, the original headers are still there in the output, though now
preceded by the ones added by the test. This can be a real pain if
you're running a set of messages through spamc and using grep or awk to
remove everything except the initial spam status line plus any lines
containing the name of the rule being developed.
Martin
Re: txrep and spam lists
Posted by RW <rw...@googlemail.com>.
On Sun, 07 May 2017 10:33:56 +0100
Martin Gregorie wrote:
> On Sun, 2017-05-07 at 00:37 +0200, Benny Pedersen wrote:
> > why not back that spam up to gmail ? :=)
> >
> Even easier: save them to a directory as text files and make sure
> that's included in your daily/weekly backups.
>
> The only other thing you need is a way remove SA headers from your
> spam collection. A bash script using awk to do the heavy lifting
> works for me:
>
That shouldn't be necessary. AFAIK as all the X-Spam-* headers are
stripped before Bayes can see them. The common SA headers are also in
the default "bayes_ignore_header".
Re: txrep and spam lists
Posted by Martin Gregorie <ma...@gregorie.org>.
On Sun, 2017-05-07 at 00:37 +0200, Benny Pedersen wrote:
> why not back that spam up to gmail ? :=)
>
Even easier: save them to a directory as text files and make sure
that's included in your daily/weekly backups.
The only other thing you need is a way remove SA headers from your spam
collection. A bash script using awk to do the heavy lifting works for
me:
=========================== cleaner ===========================
#!/bin/bash
if [ "$1" == '-?' ]
then
echo "Syntax: cleaner [file...]"
echo "Function: Remove SA headers from example message(s)"
echo " If a list of files is present they are processed."
echo " If no list is supplied, all files in data/* are"
echo " processed."
echo "Options: none"
exit
fi
function clean()
{
echo "Cleaning $1"
gawk '
BEGIN { act = "copy";
body = "no";
}
/^[A-Za-z]/ { act = "copy" }
/^X-Spam/ { act = "skip" }
/^$/ { body = "yes"; }
{
if (act == "copy" || body == "yes")
{ print }
}
' <$1 >temp.txt
mv temp.txt $1
}
if [ $# -gt 0 ]
then
for f in $*
do
clean $f
done
else
for f in data/*.txt
do
clean $f
done
fi
=========================== cleaner ===========================
Martin
Re: txrep and spam lists
Posted by Benny Pedersen <me...@junc.eu>.
David Mehler skrev den 2017-05-06 23:41:
> I'm switching my Spamassassin (v3.41) from AWL to Txrep and with it
> Mysql database access. I've run sa-learn --ham on many emails that I
> cloned from my gmail account.
+1
> I then realized that a cron job/Dovecot autoexpunge killed all my spam
> messages, all 1500 of them.
why not back that spam up to gmail ? :=)
> Does anyone have or know of a public spam list?
sorry i did the same expire as you did
if you collect more spam then its not a problem imho, basicly you would
not like to have others say this is spam or ham ?
its upto you every time, else i have missed something