]> diplodocus.org Git - nmh/blob - man/msgchk.man
vector.c: Move interface to own file.
[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 [ \-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 mail drop. 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 mail drops.
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 mail drops. 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 .I 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
99 .IR mh\-profile (5)
100 describes the ways to supply a username and password.
101 .PP
102 For debugging purposes, there is also a switch
103 .BR \-snoop ,
104 which will
105 allow you to watch the POP transaction take place between you and the
106 POP server. If
107 .B \-sasl \-saslmech xoauth2
108 is used, the HTTP transaction is also shown.
109 .PP
110 If
111 .B nmh
112 has been compiled with SASL support, the
113 .B \-sasl
114 switch will enable
115 the use of SASL authentication. Depending on the SASL mechanism used, this
116 may require an additional password prompt from the user (but the
117 .I netrc
118 file can be used to store this password, as described in
119 .IR mh-profile (5).
120 The
121 .B \-saslmech
122 switch can be used to select a particular SASL mechanism.
123 .PP
124 If SASL authentication is successful,
125 .B msgchk
126 will attempt to negotiate
127 a security layer for session encryption. Encrypted traffic is labelled
128 with `(encrypted)' and `(decrypted)' when viewing the POP transaction
129 with the
130 .B \-snoop
131 switch; see
132 .IR post (8)'s
133 description of
134 .B \-snoop
135 for its other features.
136 .PP
137 If
138 .B nmh
139 has been compiled with OAuth support, the
140 .B \-sasl \-saslmech xoauth2
141 switch will enable OAuth authentication. The
142 .B \-user
143 switch must be used, and the
144 .I user-name
145 must be an email address the user has for the service, which must
146 be specified with the
147 .B \-authservice
148 .I service
149 switch. Before using this, the user must authorize nmh by running
150 .B mhlogin
151 and grant authorization to that account. See
152 .IR mhlogin (1)
153 for more details.
154 .PP
155 If
156 .B nmh
157 has been compiled with TLS support, the
158 .B \-initialtls
159 switch will require the negotiation of TLS when connecting
160 to the remote POP server. The
161 .B \-initialtls
162 switch will negotiate TLS immediately after the connection has taken place,
163 before any POP commands are sent or received. Data encrypted by TLS is
164 labeled `(tls-encrypted)' and `(tls-decrypted)' with viewing the POP
165 transaction with the
166 .B \-snoop
167 switch. The
168 .B \-notls
169 switch will disable all attempts to negotiate TLS.
170 .PP
171 When using TLS the default is to verify the remote certificate and SubjectName
172 against the local trusted certificate store. This can be controlled by
173 the
174 .B \-certverify
175 and
176 .B \-nocertverify
177 switches. See your OpenSSL documentation for more information on certificate
178 verification.
179 .SH FILES
180 .fc ^ ~
181 .nf
182 .ta \w'%nmhetcdir%/ExtraBigFileName 'u
183 ^$HOME/.mh_profile~^The user profile
184 ^%nmhetcdir%/mts.conf~^nmh mts configuration file
185 ^%mailspool%/$USER~^Location of mail drop
186 .fi
187 .SH "PROFILE COMPONENTS"
188 .fc ^ ~
189 .nf
190 .ta 2.4i
191 .ta \w'ExtraBigProfileName 'u
192 None
193 .fi
194 .SH "SEE ALSO"
195 .IR inc (1),
196 .IR mh\-mail (5),
197 .IR post (8)
198 .SH DEFAULTS
199 .nf
200 .RB ` user "' defaults to the current user"
201 .RB ` \-date '
202 .RB ` "\-notify\ all" '
203 .fi
204 .SH CONTEXT
205 None