-
Notifications
You must be signed in to change notification settings - Fork 3
/
mailbox-preview.man
161 lines (161 loc) · 3.88 KB
/
mailbox-preview.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
.TH MAILBOX-PREVIEW 1 2022-12-01
.SH NAME
mailbox-preview \- list new email messages in an IMAP mailbox
.SH SYNOPSIS
.na
.B mailbox-preview
.I \fR[[\fPserver\fR][\fP:mailbox\fR]]\fP
[ \fI\-\-option\fP ... ]
.br
.B mailbox-preview
.I mail_spool_file_name
[ \fI\-\-option\fP ... ]
.br
.B mailbox-preview
.I \fR[[\fPserver\fR][\fP:mailbox\fR]]\fP
.B \-\-check
.I oldsize
[ \fI\-\-option\fP ... ]
.br
.B mailbox-preview
.I mail_spool_file_name
.B \-\-check
.I oldsize
[ \fI\-\-option\fP ... ]
.ad
.SH DESCRIPTION
The
.B mailbox-preview
program reads an IMAP mailbox and uses
.BR scan (1)
to display a summary, one line per new message.
It can be used stand-alone on the command line or as the back-end
of a graphical, literate new-mail notification program such as
.BR xlbiff (1).
.PP
The optional first argument is an optional name of an IMAP server
(default \*(lqimap\*(rq), optionally followed by a colon and a mailbox name
(default \*(lqinbox\*(rq).
Unless the default name
.I imap
resolves on your
network to the name of your IMAP server, you will need this argument.
It is likely that the default mailbox name
.I inbox
will work for you.
.PP
Your
.I ~/.netrc
file is consulted for the login and password for the IMAP server.
See the FILES section, below, for the format of this file.
.PP
If the first argument to
.B mailbox-preview
is instead the name of a file under a
top-level directory that exists, it is treated as the name of a
local mail drop, and that file is used instead of doing IMAP.
.PP
With
.BR \-\-check ,
the program conforms to the
.I checkCommand
protocol of
.BR xlbiff (1).
The output is the new mailbox size to pass next time as the argument to
.BR \-\-check .
(The contents of the mailbox are not output.)
The exit value of the program describes how the mailbox size has
changed, as documented under the
.B \-checkCommand
option in
.BR xlbiff (1).
.SH OPTIONS
.TP 8
\fB\-\-check\fP \fIold_size\fP
Check for mailbox change instead of scanning; see
the description above and
.BR xlbiff (1).
.TP 8
\fB\-\-width\fP \fIN\fP
Width in characters to pass to
.IR scan ;
default is $COLUMNS (from the environment).
.TP 8
\fB\-\-max\-messages\fP \fIN\fP
Display only the last \fIN\fP (default 20) new messages; 0 to display all.
.TP 8
\fB\-\-form\fP \fIfile\fP
Format file for
.BR scan ;
see
.BR mh-format (5).
Default is
.I xlbiff.form
.TP 8
\fB\-\-scanproc\fP \fIprogram\fP
Filename of the
program to pipe the messages through; default
.IR /usr/bin/mh/scan .
If set explicitly to an empty string, the messages will be
output raw (which is probably useful only for debugging).
.TP 8
.B \-\-quiet
Do not output the messages. This option is probably useful only for debugging.
.TP 8
.B \-\-client\-preview
Do not request a short message preview from the IMAP server and
instead create our own short form of the message.
Use this option if you don't like the preview your IMAP server generates.
It has no effect unless the IMAP server advertises a preview capability.
.TP 8
\fB\-\-imap-debug\fP \fIlevel\fP
Set the
.I imaplib
debug level; level 4 displays the IMAP protocol messages,
level 5 also displays IMAP literal strings.
.SH FILES
.TP 8
.I ~/.netrc
Login information for your IMAP server.
If your IMAP server requires a password, supply it on a
.I machine
line matching the IMAP server name, for example
.IP
.RS 12
.ft C
.nf
machine \fIserver_name\fP login \fIaccount_name\fP password \fIyour_pw\fP
.fi
.ft
.RE
.IP
If \*(lqlogin \fIaccount_name\fP\*(rq is omitted,
.I account_name
defaults to your user name.
.SH "BUGS REPORTS"
When reporting interoperability problems with an IMAP server,
include the output of
.PP
.RS 2
.ft C
.nf
mailbox\-preview \fIsrvr\fP \-\-imap\-debug=4 \-\-quiet 2>&1 | grep \-v " LOGIN "
.fi
.ft
.RE
.SH EXAMPLE
Example command lines:
.PP
.RS 4
.ft C
.nf
mailbox\-preview imap.example.com
mailbox\-preview imap.example.com \-\-check 12
.fi
.ft
.RE
.SH AUTHOR
Stephen Gildea, November 2021
.SH "SEE ALSO"
.BR xlbiff (1),
.BR scan (1)