(modb-entity-extract-ml-info-from-mailman): New
authorhmurata <hmurata>
Wed, 23 Nov 2005 02:31:27 +0000 (02:31 +0000)
committerhmurata <hmurata>
Wed, 23 Nov 2005 02:31:27 +0000 (02:31 +0000)
function.
(modb-entity-extract-mailing-list-info-functions): Added it.

elmo/ChangeLog
elmo/modb-entity.el

index 91f0b1d..3ba19f9 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-23  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * modb-entity.el (modb-entity-extract-ml-info-from-mailman): New
+       function.
+       (modb-entity-extract-mailing-list-info-functions): Added it.
+
 2005-11-18  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * modb-legacy.el (elmo-msgdb-append-entity): Execute the process
index b3b0759..f2174af 100644 (file)
@@ -821,10 +821,19 @@ If each field is t, function is set as default converter."
                             mailing-list))
       (cons (match-string 2 mailing-list) nil))))
 
+(defun modb-entity-extract-ml-info-from-mailman ()
+  (when (elmo-field-body "x-mailman-version")
+    (let ((list-id (elmo-decoded-field-body "list-id" 'summary)))
+      (when (and list-id
+                (or (string-match "<\\([^.]+\\)\\." list-id)
+                    (string-match "^\\([^.]+\\)\\." list-id)))
+       (cons (match-string 1 list-id) nil)))))
+
 (defvar modb-entity-extract-mailing-list-info-functions
   '(modb-entity-extract-ml-info-from-x-sequence
     modb-entity-extract-ml-info-from-subject
     modb-entity-extract-ml-info-from-return-path
+    modb-entity-extract-ml-info-from-mailman
     modb-entity-extract-ml-info-from-delivered-to
     modb-entity-extract-ml-info-from-mailing-list))