* (Unwanted) case sensitivity in nnmail-process-unix-mail-format
@ 1996-11-07 19:44 Steven L Baur
1996-11-08 2:03 ` patch for broken 0.55 nnmail-process-unix-mail-format David Moore
0 siblings, 1 reply; 2+ messages in thread
From: Steven L Baur @ 1996-11-07 19:44 UTC (permalink / raw)
nnmail-process-unix-mail-format explicitly sets case-fold-search to
nil. This causes the test for a previous message to lose when it does
not match Message-ID: exactly. Since all headers are case
insensitive, either the tests:
(if (re-search-forward "^Message-ID:[ \t]*\\(<[^>]+>\\)" nil t)
(setq message-id (match-string 1))
(save-excursion
(when (re-search-forward "^Message-ID:" nil t)
(beginning-of-line)
(insert "Original-")))
;; There is no Message-ID here, so we create one.
(forward-line 1)
(insert "Message-ID: " (setq message-id (nnmail-message-id)) "\n"))
are incorrect, or the binding of case-fold-search to nil is incorrect.
There are a number of mailers that will attach a message id as
Message-Id: so this definitely needs fixing.
--
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.
What are the last two letters of "doesn't" and "can't"?
Coincidence? I think not.
^ permalink raw reply [flat|nested] 2+ messages in thread
* patch for broken 0.55 nnmail-process-unix-mail-format
1996-11-07 19:44 (Unwanted) case sensitivity in nnmail-process-unix-mail-format Steven L Baur
@ 1996-11-08 2:03 ` David Moore
0 siblings, 0 replies; 2+ messages in thread
From: David Moore @ 1996-11-08 2:03 UTC (permalink / raw)
> nnmail-process-unix-mail-format explicitly sets case-fold-search to
> nil. This causes the test for a previous message to lose when it does
> not match Message-ID: exactly. Since all headers are case
> insensitive, either the tests:
> There are a number of mailers that will attach a message id as
> Message-Id: so this definitely needs fixing.
This is a new bug in rgnus 0.55, introduced with the new 'From '
line algorithm. Half of the messages I received today now has a bogus
'Message-ID' line overriding a valid 'Message-Id' one. :)
This patch should help. Although probably the routine should be
split up to handle this more cleanly.
*** nnmail.el.orig Thu Nov 7 17:53:40 1996
--- nnmail.el Thu Nov 7 17:59:39 1996
***************
*** 675,703 ****
(not (eobp)))
(forward-line 1)
(point))))
! ;; Find the Message-ID header.
! (goto-char (point-min))
! (if (re-search-forward "^Message-ID:[ \t]*\\(<[^>]+>\\)" nil t)
! (setq message-id (match-string 1))
! (save-excursion
! (when (re-search-forward "^Message-ID:" nil t)
! (beginning-of-line)
! (insert "Original-")))
! ;; There is no Message-ID here, so we create one.
! (forward-line 1)
! (insert "Message-ID: " (setq message-id (nnmail-message-id)) "\n"))
! ;; Look for a Content-Length header.
! (goto-char (point-min))
! (if (not (re-search-forward
! "^Content-Length:[ \t]*\\([0-9]+\\)" nil t))
! (setq content-length nil)
! (setq content-length (string-to-int (match-string 1)))
! ;; We destroy the header, since none of the backends ever
! ;; use it, and we do not want to confuse other mailers by
! ;; having a (possibly) faulty header.
! (beginning-of-line)
! (insert "X-"))
! (run-hooks 'nnmail-prepare-incoming-header-hook)
;; Find the end of this article.
(goto-char (point-max))
(widen)
--- 675,707 ----
(not (eobp)))
(forward-line 1)
(point))))
! ;; Search for message-id, content-length and run prepare hooks
! ;; with case-fold-search t. As in rgnus 0.54.
! (let ((case-fold-search t))
! ;; Find the Message-ID header.
! (goto-char (point-min))
! (if (re-search-forward "^Message-ID:[ \t]*\\(<[^>]+>\\)" nil t)
! (setq message-id (match-string 1))
! (save-excursion
! (when (re-search-forward "^Message-ID:" nil t)
! (beginning-of-line)
! (insert "Original-")))
! ;; There is no Message-ID here, so we create one.
! (forward-line 1)
! (insert "Message-ID: " (setq message-id (nnmail-message-id)) "\n"))
! ;; Look for a Content-Length header.
! (goto-char (point-min))
! (if (not (re-search-forward
! "^Content-Length:[ \t]*\\([0-9]+\\)" nil t))
! (setq content-length nil)
! (setq content-length (string-to-int (match-string 1)))
! ;; We destroy the header, since none of the backends ever
! ;; use it, and we do not want to confuse other mailers by
! ;; having a (possibly) faulty header.
! (beginning-of-line)
! (insert "X-"))
! (run-hooks 'nnmail-prepare-incoming-header-hook)
! )
;; Find the end of this article.
(goto-char (point-max))
(widen)
***************
*** 727,740 ****
(goto-char head-end)
(or (nnmail-search-unix-mail-delim)
(goto-char (point-max))))
! ;; Allow the backend to save the article.
! (save-excursion
! (save-restriction
! (narrow-to-region start (point))
! (goto-char (point-min))
! (nnmail-check-duplication message-id func artnum-func)
! (setq end (point-max))))
! (goto-char end)))))
(defun nnmail-process-mmdf-mail-format (func artnum-func)
(let ((delim "^\^A\^A\^A\^A$")
--- 731,746 ----
(goto-char head-end)
(or (nnmail-search-unix-mail-delim)
(goto-char (point-max))))
! (let ((case-fold-search t))
! ;; Allow the backend to save the article.
! (save-excursion
! (save-restriction
! (narrow-to-region start (point))
! (goto-char (point-min))
! (nnmail-check-duplication message-id func artnum-func)
! (setq end (point-max))))
! (goto-char end))
! ))))
(defun nnmail-process-mmdf-mail-format (func artnum-func)
(let ((delim "^\^A\^A\^A\^A$")
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1996-11-08 2:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-07 19:44 (Unwanted) case sensitivity in nnmail-process-unix-mail-format Steven L Baur
1996-11-08 2:03 ` patch for broken 0.55 nnmail-process-unix-mail-format David Moore
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).