summaryrefslogtreecommitdiff
path: root/src/leap/mail/constants.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/mail/constants.py')
-rw-r--r--src/leap/mail/constants.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/leap/mail/constants.py b/src/leap/mail/constants.py
index 55bf1da..bf1db7f 100644
--- a/src/leap/mail/constants.py
+++ b/src/leap/mail/constants.py
@@ -19,3 +19,20 @@ Constants for leap.mail.
"""
INBOX_NAME = "INBOX"
+
+# Regular expressions for the identifiers to be used in the Message Data Layer.
+
+METAMSGID = "M-{mbox}-{chash}"
+METAMSGID_RE = "M\-{mbox}\-[0-9a-fA-F]+"
+METAMSGID_CHASH_RE = "M\-\w+\-([0-9a-fA-F]+)"
+METAMSGID_MBOX_RE = "M\-(\w+)\-[0-9a-fA-F]+"
+
+FDOCID = "F-{mbox}-{chash}"
+FDOCID_RE = "F\-{mbox}\-[0-9a-fA-F]+"
+FDOCID_CHASH_RE = "F\-\w+\-([0-9a-fA-F]+)"
+
+HDOCID = "H-{chash}"
+HDOCID_RE = "H\-[0-9a-fA-F]+"
+
+CDOCID = "C-{phash}"
+CDOCID_RE = "C\-[0-9a-fA-F]+"