You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Frank Tore Johansen <fr...@osc.no> on 2004/07/28 10:42:04 UTC

Email readers & SA-headers

Is there any email readers that understand the SA-headers?

Functionality that would be nice to have is displaying the SA-hits in a
column beside each mail in the index, and the ability to sort a folder
based on SA-hits.

-Frank.


Re: Email readers & SA-headers

Posted by Jim Maul <jm...@elih.org>.
Quoting Graham Murray <gr...@gmurray.org.uk>:

> Frank Tore Johansen <fr...@osc.no> writes:
>
>> Is there any email readers that understand the SA-headers?
>
> Yes, gnus does. Not only does it understand SA-headers but has an
> interface to mark ham/spam and automatically submit to sa-learn.

So does horde/imp.  Quite nice.

Jim

Re: Email readers & SA-headers

Posted by Graham Murray <gr...@gmurray.org.uk>.
Frank Tore Johansen <fr...@osc.no> writes:

> Is there any email readers that understand the SA-headers?

Yes, gnus does. Not only does it understand SA-headers but has an
interface to mark ham/spam and automatically submit to sa-learn.

Re: Email readers & SA-headers

Posted by Nix <ni...@esperi.org.uk>.
On Wed, 28 Jul 2004, Jon Kvebaek said:
> Quoting Frank Tore Johansen <fr...@osc.no>:
> 
>> Is there any email readers that understand the SA-headers?
>> 
>> Functionality that would be nice to have is displaying the SA-hits in
>> a
>> column beside each mail in the index, and the ability to sort a
>> folder
>> based on SA-hits.
> 
> I have seen Gnus-related spamassassin functions, an example is here:
> http://www.esperi.demon.co.uk/nix/xemacs/personal/dot-gnus-sa.el

Note that the stuff in `nix-pipe-article-somewhere' is inefficient
for SA 3.0, as that can report multiple spams at once.

Sometime soon I'll fix it.

> I haven't tried it myself, but will give it a go when I have some spare
> time.

It works for me, that's all I can say. No sorting based on SA hits,
though, sorry. I can add that: it looks easy to do.

-- 
`The copyright file is for everyone.  That we make it available in
 plain-text, uncompressed form rather than in spinning, throbbing
 OpenGL-rendered 3D text over a thumping dance music soundtrack is a
 feature, not a bug.' --- Branden Robinson


Re: Email readers & SA-headers

Posted by Jon Kvebaek <jk...@klanen.no>.
Quoting Frank Tore Johansen <fr...@osc.no>:

> 
> Is there any email readers that understand the SA-headers?
> 
> Functionality that would be nice to have is displaying the SA-hits in
> a
> column beside each mail in the index, and the ability to sort a
> folder
> based on SA-hits.

I have seen Gnus-related spamassassin functions, an example is here:
http://www.esperi.demon.co.uk/nix/xemacs/personal/dot-gnus-sa.el

I haven't tried it myself, but will give it a go when I have some spare
time.
-- 
Jon Kvebaek <jk...@klanen.no>
Mobil: +47 992 19 829
Unanimiter et constanter Oslo

Re: Email readers & SA-headers

Posted by Nancy McGough <nm...@ii.deflexion.com>.
On 30 Jul 2004 Frank Tore Johansen (frankj@osc.no) wrote:
>
> On Wed, 28 Jul 2004, Ryan Thompson wrote:
>> I made about a dozen "score" rules for X-Spam-Level: for sorting. (e.g.,
>
> I tried to do this, but I can't make it work properly.
> I made 6 rules like, all of type "(*)  Email".  The first rule has:
>
> AllText pattern = X-Spam-Level: ******************************
> Score Value     = 30

I'm not sure why it's not working but I have a suggestion:
Instead of using 'AllText pattern' use 'Add Extra Headers' (by
typing 'X' on the Pine ADD A SCORING RULE screen with your cursor
on the *** line below):

     === PINE SCORED MESSAGE CONDITIONS BEGIN HERE ===

     To pattern        = <No Value Set>
     From pattern      = <No Value Set>
     Sender pattern    = <No Value Set>
     Cc pattern        = <No Value Set>
     News pattern      = <No Value Set>
     Subject pattern   = <No Value Set>
     Recip pattern     = <No Value Set>
     Partic pattern    = <No Value Set>
*** Add Extra Headers
     AllText pattern   = <No Value Set>
     BdyText pattern   = <No Value Set>
     Age interval      = <No Value Set>
     Size interval     = <No Value Set>
     Keyword pattern   = <No Value Set>


This will search only the headers for the X-Spam-Level header and
save both time and processing power. And be more accurate since
it won't match on messages that contain that text in the body.

Also, if it's possible, I recommend upgrading to Pine 4.61 which
has a lot of bug fixes and new features.

Hope this helps,
Nancy
Infinite Ink
www.ii.com


Re: Email readers & SA-headers

Posted by Nancy McGough <nm...@ii.deflexion.com>.
On 29 Jul 2004 I wrote:
>
> Another option with Pine is to put the score into one of the
> headers that Pine can sort on.  [...]
>
> Ryan uses 'scorE' but Pine needs to do work to calculate the Pine
> scorE so I use the Cc header. And as Ryan suggested I include CC
> in my Pine index-format so it appears on the index screen.


Someone emailed me privately and asked me about this. I'm
replying here because it might be interesting to others and maybe
someone will have a better idea (because I know this is quite
hacky). Here's an excerpt of my procmailrc:


  # The SpamAssassin star character defaults to '*' but I use 'R' (for 'Red')
  :0
  * ^X-Spam-Level: RR
   {
    :0 fhw
    | formail -R Cc: Newsgroups: \
              -R X-Spam-Level: Cc:

    :0
    .--red/
   }


What this does is for any message that has a score of 2 or more,
it renames the Cc: header to Newsgroups: and then renames the
X-Spam-Level: header to Cc:. Then I have the Pine index-format
display both the Cc and the Newsgroups header and I have my
'--red' mailbox default to being sorted (ordered) by the Cc
header. Non-spam bubbles to the top of my '--red' box and if I
want to reply, I type 'R' (for Reply) and pine asks me if I want
to post my reply to the Newsgroup (thus warning me that there
were originally Cc'd addresses).

So far this is working fine for me and it's nice that I no longer
have to remember to edit the Subject when I reply to a non-spam
message that has a spam subject_tag (which is the way I used to
do things). I've written more about what I do with Procmail and
SpamAssassin in

  Reverse Spam Filtering: Winning Without Fighting
  <http://www.ii.com/internet/messaging/spam/>

and

  Using SpamAssassin section of the Procmail Quick Start
  <http://www.ii.com/internet/robots/procmail/qs/#SA>

I haven't yet written about this Cc trick, but now I can link to
this message!


> We really need a standard header for the score so that mail
> clients can be updated to support displaying and sorting on this
> header. I think that this is one of the goals of the
>
> Anti-Spam Research Group (ASRG) of the Internet Research Task Force (IRTF)
>
> expecially the
>
> Filtering Standards Subgroup
>
> which you can learn about here:
>
> <http://asrg.sp.am/subgroups/filtering.shtml>

I quoted the above because maybe if I say it enough it will
happen :-)

Nancy
Infinite Ink
www.ii.com


Re: Email readers & SA-headers

Posted by Nancy McGough <nm...@ii.deflexion.com>.
On 28 Jul 2004 Ryan Thompson (spamassassin@sasknow.com) wrote:
> Frank Tore Johansen wrote to spamassassin-users@incubator.apache.org:
>
>> Is there any email readers that understand the SA-headers?
>
> PINE may not be what you had in mind, but it does have some pretty
> snazzy filtering options, and comes in flavours for many operating
> systems, including UNIX and Windows.
>
>> Functionality that would be nice to have is displaying the SA-hits in a
>> column beside each mail in the index, and the ability to sort a folder
>> based on SA-hits.
>
> I made about a dozen "score" rules for X-Spam-Level: for sorting. (e.g.,
> 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 40, 50). Then, simply sort by score,


Another option with Pine is to put the score into one of the
headers that Pine can sort on. Here are the possibilities:

  sort-key                         =
             Set    Sort Options
             ---  ----------------------
             ( )  Subject
             ( )  Arrival
             ( )  From
             ( )  To
             ( )  Cc
             ( )  Date
             ( )  siZe
             ( )  OrderedSubj
             ( )  scorE
             ( )  tHread


Ryan uses 'scorE' but Pine needs to do work to calculate the Pine
scorE so I use the Cc header. And as Ryan suggested I include CC
in my Pine index-format so it appears on the index screen.

We really need a standard header for the score so that mail
clients can be updated to support displaying and sorting on this
header. I think that this is one of the goals of the

  Anti-Spam Research Group (ASRG) of the Internet Research Task Force (IRTF)

expecially the

  Filtering Standards Subgroup

which you can learn about here:

  <http://asrg.sp.am/subgroups/filtering.shtml>


For now, I'm doing a lot of bogosities with procmail!

Nancy
Infinite Ink
www.ii.com


Re: Email readers & SA-headers

Posted by Frank Tore Johansen <fr...@osc.no>.
> On Wed, 28 Jul 2004, Ryan Thompson wrote:
>> I made about a dozen "score" rules for X-Spam-Level: for sorting. (e.g.,
>> 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 40, 50). Then, simply sort by score,
>
> I tried to do this, but I can't make it work properly.

Ah, now it works fine.  The trick was upgrading to the latest version
of pine, and then realizing that it didn't stop at first matching
rule, but ran through all regardless (adding score as it goes).

Thanks,
   Frank.

Re: Email readers & SA-headers

Posted by Frank Tore Johansen <fr...@osc.no>.
On Wed, 28 Jul 2004, Ryan Thompson wrote:
> I made about a dozen "score" rules for X-Spam-Level: for sorting. (e.g.,
> 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 40, 50). Then, simply sort by score,
> or create an "Other" rule to automatically apply the sort to your
> desired folder(s). I do this on a local IMAP server with mailboxes
> containing up to about 5,000 messages, and the sort only takes a few
> seconds on such large folders.

I tried to do this, but I can't make it work properly.
I made 6 rules like, all of type "(*)  Email".  The first rule has:

AllText pattern = X-Spam-Level: ******************************
Score Value     = 30

And so on, until the last rule which has 1 * and a score of 1.
I named my rules SA30, SA20, SA10, SA5, SA3, SA1

I also added score to my index, but the index of my spamfolder
ended up looking like this:

  N 104   0 Jul 29 ¸¶ÄÉÅÍ              (6K) subj
  N 105  69 Jul 29 Suarez             (18K) subj
  N 106   0 Jul 30 hermila nelson      (6K) subj
  N 107  39 Jul 30 Freda Fair          (5K) subj

(destroyed the subjs to avoid ending up in your spamfilter)
Index is set to:
STATUS MSGNO SCORE(3) DATE FROMORTO(33%) SIZENARROW SUBJECT(67%)

Those with 0 actually have 10-20 *'s, and I can't imagine how those
scores of 69 and 39 got there (not even if you sum up my rules
would you get anything ending with 9).

Btw, for my non-spam folders, this seems to work (they basically show a
score of 0 or 1 in the index (I have threshold of 3), which corresponds
perfectly).  Only my spamfolder (where this is of most interest, to catch
false positives)  doesn't work.

-Frank.




Re: Email readers & SA-headers

Posted by Ryan Thompson <sp...@sasknow.com>.
Frank Tore Johansen wrote to spamassassin-users@incubator.apache.org:

> Is there any email readers that understand the SA-headers?

PINE may not be what you had in mind, but it does have some pretty
snazzy filtering options, and comes in flavours for many operating
systems, including UNIX and Windows.

> Functionality that would be nice to have is displaying the SA-hits in a
> column beside each mail in the index, and the ability to sort a folder
> based on SA-hits.

I made about a dozen "score" rules for X-Spam-Level: for sorting. (e.g.,
5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 40, 50). Then, simply sort by score,
or create an "Other" rule to automatically apply the sort to your
desired folder(s). I do this on a local IMAP server with mailboxes
containing up to about 5,000 messages, and the sort only takes a few
seconds on such large folders.

You can then add the score to the headers by putting SCORE(3) in your
index-format. Depending on how many intervals you chose (above) for your
score rules, you should be able to get more than enough granularity for
your purposes.

- Ryan

-- 
   Ryan Thompson <ry...@sasknow.com>

   SaskNow Technologies - http://www.sasknow.com
   901-1st Avenue North - Saskatoon, SK - S7K 1Y4

         Tel: 306-664-3600   Fax: 306-244-7037   Saskatoon
   Toll-Free: 877-727-5669     (877-SASKNOW)     North America