articles containing the sting \"IMPORTANT\" in the Subject header will
be expired to the group \"nnfolder:IMPORTANT.YYYY.MMM\"; and
everything else will be expired to \"nnfolder:Archive-YYYY\"."
+ :version "21.4"
:group 'nnmail-expire
:type '(repeat (list (choice :tag "Match against"
(string :tag "Header")
(defcustom nnmail-mail-splitting-charset nil
"Default charset to be used when splitting incoming mail."
+ :version "21.4"
:group 'nnmail
:type 'symbol)
(defcustom nnmail-mail-splitting-decodes t
"Whether the nnmail splitting functionality should MIME decode headers."
+ :version "21.4"
:group 'nnmail
:type 'boolean)
:group 'nnmail
:type 'boolean)
+(defcustom nnmail-split-lowercase-expanded t
+ "Whether to lowercase expanded entries (i.e. \\N) when splitting mails.
+This avoids the creation of multiple groups when users send to an address
+using different case (i.e. mailing-list@domain vs Mailing-List@Domain)."
+ :group 'nnmail
+ :type 'boolean)
+
;;; Internal variables.
(defvar nnmail-article-buffer " *nnmail incoming*"
(setq N 0)
(setq N (- c ?0)))
(when (match-beginning N)
- (push (buffer-substring (match-beginning N) (match-end N))
+ (push (if nnmail-split-lowercase-expanded
+ (downcase (buffer-substring (match-beginning N)
+ (match-end N)))
+ (buffer-substring (match-beginning N) (match-end N)))
expanded))))
(setq pos (1+ pos)))
(if did-expand
(save-excursion
(set-buffer nnmail-cache-buffer)
(goto-char (point-max))
- (if (and grp (not (string= "" grp)))
+ (if (and grp (not (string= "" grp))
+ (gnus-methods-equal-p gnus-command-method
+ (nnmail-cache-primary-mail-backend)))
(let ((regexp (if (consp nnmail-cache-ignore-groups)
(mapconcat 'identity nnmail-cache-ignore-groups
"\\|")
nnmail-cache-ignore-groups)))
(unless (and regexp (string-match regexp grp))
- (if (gnus-methods-equal-p gnus-command-method
- (nnmail-cache-primary-mail-backend))
- (insert id "\t" grp "\n")
- (insert id "\n"))))
+ (insert id "\t" grp "\n")))
(insert id "\n"))))))
(defun nnmail-cache-primary-mail-backend ()