Added support for optional Content_Disposition header in mhbuild directive.s
[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 .na
11 .B msgchk
12 .RB [ \-date " | " \-nodate ]
13 .RB [ \-notify
14 all/mail/nomail ]
15 .RB [ \-nonotify
16 all/mail/nomail ]
17 %nmhbeginpop%
18 .RB [ \-host
19 .IR hostname ]
20 .RB [ \-user
21 .IR username ]
22 .RB [ \-apop " | " \-noapop ]
23 .RB [ \-kpop ]
24 .RB [ \-sasl ]
25 .RB [ \-saslmech
26 .IR mechanism ]
27 .RB [ \-snoop ]
28 %nmhendpop%
29 .RI [ users
30 ... ]
31 .RB [ \-version ]
32 .RB [ \-help ]
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 %nmhbeginpop%
84  
85 .SS "Using POP"
86 .B msgchk
87 will normally check all the local mail drops, but if
88 the option \*(lqpophost:\*(rq is set in the mts configuration file
89 \*(lqmts.conf\*(rq, or if the
90 .B \-host
91 .I hostname
92 switch is given,
93 .B msgchk
94 will query this POP service host as to the status of
95 mail waiting.
96 .PP
97 The default is for
98 .B msgchk
99 to assume that your account name
100 on the POP server is the same as your current username.  To specify
101 a different username, use the `\-user\ username' switch.
102 .PP
103 When using POP, you will normally need to type the password for
104 your account on the POP server, in order to retrieve your messages.
105 It is possible to automate this process by creating a
106 .RI \*(lq \&.netrc \*(rq
107 file containing your login account information for this POP server.
108 For each POP server, this file should have a line of the following
109 form.  Replace the words
110 .IR mypopserver ,
111 .IR mylogin ,
112 and
113 .I mypassword
114 with
115 your own account information.
116 .PP
117 .RS 5
118 machine
119 .I mypopserver
120 login
121 .I mylogin
122 password
123 .I mypassword
124 .RE
125 .PP
126 This
127 .RI \*(lq \&.netrc \*(rq
128 file should be owned and readable only by you.
129 .PP
130 For debugging purposes, there is also a switch
131 .BR \-snoop ,
132 which will
133 allow you to watch the POP transaction take place between you and the
134 POP server.
135 .PP
136 If
137 .B nmh
138 has been compiled with APOP support, the
139 .B \-apop
140 switch will cause
141 .B msgchk
142 to use APOP rather than standard POP3 authentication.  Under APOP,
143 a unique string (generally of the format
144 .RI < pid . timestamp @ hostname >)
145 is announced by the POP server.
146 Rather than `USER
147 .IR user ',
148 `PASS
149 .IR password ',
150 .B msgchk
151 sends `APOP
152 .I user
153 .IR digest ',
154 where digest is the MD5 hash of the unique string
155 followed by a `secret' shared by client and server, essentially equivalent to
156 the user's password (though an APOP-enabled POP3 server could have separate APOP
157 and plain POP3 passwords for a single user). 
158 .B \-noapop
159 disables APOP in cases
160 where it'd otherwise be used.
161 .PP
162 If
163 .B nmh
164 has been compiled with KPOP support, the
165 .B \-kpop
166 switch will allow
167 .B msgchk
168 to use Kerberized POP rather than standard POP3 on a given
169 invocation.  If
170 .B POPSERVICE
171 was also #defined to "kpop",
172 .B msgchk
173 will be
174 hardwired to always use KPOP.
175 .PP
176 If
177 .B nmh
178 has been compiled with SASL support, the
179 .B \-sasl
180 switch will enable
181 the use of SASL authentication.  Depending on the SASL mechanism used, this
182 may require an additional password prompt from the user (but the
183 .RI \*(lq \&.netrc \*(rq
184 file can be used to store this password).  The
185 .B \-saslmech
186 switch can be used to select a particular SASL mechanism.
187 .PP
188 If SASL authentication is successful,
189 .B inc
190 will attempt to negotiate
191 a security layer for session encryption.  Encrypted traffic is labelled
192 with `(encrypted)' and `(decrypted)' when viewing the POP transaction
193 with the
194 .B \-snoop
195 switch.
196 %nmhendpop%
197
198 .SH FILES
199 .fc ^ ~
200 .nf
201 .ta \w'%etcdir%/ExtraBigFileName  'u
202 ^$HOME/\&.mh\(ruprofile~^The user profile
203 ^%etcdir%/mts.conf~^nmh mts configuration file
204 ^%mailspool%/$USER~^Location of mail drop
205 .fi
206
207 .SH "PROFILE COMPONENTS"
208 .fc ^ ~
209 .nf
210 .ta 2.4i
211 .ta \w'ExtraBigProfileName  'u
212 None
213 .fi
214
215 .SH "SEE ALSO"
216 inc(1)
217
218 .SH DEFAULTS
219 .nf
220 .RB ` user "' defaults to the current user"
221 .RB ` \-date '
222 .RB ` "\-notify\ all" '
223 .fi
224
225 .SH CONTEXT
226 None