[prev in list] [next in list] [prev in thread] [next in thread]
List: exmh-users
Subject: Re: XYZ: integrating a couple spamassassin actions into the
From: Brent Welch <welch () panasas ! com>
Date: 2002-08-18 21:12:40
[Download RAW message or body]
For what it's worth, here is a version w/out an external script
proc NotSpamMsg {} {
global msg
if {[catch {
exec spamassassin -d < $msg(path) > $msg(path).new
} err]} {
Exmh_Debug "spamassassin error: $err"
if {[file exists $msg(path).new]} {
file delete $msg(path).new
}
}
file rename -force $msg(path).new $msg(path)
busy Scan_FolderForce
}
The Scan_FolderForce seems like a heavy hammer - is the subject line
altered by spamassassin? It would be nice to be able to rescan a single
message and update the display, but I don't see anything handy in
the scan.tcl module for that. If the date/from/subject doesn't change,
then you might not need to rescan the folder.
>>>zamboni@acm.org said:
>
> harlan@feinsteins.net said:
> > o remove the SA markup from a message
>
> I've only done this one, but I imagine the other should be analogous,
just
> using the appropriate commands.
>
> First, in ~/.exmh/exmh-defaults:
>
> ! Add a button to remove Spam markings
> *Mops.more.m.uentrylist: sep unspam
> *Mops.more.m.t_sep: separator
> *Mops.more.m.l_unspam: Remove spam markings
> *Mops.more.m.c_unspam: NotSpamMsg
> *Mops.ugm_current: {Remove spam markings}
>
> Then in ~/.tk/exmh/user.tcl:
>
> proc NotSpamMsg {} {
> global msg
> exec unspamassassin $msg(path)
> busy Scan_FolderForce
> }
>
> (within tclsh, run "auto_mkindex ~/.tk/exmh *.tcl" after adding it to
> update
> the tclIndex file)
>
> Finally, my "unspamassassin" script, which should be in your path
(probably
> could use some extra error checking, but I've never had problems with
this
> version):
>
> -------------------------------------
> #!/bin/sh
> # Remove SpamAssassin markings in place
>
> F=$1
> NF=$1.new
>
> spamassassin -d < $F > $NF || exit 1
> mv $NF $F || exit 1
> -------------------------------------
>
> Hope this helps,
> --Diego
>
>
>
>
> _______________________________________________
> Exmh-users mailing list
> Exmh-users@redhat.com
> https://listman.redhat.com/mailman/listinfo/exmh-users
>
>
--
Brent Welch
Software Architect, Panasas Inc
Pioneering the World's Most Scalable and Agile Storage Network
www.panasas.com
welch@panasas.com
_______________________________________________
Exmh-users mailing list
Exmh-users@redhat.com
https://listman.redhat.com/mailman/listinfo/exmh-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic