]> diplodocus.org Git - nmh/blob - man/mhlogin.man
Fixed typo (NOTLSSW).
[nmh] / man / mhlogin.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH MHLOGIN %manext1% "April 10, 2016" "%nmhversion%"
5 .SH NAME
6 mhlogin \- login to external (OAuth) services
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B mhlogin
11 .RB [ \-user
12 .IR username ]
13 .RB [ \-saslmech
14 .IR mechanism ]
15 .RB [ \-authservice
16 .IR service ]
17 .RB [ \-browser
18 .IR command ]
19 .RB [ \-snoop ]
20 .RB [ \-version ]
21 .RB [ \-help ]
22 .ad
23 .SH DESCRIPTION
24 .B Mhlogin
25 currently only supports OAuth for Gmail. Run
26 .B mhlogin
27 .B \-user
28 .I username
29 .B \-saslmech xoauth2
30 .B \-authservice
31 .I gmail
32 and load the printed URL in your browser. Login to a Gmail account, grant
33 authorization, and copy and paste the code into the
34 .B mhlogin
35 prompt. Be sure to use the same account with the
36 .B -user
37 switch to
38 .BR send .
39 .PP
40 The
41 .B \-browser
42 switch causes
43 .B mhlogin
44 to load the URL directly into a new browser session. The command argument
45 must include the browser invocation name, and can include any browser arguments
46 in the
47 .B \-browser
48 argument string, e.g., 'google-chrome --new-window'.
49 .PP
50 The
51 .B \-snoop
52 switch can be used to view the HTTP transaction.
53 .PP
54 All parameters configuring the service may be overridden by profile components,
55 and even though only Gmail is supported out of the box, the user can define
56 new services entirely in the profile. Profile components are prefixed by
57 .IR oauth-service- ,
58 for example,
59 .I oauth-gmail-credential-file
60 which specifies where
61 .B mhlogin
62 should write credentials and where
63 .B send
64 should read them.
65 .SH "PROFILE COMPONENTS"
66 .fc ^ ~
67 .nf
68 .ta 2.4i
69 .ta \w'ExtraBigProfileName 'u
70 ^oauth-gmail-credential-file:~^oauth-gmail
71 ^oauth-gmail-client_id:~^nmh project client_id
72 ^oauth-gmail-client_secret:~^nmh project client_secret
73 ^oauth-gmail-auth_endpoint:~^https://accounts.google.com/o/oauth2/auth
74 ^oauth-gmail-redirect_uri:~^urn:ietf:wg:oauth:2.0:oob
75 ^oauth-gmail-token_endpoint:~^https://accounts.google.com/o/oauth2/token
76 ^oauth-gmail-scope:~^https://mail.google.com/
77 .fi
78 .SH "SEE ALSO"
79 .IR send (1)
80 .SH DEFAULTS
81 .nf
82 .RB ` \-saslmech "' xoauth2"
83 .fi