1MSGCHK(1) General Commands Manual MSGCHK(1)
2
3
4
6 msgchk - nmh's check for incoming email
7
9 msgchk [-help] [-version] [-date | -nodate] [-notify all/mail/nomail ]
10 [-nonotify all/mail/nomail ] [-host hostname] [-port portname/num‐
11 ber] [-user username] [-sasl | -nosasl] [-saslmech mechanism]
12 [-tls] [-initialtls] [-notls] [-certverify | -nocertverify]
13 [-authservice service] [-snoop] [users ... ]
14
16 The msgchk program checks all known mail drops for mail waiting for
17 you. For those drops which have mail for you, msgchk will indicate if
18 it believes that you have seen the mail in question before.
19
20 The -notify type switch indicates under what circumstances msgchk
21 should produce a message. The default is -notify all which says that
22 msgchk should always report the status of the users mail drop. Other
23 values for `type' include `mail' which says that msgchk should report
24 the status of waiting mail; and, `nomail' which says that msgchk should
25 report the status of empty mail drops. The -nonotify type switch has
26 the inverted sense, so -nonotify all directs msgchk to never report the
27 status of mail drops. This is useful if the user wishes to check ms‐
28 gchk's exit status. A non-zero exit status indicates that mail was not
29 waiting for at least one of the indicated users.
30
31 If msgchk produces output, then the -date switch directs msgchk to
32 print out the last date mail was read, if this can be determined.
33
34 Using POP
35 msgchk will normally check all the local mail drops, but if the option
36 “pophost:” is set in the mts configuration file “mts.conf”, or if the
37 -host hostname switch is given, msgchk will query this POP service host
38 as to the status of mail waiting. The -port switch specifies the port
39 name or number used to connect to the POP server. If unspecified, the
40 default is “pop3”.
41
42 To specify a username for authentication with the POP server, use the
43 -user username switch. The credentials profile entry in mh-profile(5)
44 describes the ways to supply a username and password.
45
46 For debugging purposes, there is also a switch -snoop, which will allow
47 you to watch the POP transaction take place between you and the POP
48 server. If -sasl -saslmech xoauth2 is used, the HTTP transaction is
49 also shown.
50
51 If nmh has been compiled with SASL support, the -sasl switch will en‐
52 able the use of SASL authentication. Depending on the SASL mechanism
53 used, this may require an additional password prompt from the user (but
54 the netrc file can be used to store this password, as described in mh-
55 profile(5). The -saslmech switch can be used to select a particular
56 SASL mechanism.
57
58 If SASL authentication is successful, msgchk will attempt to negotiate
59 a security layer for session encryption. Encrypted traffic is labelled
60 with `(encrypted)' and `(decrypted)' when viewing the POP transaction
61 with the -snoop switch; see post(8)'s description of -snoop for its
62 other features.
63
64 If nmh has been compiled with OAuth support, the -sasl -saslmech
65 xoauth2 switch will enable OAuth authentication. The -user switch must
66 be used, and the user-name must be an email address the user has for
67 the service, which must be specified with the -authservice service
68 switch. Before using this, the user must authorize nmh by running
69 mhlogin and grant authorization to that account. See mhlogin(1) for
70 more details.
71
72 If nmh has been compiled with TLS support, the -tls and -initialtls
73 switches will require the negotiation of TLS when connecting to the re‐
74 mote POP server. The -tls switch will negotiate TLS as part of the
75 normal POP protocol using the STLS command. The -initialtls switch
76 will negotiate TLS immediately after the connection has taken place,
77 before any POP commands are sent or received. Data encrypted by TLS is
78 labeled `(tls-encrypted)' and `(tls-decrypted)' with viewing the POP
79 transaction with the -snoop switch. The -notls switch will disable all
80 attempts to negotiate TLS.
81
82 When using TLS the default is to verify the remote certificate and Sub‐
83 jectName against the local trusted certificate store. This can be con‐
84 trolled by the -certverify and -nocertverify switches. See your
85 OpenSSL documentation for more information on certificate verification.
86
88 $HOME/.mh_profile The user profile
89 /etc/nmh/mts.conf nmh mts configuration file
90 /var/mail/$USER Location of mail drop
91
93 None
94
96 inc(1), mh-mail(5), post(8)
97
99 `user' defaults to the current user
100 `-date'
101 `-notify all'
102
104 None
105
106
107
108nmh-1.8 2016-11-02 MSGCHK(1)