diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2020-05-28 16:00:10 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-05-28 16:13:11 -0300 |
commit | 8f7c714265c7644c818a93fbc7928fc6b4d1c30e (patch) | |
tree | 63727130e2cb4a66ff32b26c8e0558327a9c279f /doc/smtp.md | |
parent | 192d633a13adf2d552f4257f4975b066204b9da9 (diff) | |
download | cloud_mdir_sync-8f7c714265c7644c818a93fbc7928fc6b4d1c30e.tar.gz cloud_mdir_sync-8f7c714265c7644c818a93fbc7928fc6b4d1c30e.tar.bz2 cloud_mdir_sync-8f7c714265c7644c818a93fbc7928fc6b4d1c30e.zip |
Add cms-oauth
This is a command line program to get the OAUTH tokens from the credential
server. It is intended to fit into the 'call a program to get the token'
methodology that several tools are implementing.
Several options are provided to format the token and a built in SMTP
protocol tests that the server is working properly.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'doc/smtp.md')
-rw-r--r-- | doc/smtp.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/smtp.md b/doc/smtp.md index 48f3d6c..c809cfa 100644 --- a/doc/smtp.md +++ b/doc/smtp.md @@ -24,6 +24,21 @@ CredentialServer("/var/run/user/XXX/cms.sock", Upon restart CMS will acquire and maintain a OAUTH token with the SMTP scope for the specified accounts, and serve token requests on the specified path. +## Configuration Test + +CMS provides the *cms-auth* tool to get tokens out of the daemon. It has a +test mode which should be used to verify that the SMTP server is working correctly: + +```sh +$ cms-oauth --user=user@domain.com --cms_sock=/var/run/user/XXX/cms.sock --test-smtp=smtp.office365.com +``` + +On success the last log line will report something like: + +``` +reply: retcode (235); Msg: b'2.7.0 Authentication successful' +``` + # exim 4 Exim is a long standing UNIX mail system that is fully featured. exim's flexible @@ -64,3 +79,28 @@ making the adjustments noted. In this mode /usr/bin/sendmail will be fully functional for outbound mail and if multiple accounts are required, it will automatically choose the account to send mail through based on the Envelope From header. + +# msmtp + +msmtp is a small program that pretends to be sendmail and immeditately sends +the message to the configured server. Newer versions have the ability to call +out to an external program to get an OAUTH token. An [example +configuration](example-msmtp.conf) is provided showing how to connect it to +CMS. + +Support for gmail requires msmtp 1.8.4, and support for O365 requires a +[patch](msmtp-xoauth2.patch). + +# git send-email + +There is currently no native support for XOAUTH2. When one of the above two +methods is used to setup a local sendmail, then use this .git_config: + +``` +[sendemail] + smtpserver = /usr/bin/msmtp + from = User Name <user@domain.com> + envelopeSender = User Name <user@domain.com> + assume8bitEncoding = UTF-8 + transferEncoding = auto +``` |