]> diplodocus.org Git - nmh/blob - man/mhlogin.man
Changed build_nmh sasl and tls defaults to be configure's.
[nmh] / man / mhlogin.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH MHLOGIN %manext1% "October 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 [ \-help ]
12 .RB [ \-version ]
13 .RB [ \-user
14 .IR username ]
15 .RB [ \-saslmech
16 .IR mechanism ]
17 .RB [ \-authservice
18 .IR service ]
19 .RB [ \-browser
20 .IR command ]
21 .RB [ \-snoop ]
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 See the EXAMPLES section below for an example.
40 .PP
41 The
42 .B \-browser
43 switch causes
44 .B mhlogin
45 to load the URL directly into a new browser session. The command argument
46 must include the browser invocation name, and can include any browser arguments
47 in the
48 .B \-browser
49 argument string, e.g., 'google-chrome --new-window'.
50 .PP
51 The
52 .B \-snoop
53 switch can be used to view the HTTP transaction.
54 .PP
55 All parameters configuring the service may be overridden by profile components,
56 and even though only Gmail is supported out of the box, the user can define
57 new services entirely in the profile. Profile components are prefixed by
58 .IR oauth-service- ,
59 for example,
60 .I oauth-gmail-credential-file
61 which specifies where
62 .B mhlogin
63 should write credentials and where
64 .B send
65 should read them.
66 .SH "EXAMPLES"
67 .PP
68 .SS Gmail
69 First, login to the Gmail account that you want to use, e.g, user@example.com,
70 using a web browser.
71 Then, enter a
72 .B mhlogin
73 command such as:
74 .PP
75 .RS
76 .nf
77 mhlogin -user user@example.com -saslmech xoauth2 -authservice gmail \
78 -browser 'google-chrome --new-window'
79 .fi
80 .RE
81 .PP
82 The
83 .I username
84 should be a complete email address.
85 Respond to the prompt in the browser window, then copy and paste the
86 authorization code in response to the
87 .B mhlogin
88 prompt.
89 .SH "PROFILE COMPONENTS"
90 .fc ^ ~
91 .nf
92 .ta 2.4i
93 .ta \w'ExtraBigProfileName 'u
94 ^oauth-gmail-credential-file:~^oauth-gmail
95 ^oauth-gmail-client_id:~^nmh project client_id
96 ^oauth-gmail-client_secret:~^nmh project client_secret
97 ^oauth-gmail-auth_endpoint:~^https://accounts.google.com/o/oauth2/auth
98 ^oauth-gmail-redirect_uri:~^urn:ietf:wg:oauth:2.0:oob
99 ^oauth-gmail-token_endpoint:~^https://accounts.google.com/o/oauth2/token
100 ^oauth-gmail-scope:~^https://mail.google.com/
101 .fi
102 .SH "SEE ALSO"
103 .IR send (1)
104 .SH DEFAULTS
105 .nf
106 .RB ` \-saslmech "' xoauth2"
107 .fi