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