aboutsummaryrefslogtreecommitdiffstats
path: root/cloud_mdir_sync/config.py
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2020-02-04 14:45:48 -0400
committerJason Gunthorpe <jgg@mellanox.com>2020-02-06 15:01:40 -0400
commitf54472e2013f271146adf591843fed26ca7c3392 (patch)
tree810f85eefd0e937866ccb3c6bb3fb70c68a697bc /cloud_mdir_sync/config.py
parent5c037ad30837f7e94d8dcfe160ad10e51056512c (diff)
downloadcloud_mdir_sync-f54472e2013f271146adf591843fed26ca7c3392.tar.gz
cloud_mdir_sync-f54472e2013f271146adf591843fed26ca7c3392.tar.bz2
cloud_mdir_sync-f54472e2013f271146adf591843fed26ca7c3392.zip
GMail support
Basic support for GMail using the REST API Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'cloud_mdir_sync/config.py')
-rw-r--r--cloud_mdir_sync/config.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/cloud_mdir_sync/config.py b/cloud_mdir_sync/config.py
index f0b5796..85351d5 100644
--- a/cloud_mdir_sync/config.py
+++ b/cloud_mdir_sync/config.py
@@ -93,6 +93,19 @@ class Config(object):
tenant=account[1]))
return self.cloud_mboxes[-1]
+ def GMail_Account(self, user):
+ """Define a GMail account credential. The user must be specified as a
+ fully qualified Google Account email address. This supports both
+ consumer GMail accounts, and accounts linked to a G-Suite account."""
+ return (user,)
+
+ def GMail(self, label, account):
+ """Create a cloud mailbox for Office365. Mailbox is the name of O365
+ mailbox to use, account should be the result of Office365_Account"""
+ from .gmail import GMailMailbox
+ self.cloud_mboxes.append(GMailMailbox(label, user=account[0]))
+ return self.cloud_mboxes[-1]
+
def MailDir(self, directory):
"""Create a local maildir to hold messages"""
from .maildir import MailDirMailbox