* Re: How to combine spam-split with Subject filtering.
[not found] ` <16870.34083.953155.509283@parhasard.net>
@ 2005-01-13 15:04 ` Uwe Brauer
0 siblings, 0 replies; 4+ messages in thread
From: Uwe Brauer @ 2005-01-13 15:04 UTC (permalink / raw)
>>>>> "Aidan" == Aidan Kehoe <kehoea@parhasard.net> writes:
Aidan> Ar an triú lá déag de mà Eanair, scrÃobh Uwe Brauer:
>> So does isearch-forward-regexp behaves differently from
>> putting this string in a function which uses a regexp search???
Aidan> Yes; if you think about it, when you put a string in a
Aidan> function, you need to do string escaping for characters
Aidan> like \ and ", whereas for isearch-forward-regexp thereâs
Aidan> no need for the string escaping, because no string literal
Aidan> is involved.
Aidan> So typing M-C-s \[POSIBLE SPAM\] RET does the same regexp
Aidan> match as does M-: (re-search-forward "\\[POSIBLE SPAM\\]"
Aidan> nil t) RET . Some variation on this latter is better for
Aidan> building regexps youâre going to use in a program, in my
Aidan> experience.
Ok, now doing
M-: (re-search-forward "\\[POSIBLE SPAM\\]" nil t)
in a spam group which contains a message with this subject, finds this
message. However putting
("Subject" "\\[POSIBLE SPAM\\]" "SPAM.POSS")
into nnimap-split-fancy function, does not find this message that is
it is passed to the next entry the spam-split function.
I tried to run edebug on nnimap-split-fancy, but nothing useful came
out.
I am really puzzled, is there somewhere a bug?
Uwe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to combine spam-split with Subject filtering.
[not found] <86zmzeqwcs.fsf@mat.ucm.es>
[not found] ` <m2r7kqggr7.fsf@Stella-Blue.local>
@ 2005-02-08 19:24 ` Ted Zlatanov
2005-02-10 18:16 ` Uwe Brauer
1 sibling, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2005-02-08 19:24 UTC (permalink / raw)
On Wed, 12 Jan 2005, oub@mat.ucm.es wrote:
> Finally I got my BBDB and spam-stat based spam filtering to work for
> my imap server. Now my university provides finally its own spam
> filter, which add to possible spam at the beginning of the Subject the
> phrase:
> [SPAM POSIBLE:]
>
> So I would like to take care of this in the splitting process, and
> split every mail with this subject into a different imap folder so I
> thought the following setting should work:
> (setq
> nnimap-split-rule 'nnimap-split-fancy
> nnimap-split-inbox "INBOX"
> nnimap-split-fancy
> '(|
> ("Subject" "[POSIBLE SPAM]:" "SPAM.POSS")
> (: setq spam-use-BBDB-exclusive nil)
> (: spam-split 'spam-use-BBDB 'spam-use-stat "SPAM.REAL")
> (: setq spam-use-BBDB-exclusive t fake-variable nil)
> (: spam-split 'spam-use-BBDB "SPAM.HAM")
> (: setq spam-use-BBDB-exclusive nil)
> "MAILBOX"))
>
> it did not however. What do I miss.
You could use spam-use-regex-headers. Add an entry to the
spam-regex-headers-spam list to match your subject. The check will be
done against the headers as a whole using re-search-forward so just
escape the brackets appropriately.
It would be nice if in addition to "Subject" we had "Subject+raw" as
an alternative in case the user wants an exact match without regular
expressions (ditto for all the other special headers that can be used,
e.g. "From+raw"). Then "[POSSIBLE SPAM]" would just match, without
the confusion about regex escaping and word boundaries.
Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to combine spam-split with Subject filtering.
2005-02-08 19:24 ` Ted Zlatanov
@ 2005-02-10 18:16 ` Uwe Brauer
2005-02-10 18:15 ` Ted Zlatanov
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Brauer @ 2005-02-10 18:16 UTC (permalink / raw)
>>>>> "Ted" == Ted Zlatanov <tzz@lifelogs.com> writes:
Ted> On Wed, 12 Jan 2005, oub@mat.ucm.es wrote:
[snip]
Ted> You could use spam-use-regex-headers. Add an entry to the
Ted> spam-regex-headers-spam list to match your subject. The
Ted> check will be done against the headers as a whole using
Ted> re-search-forward so just escape the brackets appropriately.
You mean this:
`spam-regex-headers-spam' is a variable declared in Lisp.
-- loaded from "spam"
Value: ("^X-Spam-Flag: YES" "^Subject: POSIBLE SPAM SPAM.POSS")
Ted> It would be nice if in addition to "Subject" we had "Subject+raw" as
Ted> an alternative in case the user wants an exact match without regular
Ted> expressions (ditto for all the other special headers that can be used,
Ted> e.g. "From+raw"). Then "[POSSIBLE SPAM]" would just match, without
Ted> the confusion about regex escaping and word boundaries.
Very true.
Uwe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to combine spam-split with Subject filtering.
2005-02-10 18:16 ` Uwe Brauer
@ 2005-02-10 18:15 ` Ted Zlatanov
0 siblings, 0 replies; 4+ messages in thread
From: Ted Zlatanov @ 2005-02-10 18:15 UTC (permalink / raw)
On Thu, 10 Feb 2005, oub@mat.ucm.es wrote:
> You mean this:
>
> `spam-regex-headers-spam' is a variable declared in Lisp.
> -- loaded from "spam"
>
> Value: ("^X-Spam-Flag: YES" "^Subject: POSIBLE SPAM SPAM.POSS")
I don't think this is what you want. Maybe more like
("^X-Spam-Flag: YES" "^Subject: POSIBLE SPAM")
because SPAM.POSS is the mailbox, right?
To get the mailbox "SPAM.POSS", call
(: spam-split 'spam-use-regex-headers "SPAM.POSS")
in your split-fancy rules.
Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-02-10 18:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <86zmzeqwcs.fsf@mat.ucm.es>
[not found] ` <m2r7kqggr7.fsf@Stella-Blue.local>
[not found] ` <v97jmhhhcg.fsf@marauder.physik.uni-ulm.de>
[not found] ` <864qhlr4n0.fsf@mat.ucm.es>
[not found] ` <866521cyr5.fsf@mat.ucm.es>
[not found] ` <16870.34083.953155.509283@parhasard.net>
2005-01-13 15:04 ` How to combine spam-split with Subject filtering Uwe Brauer
2005-02-08 19:24 ` Ted Zlatanov
2005-02-10 18:16 ` Uwe Brauer
2005-02-10 18:15 ` 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).