If SOURCE is a directory spec, try to return the group name component."
(if (eq (car source) 'directory)
(let ((file (file-name-nondirectory file)))
- (mail-source-bind directory source
- (if (string-match (concat (regexp-quote suffix "$") file))
+ (mail-source-bind (directory source)
+ (if (string-match (concat (regexp-quote suffix) "$") file)
(substring file 0 (match-beginning 0))
nil)))
nil))
"Translate TAB characters into SPACE characters."
(subst-char-in-region (point-min) (point-max) ?\t ? t))
+(defun nnmail-fix-eudora-headers ()
+ "Eudora has a broken References line, but an OK In-Reply-To."
+ (goto-char (point-min))
+ (when (re-search-forward "^X-Mailer:.*Eudora" nil t)
+ (goto-char (point-min))
+ (when (re-search-forward "^References:" nil t)
+ (beginning-of-line)
+ (insert "X-Gnus-Broken-Eudora-"))))
+
;;; Utility functions
(defun nnmail-split-fancy ()
(t
nnmail-treat-duplicates))))
group-art)
+ ;; We insert a line that says what the mail source is.
+ (let ((case-fold-search t))
+ (goto-char (point-min))
+ (re-search-forward "^message-id[ \t]*:" nil t)
+ (beginning-of-line)
+ (insert (format "X-Gnus-Mail-Source: %s\n" mail-source-string)))
+
;; Let the backend save the article (or not).
(cond
((not duplication)
(list 'directory :path source))
(t
(list 'file :path source)))))
- (nnheader-message 3 "%s: Reading incoming mail %S..." method source)
+ (nnheader-message 4 "%s: Reading incoming mail from %s..."
+ method (car source))
(when (mail-source-fetch
source
`(lambda (file orig-file)
(when exit-func
(funcall exit-func))
(run-hooks 'nnmail-read-incoming-hook)
- (nnheader-message 3 "%s: Reading incoming mail...done" method))
+ (nnheader-message 4 "%s: Reading incoming mail...done" method))
;; Close the message-id cache.
(nnmail-cache-close)
;; Allow the user to hook.
((numberp days)
(setq days (days-to-time days))
;; Compare the time with the current time.
- (condition-case ()
- (time-less-p days (time-since time))
- (error nil)))))))
+ (ignore-errors (time-less-p days (time-since time))))))))
(defun nnmail-check-syntax ()
"Check (and modify) the syntax of the message in the current buffer."