]> code.delx.au - gnu-emacs/blobdiff - lisp/mh-e/mh-e.el
Merge from trunk.
[gnu-emacs] / lisp / mh-e / mh-e.el
index 705c92b0b4cea40bf30e02f0e0efbd2ace2c77ef..94905e7984f030a97b3961edb26b85f7c36e154a 100644 (file)
@@ -5,7 +5,7 @@
 
 ;; Author: Bill Wohler <wohler@newt.com>
 ;; Maintainer: Bill Wohler <wohler@newt.com>
-;; Version: 8.3.1
+;; Version: 8.3.1+bzr
 ;; Keywords: mail
 
 ;; This file is part of GNU Emacs.
 ;; Try to keep variables local to a single file. Provide accessors if
 ;; variables are shared. Use this section as a last resort.
 
-(defconst mh-version "8.3.1" "Version number of MH-E.")
+(defconst mh-version "8.3.1+bzr" "Version number of MH-E.")
 
 ;; Variants
 
@@ -230,6 +230,11 @@ User's mail folder directory.")
 (defvar mh-arrow-marker nil
   "Marker for arrow display in fringe.")
 
+(defvar mh-blacklist nil
+  "List of messages to use to train the junk filter.
+This variable can be used by
+`mh-before-commands-processed-hook'.")
+
 (defvar mh-colors-available-flag nil
   "Non-nil means colors are available.")
 
@@ -291,6 +296,11 @@ Elements have the form (SEQUENCE . MESSAGES).")
   "Stack of operations that change the folder view.
 These operations include narrowing or threading.")
 
+(defvar mh-whitelist nil
+  "List of messages to use to train the junk filter.
+This variable can be used by
+`mh-before-commands-processed-hook'.")
+
 ;; MH-Show Locals (alphabetical)
 
 (defvar mh-globals-hash (make-hash-table)
@@ -2215,6 +2225,17 @@ commands."
   :group 'mh-sequences
   :package-version '(MH-E . "7.0"))
 
+(defcustom-mh mh-whitelist-preserves-sequences-flag t
+  "*Non-nil means that sequences are preserved when messages are whitelisted.
+
+If a message is in any sequence (except \"Previous-Sequence:\"
+and \"cur\") when it is whitelisted, then it will still be in
+those sequences in the destination folder. If this behavior is
+not desired, then turn off this option."
+  :type 'boolean
+  :group 'mh-sequences
+  :package-version '(MH-E . "8.4"))
+
 ;;; Reading Your Mail (:group 'mh-show)
 
 (defcustom-mh mh-bury-show-buffer-flag t
@@ -2400,7 +2421,8 @@ of citations entirely, choose \"None\"."
 ;;  "X-Mailer:"                         ;
 ;;  "X-Operator:"                       ; Similar to X-Mailer, so display it
 
-;; Keep fields alphabetized (set sort-fold-case to t first).
+;; Keep fields alphabetized with case folding. Use M-:(setq
+;; sort-fold-case t) from the minibuffer to accomplish this.
 ;; Mention source, if known.
 (defvar mh-invisible-header-fields-internal
   '(
@@ -2418,6 +2440,8 @@ of citations entirely, choose \"None\"."
     "Auto-forwarded:"                   ; RFC 2156
     "Autoforwarded:"                    ; RFC 2156
     "Bestservhost:"
+    "Bounces-To:"
+    "Bounces_to:"
     "Bytes:"
     "Cancel-Key:"                       ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
     "Cancel-Lock:"                      ; NNTP posts
@@ -2523,9 +2547,11 @@ of citations entirely, choose \"None\"."
     "X-Abuse-Info:"
     "X-Accept-Language:"                ; Netscape/Mozilla
     "X-Ack:"
+    "X-ACL-Warn:"                      ; http://www.exim.org
     "X-Admin:"                          ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
     "X-Administrivia-To:"
     "X-AMAZON"                          ; Amazon.com
+    "X-AnalysisOut:"                    ; Exchange
     "X-AntiAbuse:"                      ; cPanel
     "X-Antivirus-Scanner:"
     "X-AOL-IP:"                         ; AOL WebMail
@@ -2535,18 +2561,30 @@ of citations entirely, choose \"None\"."
     "X-AuditID:"
     "X-Authenticated-Info:"             ; Verizon.net?
     "X-Authenticated-Sender:"           ; AT&T Message Center (webmail)
+    "X-Authentication-Info:"            ; verizon.net?
     "X-Authentication-Warning:"         ; sendmail
     "X-Authority-Analysis:"
+    "X-Auto-Response-Suppress:"         ; Exchange
     "X-Barracuda-"                      ; Barracuda spam scores
+    "X-Bayes-Prob:"                     ; IEEE spam filter
     "X-Beenthere:"                      ; Mailman mailing list manager
+    "X-BFI:"
     "X-Bigfish:"
     "X-Bogosity:"                       ; bogofilter
+    "X-BPS1:"                          ; http://www.boggletools.com
+    "X-BPS2:"                          ; http://www.boggletools.com
     "X-Brightmail-Tracker:"             ; Brightmail
     "X-BrightmailFiltered:"             ; Brightmail
     "X-Bugzilla-"                       ; Bugzilla
+    "X-Cam-"                            ; Cambridge scanners
+    "X-Campaign-Id:"
+    "X-Campaign:"
     "X-Campaignid:"
+    "X-CanIt-Geo:"                      ; IEEE spam filter
+    "X-Cloudmark-SP-"                  ; Cloudmark (www.cloudmark.com)
     "X-Comment:"                        ; AT&T Mailennium
     "X-Complaints-To:"                  ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
+    "X-Completed:"
     "X-Confirm-Reading-To:"             ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
     "X-Content-Filtered-By:"
     "X-ContentStamp:"                   ; NetZero
@@ -2554,18 +2592,23 @@ of citations entirely, choose \"None\"."
     "X-Cr-Hashedpuzzle:"
     "X-Cr-Puzzleid:"
     "X-Cron-Env:"
-    "X-DCC-Usenix-Metrics:"
+    "X-DCC-"                            ; SpamAssassin
     "X-Declude-"                        ; http://www.declude.com/x-note.htm
     "X-Dedicated:"
     "X-Delivered"
+    "X-Destination-ID:"
+    "X-detected-operating-system:"     ; GNU.ORG?
     "X-DH-Virus-"
     "X-DMCA"
+    "X-DocGen-Version:"                        ; DocGen
     "X-Domain:"
     "X-Echelon-Distraction"
     "X-EFL-Spamscore:"                  ; MIT alumni spam filtering
     "X-eGroups-"                        ; Egroups/yahoogroups mailing list manager
     "X-EID:"
     "X-ELNK-Trace:"                     ; Earthlink mailer
+    "X-EM-"                            ; Some ecommerce software
+    "X-Email-Type-Id:"                 ; Paypal http://www.paypal.com
     "X-Enigmail-Version:"
     "X-Envelope-Date:"                  ; GNU mailutils
     "X-Envelope-From:"                  ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
@@ -2575,29 +2618,39 @@ of citations entirely, choose \"None\"."
     "X-Evolution:"                      ; Evolution mail client
     "X-ExtLoop"
     "X-Face:"                           ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
+    "X-Facebook"                        ; Facebook
+    "X-FB-SS:"
     "X-fmx-"
     "X-Folder:"                         ; Spam
+    "X-Forwarded-"                      ; Google+
     "X-From-Line"
+    "X-FuHaFi:"                                ; http://www.gmx.net/
+    "X-Generated-By:"                   ; launchpad.net
     "X-Gmail-"                          ; Gmail
     "X-Gnus-Mail-Source:"               ; gnus
     "X-Google-"                         ; Google mail
     "X-Google-Sender-Auth:"
     "X-Greylist:"                       ; milter-greylist-1.2.1
-    "X-Habeas-SWE-"                     ; Spam
+    "X-Habeas-"                                ; http://www.returnpath.net
     "X-Hashcash:"                       ; hashcash
+    "X-Headers-End:"                    ; SpamCop
     "X-HPL-"
     "X-HR-"
     "X-HTTP-UserAgent:"
     "X-Hz"                             ; Hertz
     "X-Identity:"                       ; http://www.declude.com/x-note.htm
+    "X-IEEE-UCE-"                       ; IEEE spam filter
     "X-Image-URL:"
     "X-IMAP:"                           ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
     "X-Info:"                           ; NTMail
     "X-IronPort-"                       ; IronPort AV
     "X-ISI-4-30-3-MailScanner:"
     "X-J2-"
+    "X-Jira-Fingerprint:"               ; JIRA
+    "X-Junkmail-"                       ; RCN?
     "X-Juno-"                           ; Juno
     "X-Key:"
+    "X-Launchpad-"                      ; plaunchpad.net
     "X-List-Host:"                      ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
     "X-List-Subscribe:"                 ; Unknown mailing list managers
     "X-List-Unsubscribe:"               ; Unknown mailing list managers
@@ -2606,18 +2659,24 @@ of citations entirely, choose \"None\"."
     "X-Loop:"                           ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
     "X-Lrde-Mailscanner:"
     "X-Lumos-SenderID:"                 ; Roving ConstantContact
+    "X-mail_abuse_inquiries:"          ; http://www.salesforce.com
     "X-Mail-from:"                      ; fastmail.fm
     "X-MAIL-INFO:"                      ; NetZero
     "X-Mailer_"
+    "X-MailFlowPolicy:"                        ; Cicso ironport (http://www.ironport.com)
     "X-Mailing-List:"                   ; Unknown mailing list managers
+    "X-MailingID:"
     "X-Mailman-Approved-At:"            ; Mailman mailing list manager
     "X-Mailman-Version:"                ; Mailman mailing list manager
     "X-MailScanner"                     ; ListProc(tm) by CREN
     "X-Mailutils-Message-Id"            ; GNU Mailutils
     "X-Majordomo:"                      ; Majordomo mailing list manager
+    "X-Match:"                         
+    "X-MaxCode-Template:"              ; Paypal http://www.paypal.com
     "X-MB-Message-"                     ; AOL WebMail
     "X-MDaemon-Deliver-To:"
     "X-MDRemoteIP:"
+    "X-ME-Bayesian:"                   ; http://www.newmediadevelopment.net/page.cfm/parent/Client-Area/content/Managing-spam/
     "X-Message-Id"
     "X-Message-Type:"
     "X-MessageWall-Score:"              ; Unknown mailing list manager, AUC TeX
@@ -2630,12 +2689,16 @@ of citations entirely, choose \"None\"."
     "X-MS-"                             ; MS Outlook
     "X-Msmail-"                         ; MS Outlook
     "X-MSMail-Priority"                 ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
+    "X-MXL-Hash:"
     "X-NAI-Spam-"                       ; Network Associates Inc. SpamKiller
     "X-News:"                           ; News
     "X-Newsreader:"                     ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
     "X-No-Archive:"                     ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
     "X-Notes-Item:"                     ; Lotus Notes Domino structured header
+    "X-Notification-"                   ; Google+
+    "X-Notifications:"                  ; Google+
     "X-OperatingSystem:"
+    "X-Oracle-Calendar:"                ; Oracle calendar invitations
     "X-ORBL:"
     "X-Orcl-Content-Type:"
     "X-Organization:"
@@ -2652,6 +2715,7 @@ of citations entirely, choose \"None\"."
     "X-PID:"
     "X-PMG-"
     "X-PMX-Version:"
+    "X-Policyd-Weight:"                 ; policyd-weight (Postfix)
     "X-Postfilter:"
     "X-Priority:"                       ; MS Outlook
     "X-Proofpoint-"                    ; Proofpoint mail filter
@@ -2677,14 +2741,20 @@ of citations entirely, choose \"None\"."
     "X-SBRS:"
     "X-SBRule:"                         ; Spam
     "X-Scanned-By:"
+    "X-Sender-ID:"                      ; Google+
     "X-Sender:"                         ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
+    "X-Sendergroup:"                   ; Cicso ironport (http://www.ironport.com)
     "X-Server-Date:"
     "X-Server-Uuid:"
     "X-Service-Code:"
+    "X-SFDC-"                          ; http://www.salesforce.com
     "X-Sieve:"                          ; Sieve filtering
+    "X-SMFBL:"
+    "X-SMHeaderMap:"
     "X-SMTP-"
     "X-Source"
-    "X-Spam-"                           ; Spamassassin
+    "X-Spam-"                           ; SpamAssassin
+    "X-Spam:"                           ; Exchange
     "X-SpamBouncer:"                    ; Spam
     "X-SPF-"
     "X-Status"
@@ -2692,6 +2762,7 @@ of citations entirely, choose \"None\"."
     "X-Submissions-To:"
     "X-Sun-Charset:"
     "X-Telecom-Digest"
+    "X-TM-IMSS-Message-ID:"            ; http://www.trendmicro.com
     "X-Trace:"
     "X-UID"
     "X-UIDL:"                           ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
@@ -2702,15 +2773,23 @@ of citations entirely, choose \"None\"."
     "X-USANET-"                         ; usa.net
     "X-Usenet-Provider"
     "X-UserInfo1:"
+    "X-VGI-OESCD:"
+    "X-VirtualServer:"
+    "X-VirtualServerGroup:"
     "X-Virus-"                          ;
     "X-Vms-To:"
     "X-VSMLoop:"                        ; NTMail
     "X-WebTV-Signature:"
     "X-Wss-Id:"                         ; Worldtalk gateways
     "X-X-Sender:"                       ; http://people.dsv.su.se/~jpalme/ietf/mail-headers/
+    "X-XPT-XSL-Name:"                  ; Paypal http://www.paypal.com
+    "X-xsi-"
+    "X-XWALL-"                         ; http://www.dataenter.co.at/doc/xwall_undocumented_config.htm
+    "X-Y-GMX-Trusted:"                 ; http://www.gmx.net/
     "X-Yahoo"
     "X-Yahoo-Newman-"
     "X-YMail-"
+    "X-ZixNet:"
     "X400-"                             ; X400
     "Xref:"                             ; RFC 1036
     )
@@ -3104,9 +3183,10 @@ annotated messages with `mh-annotate-list'."
 (defcustom-mh mh-before-commands-processed-hook nil
   "Hook run by \\<mh-folder-mode-map>\\[mh-execute-commands] before performing outstanding refile and delete requests.
 
-Variables that are useful in this hook include `mh-delete-list'
-and `mh-refile-list' which can be used to see which changes will
-be made to the current folder, `mh-current-folder'."
+Variables that are useful in this hook include `mh-delete-list',
+`mh-refile-list', `mh-blacklist', and `mh-whitelist' which can be
+used to see which changes will be made to the current folder,
+`mh-current-folder'."
   :type 'hook
   :group 'mh-hooks
   :group 'mh-folder
@@ -3136,6 +3216,13 @@ before sending, add the `ispell-message' function."
   :group 'mh-letter
   :package-version '(MH-E . "6.0"))
 
+(defcustom-mh mh-blacklist-msg-hook nil
+  "Hook run by \\<mh-letter-mode-map>\\[mh-junk-blacklist] after marking each message for blacklisting."
+  :type 'hook
+  :group 'mh-hooks
+  :group 'mh-show
+  :package-version '(MH-E . "8.4"))
+
 (defcustom-mh mh-delete-msg-hook nil
   "Hook run by \\<mh-letter-mode-map>\\[mh-delete-msg] after marking each message for deletion.
 
@@ -3301,6 +3388,13 @@ sequence."
   :group 'mh-sequences
   :package-version '(MH-E . "6.0"))
 
+(defcustom-mh mh-whitelist-msg-hook nil
+  "Hook run by \\<mh-letter-mode-map>\\[mh-junk-whitelist] after marking each message for whitelisting."
+  :type 'hook
+  :group 'mh-hooks
+  :group 'mh-show
+  :package-version '(MH-E . "8.4"))
+
 \f
 
 ;;; Faces (:group 'mh-faces + group where faces described)
@@ -3519,6 +3613,13 @@ specified colors."
   :group 'mh-folder
   :package-version '(MH-E . "8.0"))
 
+(defface-mh mh-folder-blacklisted
+  (mh-face-data 'mh-folder-msg-number '((t (:inherit mh-folder-msg-number))))
+  "Blacklisted message face."
+  :group 'mh-faces
+  :group 'mh-folder
+  :package-version '(MH-E . "8.4"))
+
 (defface-mh mh-folder-body
   (mh-face-data 'mh-folder-msg-number
                 '((((class color))
@@ -3608,6 +3709,13 @@ format `mh-scan-format-nmh' and the regular expression
   :group 'mh-folder
   :package-version '(MH-E . "8.0"))
 
+(defface-mh mh-folder-whitelisted
+  (mh-face-data 'mh-folder-refiled '((t (:inherit mh-folder-refiled))))
+  "Whitelisted message face."
+  :group 'mh-faces
+  :group 'mh-folder
+  :package-version '(MH-E . "8.4"))
+
 (defface-mh mh-letter-header-field (mh-face-data 'mh-letter-header-field)
   "Editable header field value face in draft buffers."
   :group 'mh-faces