From: Simon Josefsson <jas@extundo.com>
Cc: ding@gnus.org
Subject: Re: nnml splitting on encoded headers
Date: Mon, 03 Jun 2002 19:52:07 +0200 [thread overview]
Message-ID: <iluwutg6yig.fsf@latte.josefsson.org> (raw)
In-Reply-To: <ylznyhnup9.fsf@windlord.stanford.edu> (Russ Allbery's message of "Thu, 30 May 2002 15:21:06 -0700")
Russ Allbery <rra@stanford.edu> writes:
>> and this snippet of code from nnmail-article-group:
>
>> ;; Decode MIME headers and charsets.
>> (let ((mail-parse-charset nnmail-mail-splitting-charset))
>> (mail-decode-encoded-word-region (point-min) (point-max)))
>
> Um, that's an extremely serious bug for me. That means I can't upgrade to
> any newer version of Gnus unless there's some way to turn this off, as far
> and away the most successful spam filtering rules that I have are those
> that catch irregularities of the original, encoded or untagged 8-bit
> Subject line.
>
> Telling Gnus to re-encode before split rules apply won't cut it, I
> believe, unless that re-encoding leaves raw 8-bit that was originally in
> the Subject header alone.
>
> So... how do I turn this feature off? I can understand how this would be
> useful for people who can read other character sets, so I don't want to
> see it removed entirely, but it's a serious problem for me.
This patch should make the behaviour customizable. Does it work? One
could argue about what the default should be, but Lars made it the
default so I won't change it.
Hm. Perhaps the default really should be off since comparing non-ascii
strings in emacs does not work by default. The same character in
Latin-1, Latin-9 or Unicode is not regarded as the same by Emacs, so
comparing decoded values doesn't work. It is also more backwards
compatible. Opinions?
--- nnmail.el.~6.41.~ Thu May 16 16:51:44 2002
+++ nnmail.el Mon Jun 3 19:42:26 2002
@@ -484,6 +484,11 @@
:group 'nnmail
:type 'symbol)
+(defcustom nnmail-mail-splitting-decodes t
+ "Whether the nnmail splitting functionality should MIME decode headers."
+ :group 'nnmail
+ :type 'boolean)
+
;;; Internal variables.
(defvar nnmail-article-buffer " *nnmail incoming*"
@@ -1000,8 +1005,9 @@
;; Copy the headers into the work buffer.
(insert-buffer-substring obuf beg end)
;; Decode MIME headers and charsets.
+ (when nnmail-mail-splitting-decodes
(let ((mail-parse-charset nnmail-mail-splitting-charset))
- (mail-decode-encoded-word-region (point-min) (point-max)))
+ (mail-decode-encoded-word-region (point-min) (point-max))))
;; Fold continuation lines.
(goto-char (point-min))
(while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t)
--- gnus.texi.~6.281.~ Thu May 23 21:22:49 2002
+++ gnus.texi Mon Jun 3 19:50:36 2002
@@ -12439,6 +12439,15 @@
@code{nnmail-split-header-length-limit} are excluded from the split
function.
+@vindex nnmail-mail-splitting-charset
+@vindex nnmail-mail-splitting-decodes
+By default the splitting codes MIME decodes headers so you can match
+on non-ASCII strings. The @code{nnmail-mail-splitting-charset}
+variable specifies the default charset for decoding. The behaviour
+can be turned off completely by binding
+@code{nnmail-mail-splitting-decodes} to nil, which is useful if you
+want to match articles based on the raw header data.
+
Gnus gives you all the opportunity you could possibly want for shooting
yourself in the foot. Let's say you create a group that will contain
all the mail you get from your boss. And then you accidentally
next prev parent reply other threads:[~2002-06-03 17:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-24 20:10 Mark Thomas
2002-05-25 12:35 ` Mark Thomas
2002-05-25 17:25 ` Kai Großjohann
2002-05-26 0:00 ` Russ Allbery
2002-05-26 12:32 ` Mark Thomas
2002-05-30 22:21 ` Russ Allbery
2002-06-03 3:34 ` Jesper Harder
2002-06-03 17:52 ` Simon Josefsson [this message]
2002-06-03 19:41 ` Kai Großjohann
2002-06-03 19:48 ` Simon Josefsson
2002-06-03 20:04 ` Russ Allbery
2002-05-28 20:45 ` Norman Walsh
2002-05-28 22:17 ` Mark Thomas
2002-05-29 0:31 ` Russ Allbery
2002-05-29 7:39 ` Kai Großjohann
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=iluwutg6yig.fsf@latte.josefsson.org \
--to=jas@extundo.com \
--cc=ding@gnus.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).