From: Svend Tollak Munkejord <stm@bacchus.pvv.org>
Subject: Re: Can I split messages based on their size?
Date: Wed, 15 Oct 2003 11:56:35 +0200 [thread overview]
Message-ID: <hdd8ynmvn70.fsf@bacchus.pvv.ntnu.no> (raw)
In-Reply-To: <hddoewi6g50.fsf@bacchus.pvv.ntnu.no>
I wrote:
> On 2003-10-12, Jesper Harder <harder@myrealbox.com> wrote:
>
>> Svend Tollak Munkejord <stm@bacchus.pvv.org> writes:
>>
>>> Using nnmail-split-fancy, can I somehow split messages based on
>>> their size? My idea is that if they are sent to my "suspicious"
>>> e-mail address, and if they are larger than, say, 100 kb, then they
>>> are certainly spam.
>>
>> You can define your own function:
>>
>> (defun my-> (size group)
>> (when (> (buffer-size) size) group))
>
> Thanks -- this was elegant. However, it does not seem to take attachments
> into account, and those were the ones I was particularly aiming for. Do I
> need some further tricks?
OK. I only tried "B t" (trace respool), and not actually to respool ("B
r"). Respooling worked, and the complete message size seemed to be
accounted for. With the following extension, "B t" worked as well (Gnus
5.10.2).
(defun my-> (size group)
"Return GROUP if message size is larger than SIZE."
(save-excursion; necessary?
(let ((buf (or (get-buffer nnmail-article-buffer); (" *nnmail incoming*") for email
(get-buffer " *nnfolder move*"); for respool
(get-buffer gnus-original-article-buffer)))); (" *Original Article*") for trace (B t),
(if (not buf)
(progn (message "Oops, cannot find message buffer") nil)
(set-buffer buf)
(when (> (buffer-size) size) group)))))
Is it a semi-bug that I had to set the buffer this way?
Regards,
--
Svend Tollak Munkejord
next parent reply other threads:[~2003-10-15 9:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <hddd6d5tugn.fsf@bacchus.pvv.ntnu.no>
[not found] ` <m37k3ai5og.fsf@defun.localdomain>
[not found] ` <hddoewi6g50.fsf@bacchus.pvv.ntnu.no>
2003-10-15 9:56 ` Svend Tollak Munkejord [this message]
2003-10-15 15:32 ` Jesper Harder
[not found] ` <df73ae29.0310142359.2dabb32b@posting.google.com>
2003-10-16 15:46 ` Jesper Harder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=hdd8ynmvn70.fsf@bacchus.pvv.ntnu.no \
--to=stm@bacchus.pvv.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).