7c8bf719c851c92c724d0d8d3f20a4de903d3633
[mmh] / man / msgchk.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH MSGCHK %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 msgchk \- check for messages
8 .SH SYNOPSIS
9 .HP 5
10 .B msgchk
11 .RB [ \-date " | " \-nodate ]
12 .RB [ \-notify
13 all/mail/nomail ]
14 .RB [ \-nonotify
15 all/mail/nomail ]
16 %nmhbeginpop%
17 .RB [ \-host
18 .IR hostname ]
19 .RB [ \-user
20 .IR username ]
21 .RB [ \-apop " | " \-noapop ]
22 .RB [ \-kpop ]
23 .RB [ \-sasl ]
24 .RB [ \-saslmech
25 .IR mechanism ]
26 .RB [ \-snoop ]
27 %nmhendpop%
28 .RI [ users
29 ... ]
30 .RB [ \-version ]
31 .RB [ \-help ]
32 .SH DESCRIPTION
33 The
34 .B msgchk
35 program checks all known mail drops for mail waiting
36 for you.  For those drops which have mail for you,
37 .B msgchk
38 will
39 indicate if it believes that you have seen the mail in question before.
40 .PP
41 The
42 .B \-notify
43 .I type
44 switch indicates under what circumstances
45 .B msgchk
46 should produce a message.  The default is
47 .B \-notify
48 .I all
49 which says that
50 .B msgchk
51 should always report the status of the
52 users maildrop.  Other values for `type' include `mail' which says that
53 .B msgchk
54 should report the status of waiting mail; and, `nomail'
55 which says that
56 .B msgchk
57 should report the status of empty maildrops.
58 The
59 .B \-nonotify
60 .I type
61 switch has the inverted sense, so
62 .B \-nonotify
63 .I all
64 directs
65 .B msgchk
66 to never report the status of
67 maildrops.  This is useful if the user wishes to check
68 .BR msgchk 's
69 exit status.  A non\-zero exit status indicates that mail was
70 .B not
71 waiting for at least one of the indicated users.
72 .PP
73 If
74 .B msgchk
75 produces output, then the
76 .B \-date
77 switch directs
78 .B msgchk
79 to print out the last date mail was read, if this can
80 be determined.
81 %nmhbeginpop%
82  
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 The default is for
96 .B msgchk
97 to assume that your account name
98 on the POP server is the same as your current username.  To specify
99 a different username, use the `\-user\ username' switch.
100 .PP
101 When using POP, you will normally need to type the password for
102 your account on the POP server, in order to retrieve your messages.
103 It is possible to automate this process by creating a
104 .RI \*(lq \&.netrc \*(rq
105 file containing your login account information for this POP server.
106 For each POP server, this file should have a line of the following
107 form.  Replace the words
108 .IR mypopserver ,
109 .IR mylogin ,
110 and
111 .I mypassword
112 with
113 your own account information.
114 .PP
115 .RS 5
116 machine
117 .I mypopserver
118 login
119 .I mylogin
120 password
121 .I mypassword
122 .RE
123 .PP
124 This
125 .RI \*(lq \&.netrc \*(rq
126 file should be owned and readable only by you.
127 .PP
128 For debugging purposes, there is also a switch
129 .BR \-snoop ,
130 which will
131 allow you to watch the POP transaction take place between you and the
132 POP server.
133 .PP
134 If
135 .B nmh
136 has been compiled with APOP support, the
137 .B \-apop
138 switch will cause
139 .B msgchk
140 to use APOP rather than standard POP3 authentication.  Under APOP,
141 a unique string (generally of the format
142 .RI < pid . timestamp @ hostname >)
143 is announced by the POP server.
144 Rather than `USER
145 .IR user ',
146 `PASS
147 .IR password ',
148 .B msgchk
149 sends `APOP
150 .I user
151 .IR digest ',
152 where digest is the MD5 hash of the unique string
153 followed by a `secret' shared by client and server, essentially equivalent to
154 the user's password (though an APOP-enabled POP3 server could have separate APOP
155 and plain POP3 passwords for a single user). 
156 .B \-noapop
157 disables APOP in cases
158 where it'd otherwise be used.
159 .PP
160 If
161 .B nmh
162 has been compiled with KPOP support, the
163 .B \-kpop
164 switch will allow
165 .B msgchk
166 to use Kerberized POP rather than standard POP3 on a given
167 invocation.  If
168 .B POPSERVICE
169 was also #defined to "kpop",
170 .B msgchk
171 will be
172 hardwired to always use KPOP.
173 .PP
174 If
175 .B nmh
176 has been compiled with SASL support, the
177 .B \-sasl
178 switch will enable
179 the use of SASL authentication.  Depending on the SASL mechanism used, this
180 may require an additional password prompt from the user (but the
181 .RI \*(lq \&.netrc \*(rq
182 file can be used to store this password).  The
183 .B \-saslmech
184 switch can be used to select a particular SASL mechanism.
185 .PP
186 If SASL authentication is successful,
187 .B inc
188 will attempt to negotiate
189 a security layer for session encryption.  Encrypted traffic is labelled
190 with `(encrypted)' and `(decrypted)' when viewing the POP transaction
191 with the
192 .B \-snoop
193 switch.
194 %nmhendpop%
195
196 .SH FILES
197 .fc ^ ~
198 .nf
199 .ta \w'/usr/local/nmh/etc/ExtraBigFileName  'u
200 ^$HOME/\&.mh\(ruprofile~^The user profile
201 ^%etcdir%/mts.conf~^nmh mts configuration file
202 ^%mailspool%/$USER~^Location of mail drop
203 .fi
204
205 .SH "PROFILE COMPONENTS"
206 .fc ^ ~
207 .nf
208 .ta 2.4i
209 .ta \w'ExtraBigProfileName  'u
210 None
211 .fi
212
213 .SH "SEE ALSO"
214 inc(1)
215
216 .SH DEFAULTS
217 .nf
218 .RB ` user "' defaults to the current user"
219 .RB ` \-date '
220 .RB ` "\-notify\ all" '
221 .fi
222
223 .SH CONTEXT
224 None