]> diplodocus.org Git - nmh/blob - man/msgchk.man
7669f7a15e38386f6fc6d516c8f000c13d97df20
[nmh] / man / msgchk.man
1 .TH MSGCHK %manext1% 2016-11-02 "%nmhversion%"
2 .
3 .\" %nmhwarning%
4 .
5 .SH NAME
6 msgchk \- nmh's check for incoming email
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B msgchk
11 .RB [ \-help ]
12 .RB [ \-version ]
13 .RB [ \-date " | " \-nodate ]
14 .RB [ \-notify
15 all/mail/nomail ]
16 .RB [ \-nonotify
17 all/mail/nomail ]
18 .RB [ \-host
19 .IR hostname ]
20 .RB [ \-user
21 .IR username ]
22 .RB [ \-sasl " | " \-nosasl ]
23 .RB [ \-saslmech
24 .IR mechanism ]
25 .RB [ \-tls ]
26 .RB [ \-initialtls ]
27 .RB [ \-notls ]
28 .RB [ \-certverify " | " \-nocertverify ]
29 .RB [ \-authservice
30 .IR service ]
31 .RB [ \-snoop ]
32 .RI [ users
33 \&... ]
34 .ad
35 .SH DESCRIPTION
36 The
37 .B msgchk
38 program checks all known mail drops for mail waiting
39 for you. For those drops which have mail for you,
40 .B msgchk
41 will
42 indicate if it believes that you have seen the mail in question before.
43 .PP
44 The
45 .B \-notify
46 .I type
47 switch indicates under what circumstances
48 .B msgchk
49 should produce a message. The default is
50 .B \-notify
51 .I all
52 which says that
53 .B msgchk
54 should always report the status of the
55 users mail drop. Other values for `type' include `mail' which says that
56 .B msgchk
57 should report the status of waiting mail; and, `nomail'
58 which says that
59 .B msgchk
60 should report the status of empty mail drops.
61 The
62 .B \-nonotify
63 .I type
64 switch has the inverted sense, so
65 .B \-nonotify
66 .I all
67 directs
68 .B msgchk
69 to never report the status of
70 mail drops. This is useful if the user wishes to check
71 .BR msgchk 's
72 exit status. A non-zero exit status indicates that mail was
73 .I not
74 waiting for at least one of the indicated users.
75 .PP
76 If
77 .B msgchk
78 produces output, then the
79 .B \-date
80 switch directs
81 .B msgchk
82 to print out the last date mail was read, if this can
83 be determined.
84 .SS "Using POP"
85 .B msgchk
86 will normally check all the local mail drops, but if
87 the option \*(lqpophost:\*(rq is set in the mts configuration file
88 \*(lqmts.conf\*(rq, or if the
89 .B \-host
90 .I hostname
91 switch is given,
92 .B msgchk
93 will query this POP service host as to the status of
94 mail waiting.
95 .PP
96 To specify a username for authentication with the POP server, use the
97 .B \-user
98 .I username
99 switch. The credentials profile entry in
100 .IR mh\-profile (5)
101 describes the ways to supply a username and password.
102 .PP
103 For debugging purposes, there is also a switch
104 .BR \-snoop ,
105 which will
106 allow you to watch the POP transaction take place between you and the
107 POP server. If
108 .B \-sasl \-saslmech xoauth2
109 is used, the HTTP transaction is also shown.
110 .PP
111 If
112 .B nmh
113 has been compiled with SASL support, the
114 .B \-sasl
115 switch will enable
116 the use of SASL authentication. Depending on the SASL mechanism used, this
117 may require an additional password prompt from the user (but the
118 .I netrc
119 file can be used to store this password, as described in
120 .IR mh-profile (5).
121 The
122 .B \-saslmech
123 switch can be used to select a particular SASL mechanism.
124 .PP
125 If SASL authentication is successful,
126 .B msgchk
127 will attempt to negotiate
128 a security layer for session encryption. Encrypted traffic is labelled
129 with `(encrypted)' and `(decrypted)' when viewing the POP transaction
130 with the
131 .B \-snoop
132 switch; see
133 .IR post (8)'s
134 description of
135 .B \-snoop
136 for its other features.
137 .PP
138 If
139 .B nmh
140 has been compiled with OAuth support, the
141 .B \-sasl \-saslmech xoauth2
142 switch will enable OAuth authentication. The
143 .B \-user
144 switch must be used, and the
145 .I user-name
146 must be an email address the user has for the service, which must
147 be specified with the
148 .B \-authservice
149 .I service
150 switch. Before using this, the user must authorize nmh by running
151 .B mhlogin
152 and grant authorization to that account. See
153 .IR mhlogin (1)
154 for more details.
155 .PP
156 If
157 .B nmh
158 has been compiled with TLS support, the
159 .B \-tls
160 and
161 .B \-initialtls
162 switches will require the negotiation of TLS when connecting
163 to the remote POP server. The
164 .B \-tls
165 switch will negotiate TLS as part of the normal POP protocol using
166 the STLS command. The
167 .B \-initialtls
168 switch will negotiate TLS immediately after the connection has taken place,
169 before any POP commands are sent or received. Data encrypted by TLS is
170 labeled `(tls-encrypted)' and `(tls-decrypted)' with viewing the POP
171 transaction with the
172 .B \-snoop
173 switch. The
174 .B \-notls
175 switch will disable all attempts to negotiate TLS.
176 .PP
177 When using TLS the default is to verify the remote certificate and SubjectName
178 against the local trusted certificate store. This can be controlled by
179 the
180 .B \-certverify
181 and
182 .B \-nocertverify
183 switches. See your OpenSSL documentation for more information on certificate
184 verification.
185 .SH FILES
186 .fc ^ ~
187 .nf
188 .ta \w'%nmhetcdir%/ExtraBigFileName 'u
189 ^$HOME/.mh_profile~^The user profile
190 ^%nmhetcdir%/mts.conf~^nmh mts configuration file
191 ^%mailspool%/$USER~^Location of mail drop
192 .fi
193 .SH "PROFILE COMPONENTS"
194 .fc ^ ~
195 .nf
196 .ta 2.4i
197 .ta \w'ExtraBigProfileName 'u
198 None
199 .fi
200 .SH "SEE ALSO"
201 .IR inc (1),
202 .IR mh\-mail (5),
203 .IR post (8)
204 .SH DEFAULTS
205 .nf
206 .RB ` user "' defaults to the current user"
207 .RB ` \-date '
208 .RB ` "\-notify\ all" '
209 .fi
210 .SH CONTEXT
211 None