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