This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 6254b48ddc6ea299a3241cc6298b8e19636d25dc
Author: Sebb <[email protected]>
AuthorDate: Mon Dec 13 15:32:22 2021 +0000

    mailinglist is never read
    
    It is not defined in the DBNames class ...
    
    This fixes #176
---
 tools/archiver.py        | 18 ------------------
 tools/mappings.yaml      | 12 ------------
 tools/plugins/elastic.py |  2 --
 3 files changed, 32 deletions(-)

diff --git a/tools/archiver.py b/tools/archiver.py
index b0a52c8..0af7f59 100755
--- a/tools/archiver.py
+++ b/tools/archiver.py
@@ -767,24 +767,6 @@ class Archiver(object):  # N.B. Also used by import-mbox.py
             # otherwise fail as before
             raise err
 
-        # If MailMan and list info is present, save/update it in ES:
-        if (
-            hasattr(mlist, "description")
-            and hasattr(mlist, "list_name")
-            and mlist.description
-            and mlist.list_name
-        ):
-            elastic.index(
-                index=elastic.db_mailinglist,
-                id=lid,
-                body={
-                    "list": lid,
-                    "name": mlist.list_name,
-                    "description": mlist.description,
-                    "private": private,
-                },
-            )
-
         if logger:
             logger.info("Pony Mail archived message %s successfully", 
ojson["mid"])
         oldrefs = []
diff --git a/tools/mappings.yaml b/tools/mappings.yaml
index f2c3fda..81a8697 100644
--- a/tools/mappings.yaml
+++ b/tools/mappings.yaml
@@ -39,18 +39,6 @@ attachment:
   properties:
     source:
       type: binary
-# Only used for MailMan lists: see 
https://github.com/apache/incubator-ponymail-foal/issues/176
-mailinglist:
-  dynamic: strict
-  properties:
-    description:
-      type: keyword
-    list:
-      type: keyword
-    name:
-      type: keyword
-    private:
-      type: boolean
 mbox:
   dynamic: strict
   properties:
diff --git a/tools/plugins/elastic.py b/tools/plugins/elastic.py
index eda0c43..a24c641 100755
--- a/tools/plugins/elastic.py
+++ b/tools/plugins/elastic.py
@@ -43,7 +43,6 @@ class Elastic:
     db_account:         str
     db_session:         str
     db_notification:    str
-    db_mailinglist:     str
     db_auditlog:        str
     dbname:             str
 
@@ -60,7 +59,6 @@ class Elastic:
         self.db_attachment = dbname + '-attachment'
         self.db_session = dbname + '-session'
         self.db_notification = dbname + '-notification'
-        self.db_mailinglist = dbname + '-mailinglist'
         self.db_auditlog = dbname + '-auditlog'
         self.db_version = 0
 

Reply via email to