* Re: splitting on body
[not found] <egada3qw1n.fsf@sefirot.ii.uib.no>
@ 2003-08-21 21:53 ` Thomas Mittelstaedt
[not found] ` <egy8xmpa40.fsf@sefirot.ii.uib.no>
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Mittelstaedt @ 2003-08-21 21:53 UTC (permalink / raw)
"Ketil Malde" <ketil+@ii.uib.no> writes:
> Hi,
>
> I'm struggling to split messages based on body, using the example from
> the Info manual:
>
> (defun split-on-body ()
> (save-excursion
> (set-buffer " *nnmail incoming*")
> (goto-char (point-min))
> (when (re-search-forward "Some.*string" nil t)
> "string.group")))
>
Why don't you use procmail to do split-on-body stuff?
Insert some header in the procmail process and then
use standard gnus splitting based on these special additional headers
or move that mail to a special file.
I, for instance, use a special header called X-SpamProbe to
filter for spam.
Here is the relevant part of my .procmailrc:
:0 wf
SCORE=| spamprobe -8 receive
:0 wf
| formail -I "X-SpamProbe: $SCORE"
:0 a
*^X-SpamProbe: SPAM
spamprobe
Did this help?
--
Thomas Mittelstaedt
Thomas Mittelstaedt <tmstaedt@t-mittelstaedt.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: splitting on body
[not found] ` <egy8xmpa40.fsf@sefirot.ii.uib.no>
@ 2003-08-22 10:36 ` Ted Zlatanov
0 siblings, 0 replies; 2+ messages in thread
From: Ted Zlatanov @ 2003-08-22 10:36 UTC (permalink / raw)
On 22 Aug 2003, ketil+@ii.uib.no wrote:
> Thomas Mittelstaedt <tmstaedt@t-mittelstaedt.de> writes:
>
>> "Ketil Malde" <ketil+@ii.uib.no> writes:
>
>>> I'm struggling to split messages based on body, using the example
>>> from the Info manual:
>
>>> (defun split-on-body ()
>>> (save-excursion
>>> (set-buffer " *nnmail incoming*")
>>> (goto-char (point-min))
>>> (when (re-search-forward "Some.*string" nil t)
>>> "string.group")))
>
>> Why don't you use procmail to do split-on-body stuff?
>
> Because I'm retrieving mail from an IMAP server? And of course,
> because I want to retain my belief that I'm using the most capable
> MUA known to mankind :-)
>
> I suppose I could replace the call to SET-BUFFER with something that
> first checks for the existence of the buffer? In what buffer can I
> find the current message when respooling?
I am pretty sure the current buffer contains the message while
splitting, you don't need to change buffers. Look at the spam-split
function in spam.el, it does body-based analysis for statistical spam
filters. Remember you have to set the nnimap-split-download-body
variable if you want to see the whole body with nnimap splitting.
Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-08-22 10:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <egada3qw1n.fsf@sefirot.ii.uib.no>
2003-08-21 21:53 ` splitting on body Thomas Mittelstaedt
[not found] ` <egy8xmpa40.fsf@sefirot.ii.uib.no>
2003-08-22 10:36 ` Ted Zlatanov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).