1MHLOGIN(1)                  General Commands Manual                 MHLOGIN(1)
2
3
4

NAME

6       mhlogin - nmh login to external (OAuth) services
7

SYNOPSIS

9       This  implementation is no longer supported but is left here for infor‐
10       mation.  That's because Google now only supports POP except with a pri‐
11       vate  client  ID.  Also, it no longer supports OOB requests to Google's
12       OAuth 2.0 authorization endpoint.
13
14       mhlogin [-help] [-version] [-user username] [-saslmech mechanism]
15            [-authservice service] [-browser command] [-snoop]
16

DESCRIPTION

18       mhlogin  currently  only  supports  OAuth for Gmail.  Run mhlogin -user
19       username -saslmech xoauth2 -authservice gmail and load the printed  URL
20       in  your  browser.   Login to a Gmail account, grant authorization, and
21       copy and paste the code into the mhlogin prompt.  Be sure  to  use  the
22       same  account  with the -user switch to send.  See the EXAMPLES section
23       below for an example.
24
25       The -browser switch causes mhlogin to load the URL directly into a  new
26       browser session.  The command argument must include the browser invoca‐
27       tion name, and can include any browser arguments in the -browser  argu‐
28       ment string, e.g., 'google-chrome --new-window'.
29
30       The -snoop switch can be used to view the HTTP transaction.
31
32       All  parameters  configuring  the  service may be overridden by profile
33       components, and even though only Gmail is supported out of the box, the
34       user  can  define new services entirely in the profile.  Profile compo‐
35       nents are prefixed by oauth-service-, for example,  oauth-gmail-creden‐
36       tial-file  which  specifies  where mhlogin should write credentials and
37       where send should read them.
38

EXAMPLES

40   Gmail
41       First, login to the Gmail account that you want to use, e.g, user@exam‐
42       ple.com, using a web browser.  Then, enter a mhlogin command such as:
43
44              mhlogin -user user@example.com -saslmech xoauth2 -authservice gmail -browser 'google-chrome --new-window'
45
46       The username should be a complete email address.  Respond to the prompt
47       in the browser window, then copy and paste the  authorization  code  in
48       response to the mhlogin prompt.
49

PROFILE COMPONENTS

51       oauth-gmail-credential-file: oauth-gmail
52       oauth-gmail-client_id:       nmh project client_id
53       oauth-gmail-client_secret:   nmh project client_secret
54       oauth-gmail-auth_endpoint:   https://accounts.google.com/o/oauth2/auth
55       oauth-gmail-redirect_uri:    urn:ietf:wg:oauth:2.0:oob
56       oauth-gmail-token_endpoint:  https://accounts.google.com/o/oauth2/token
57       oauth-gmail-scope:           https://mail.google.com/
58

SEE ALSO

60       send(1)
61

DEFAULTS

63       `-saslmech' xoauth2
64
65
66
67nmh-1.8                           2016-10-10                        MHLOGIN(1)
Impressum