]> diplodocus.org Git - nmh/blobdiff - man/mhlogin.man
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
[nmh] / man / mhlogin.man
index 083c98aeaf9cb4faf7d4334c25eb969a0f62b65f..114340008757bdc8144544734f69e14b33d025af 100644 (file)
@@ -1,25 +1,31 @@
 .\"
 .\" %nmhwarning%
 .\"
-.TH SEND %manext1% "March 23, 2016" "%nmhversion%"
+.TH MHLOGIN %manext1% "October 10, 2016" "%nmhversion%"
 .SH NAME
 mhlogin \- login to external (OAuth) services
 .SH SYNOPSIS
 .HP 5
 .na
 .B mhlogin
+.RB [ \-help ]
+.RB [ \-version ]
+.RB [ \-user
+.IR username ]
 .RB [ \-saslmech
 .IR mechanism ]
 .RB [ \-authservice
 .IR service ]
+.RB [ \-browser
+.IR command ]
 .RB [ \-snoop ]
-.RB [ \-version ]
-.RB [ \-help ]
 .ad
 .SH DESCRIPTION
 .B Mhlogin
 currently only supports OAuth for Gmail.  Run
 .B mhlogin
+.B \-user
+.I username
 .B \-saslmech xoauth2
 .B \-authservice
 .I gmail
@@ -30,6 +36,17 @@ prompt.  Be sure to use the same account with the
 .B -user
 switch to
 .BR send .
+See the EXAMPLES section below for an example.
+.PP
+The
+.B \-browser
+switch causes
+.B mhlogin
+to load the URL directly into a new browser session.  The command argument
+must include the browser invocation name, and can include any browser arguments
+in the
+.B \-browser
+argument string, e.g., 'google-chrome --new-window'.
 .PP
 The
 .B \-snoop
@@ -46,6 +63,29 @@ which specifies where
 should write credentials and where
 .B send
 should read them.
+.SH "EXAMPLES"
+.PP
+.SS Gmail
+First, login to the Gmail account that you want to use, e.g, user@example.com,
+using a web browser.
+Then, enter a
+.B mhlogin
+command such as:
+.PP
+.RS
+.nf
+mhlogin -user user@example.com -saslmech xoauth2 -authservice gmail \
+-browser 'google-chrome --new-window'
+.fi
+.RE
+.PP
+The
+.I username
+should be a complete email address.
+Respond to the prompt in the browser window, then copy and paste the
+authorization code in response to the
+.B mhlogin
+prompt.
 .SH "PROFILE COMPONENTS"
 .fc ^ ~
 .nf
@@ -61,3 +101,7 @@ should read them.
 .fi
 .SH "SEE ALSO"
 .IR send (1)
+.SH DEFAULTS
+.nf
+.RB ` \-saslmech "' xoauth2"
+.fi