]> diplodocus.org Git - nmh/blob - man/msgchk.man
Fix tests with oauth disabled.
[nmh] / man / msgchk.man
1 .TH MSGCHK %manext1% "March 23, 2016" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
5 .SH NAME
6 msgchk \- check for messages
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B msgchk
11 .RB [ \-date " | " \-nodate ]
12 .RB [ \-notify
13 all/mail/nomail ]
14 .RB [ \-nonotify
15 all/mail/nomail ]
16 .RB [ \-host
17 .IR hostname ]
18 .RB [ \-user
19 .IR username ]
20 .RB [ \-sasl ]
21 .RB [ \-saslmech
22 .IR mechanism ]
23 .RB [ \-authservice
24 .IR service ]
25 .RB [ \-snoop ]
26 .RI [ users
27 \&... ]
28 .RB [ \-version ]
29 .RB [ \-help ]
30 .ad
31 .SH DESCRIPTION
32 The
33 .B msgchk
34 program checks all known mail drops for mail waiting
35 for you. For those drops which have mail for you,
36 .B msgchk
37 will
38 indicate if it believes that you have seen the mail in question before.
39 .PP
40 The
41 .B \-notify
42 .I type
43 switch indicates under what circumstances
44 .B msgchk
45 should produce a message. The default is
46 .B \-notify
47 .I all
48 which says that
49 .B msgchk
50 should always report the status of the
51 users maildrop. Other values for `type' include `mail' which says that
52 .B msgchk
53 should report the status of waiting mail; and, `nomail'
54 which says that
55 .B msgchk
56 should report the status of empty maildrops.
57 The
58 .B \-nonotify
59 .I type
60 switch has the inverted sense, so
61 .B \-nonotify
62 .I all
63 directs
64 .B msgchk
65 to never report the status of
66 maildrops. This is useful if the user wishes to check
67 .BR msgchk 's
68 exit status. A non\-zero exit status indicates that mail was
69 .B not
70 waiting for at least one of the indicated users.
71 .PP
72 If
73 .B msgchk
74 produces output, then the
75 .B \-date
76 switch directs
77 .B msgchk
78 to print out the last date mail was read, if this can
79 be determined.
80 .SS "Using POP"
81 .B msgchk
82 will normally check all the local mail drops, but if
83 the option \*(lqpophost:\*(rq is set in the mts configuration file
84 \*(lqmts.conf\*(rq, or if the
85 .B \-host
86 .I hostname
87 switch is given,
88 .B msgchk
89 will query this POP service host as to the status of
90 mail waiting.
91 .PP
92 To specify a username for authentication with the POP server, use the
93 .B \-user
94 .I username
95 switch. The credentials profile entry in the mh\-profile(5) man page
96 describes the ways to supply a username and password.
97 .PP
98 For debugging purposes, there is also a switch
99 .BR \-snoop ,
100 which will
101 allow you to watch the POP transaction take place between you and the
102 POP server. If
103 .B \-saslmech xoauth2
104 is used, the HTTP transaction is also shown.
105 .PP
106 If
107 .B nmh
108 has been compiled with SASL support, the
109 .B \-sasl
110 switch will enable
111 the use of SASL authentication. Depending on the SASL mechanism used, this
112 may require an additional password prompt from the user (but the
113 .I netrc
114 file can be used to store this password, as described in the
115 mh-profile(5) man page). The
116 .B \-saslmech
117 switch can be used to select a particular SASL mechanism.
118 .PP
119 If SASL authentication is successful,
120 .B msgchk
121 will attempt to negotiate
122 a security layer for session encryption. Encrypted traffic is labelled
123 with `(encrypted)' and `(decrypted)' when viewing the POP transaction
124 with the
125 .B \-snoop
126 switch.
127 .PP
128 If
129 .B nmh
130 has been compiled with OAuth support, the
131 .B \-saslmech xoauth2
132 switch will enable OAuth authentication. The
133 .B \-user
134 switch must be used, and the
135 .I user-name
136 must be an email address the user has for the service, which must
137 be specified with the
138 .B \-authservice
139 .I service
140 switch. Before using this, the user must authorize nmh by running
141 .B mhlogin
142 and grant authorization to that account. See the
143 .B mhlogin
144 man page for more details.
145 .PP
146 Gmail only supports POP3 over TLS, but
147 .B msgchk
148 has no TLS support. To work around this, use something like
149 .B -proxy 'openssl s_client -connect %h:995 -CAfile /etc/ssl/certs/ca-certificates.crt -quiet'
150 .SH FILES
151 .fc ^ ~
152 .nf
153 .ta \w'%nmhetcdir%/ExtraBigFileName 'u
154 ^$HOME/\&.mh\(ruprofile~^The user profile
155 ^%nmhetcdir%/mts.conf~^nmh mts configuration file
156 ^%mailspool%/$USER~^Location of mail drop
157 .fi
158 .SH "PROFILE COMPONENTS"
159 .fc ^ ~
160 .nf
161 .ta 2.4i
162 .ta \w'ExtraBigProfileName 'u
163 None
164 .fi
165 .SH "SEE ALSO"
166 .IR inc (1),
167 .IR mh\-mail (5)
168 .SH DEFAULTS
169 .nf
170 .RB ` user "' defaults to the current user"
171 .RB ` \-date '
172 .RB ` "\-notify\ all" '
173 .fi
174 .SH CONTEXT
175 None