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