Debian Codegraph @

upstream/debian-unstable/man1/maildirwatch.1

raw
1 '\" t
2 .\"<!-- Copyright 2021 Double Precision, Inc. See COPYING for -->
3 .\"<!-- distribution information. -->
4 .\" Title: maildirwatch
5 .\" Author: Sam Varshavchik
6 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
7 .\" Date: 02/18/2021
8 .\" Manual: Double Precision, Inc.
9 .\" Source: Courier Mail Server
10 .\" Language: English
11 .\"
12 .TH "MAILDIRWATCH" "1" "02/18/2021" "Courier Mail Server" "Double Precision, Inc\&."
13 .\" -----------------------------------------------------------------
14 .\" * Define some portability stuff
15 .\" -----------------------------------------------------------------
16 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 .\" http://bugs.debian.org/507673
18 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
19 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .ie \n(.g .ds Aq \(aq
21 .el .ds Aq '
22 .\" -----------------------------------------------------------------
23 .\" * set default formatting
24 .\" -----------------------------------------------------------------
25 .\" disable hyphenation
26 .nh
27 .\" disable justification (adjust text to left margin only)
28 .ad l
29 .\" -----------------------------------------------------------------
30 .\" * MAIN CONTENT STARTS HERE *
31 .\" -----------------------------------------------------------------
32 .SH "NAME"
33 maildirwatch \- wait for changes to a maildir
34 .SH "SYNOPSIS"
35 .HP \w'\fBmaildirwatch\fR\ 'u
36 \fBmaildirwatch\fR {\fImaildir\fR} {\fIcommand\fR} [\fIargument\fR...]
37 .SH "DESCRIPTION"
38 .PP
39 \fBmaildirwatch\fR
40 repeatedly invokes the
41 \fB\fIcommand\fR\fR, with any optional
42 \fB\fIargument\fR\fRs, an external command, as follows:
43 .sp
44 .RS 4
45 .ie n \{\
46 \h'-04'\(bu\h'+03'\c
47 .\}
48 .el \{\
49 .sp -1
50 .IP \(bu 2.3
51 .\}
52 The first time the
53 \fB\fIcommand\fR\fR
54 gets executed is immediately after
55 \fBmaildirwatch\fR
56 starts\&.
57 .RE
58 .sp
59 .RS 4
60 .ie n \{\
61 \h'-04'\(bu\h'+03'\c
62 .\}
63 .el \{\
64 .sp -1
65 .IP \(bu 2.3
66 .\}
67 Subsequent invocatons of
68 \fB\fIcommand\fR\fR
69 occur whenever there
70 \fImay\fR
71 be some kind of a change to the contents of the
72 \fImaildir\fR\&.
73 .sp
74 \fBmaildirwatch\fR
75 does not determine what, if anything, changed in the
76 \fImaildir\fR\&.
77 \fBmaildirwatch\fR
78 might occasionally raise a false alarm and run the
79 \fB\fIcommand\fR\fR
80 even though nothing changed, but that\*(Aqs rare\&. It\*(Aqs also possible that by the time
81 \fB\fIcommand\fR\fR
82 actually runs, then whatever was changed in the
83 \fImaildir\fR
84 is no longer changed; it became what it was before it was changed (a mystery that will remain unsolved forever)\&. It\*(Aqs up to the
85 \fB\fIcommand\fR\fR
86 to intelligently figure out if it needs to do something about whatever it finds in the
87 \fImaildir\fR\&.
88 .RE
89 .PP
90 \fBmaildirwatch\fR
91 is a rudimentary mechanism for writing shell scripts that deal with newly\-delivered mail, in some form or fashion\&.
92 .SH "EXIT CODE"
93 .PP
94 A non\-zero exit code indicates that the specified
95 \fImaildir\fR
96 does not exist or is corrupted\&.
97 .PP
98 Otherwise
99 \fBmaildirwatch\fR
100 runs until the
101 \fB\fIcommand\fR\fR
102 exits with a non\-zero exit code\&.
103 \fBmaildirwatch\fR
104 prints
105 \fB\fIcommand\fR\fR\*(Aqs exit code on standard output, and terminates with an exit code of 0\&.
106 .SH "SEE ALSO"
107 .PP
108 \m[blue]\fB\fBmaildirmake\fR(1)\fR\m[]\&\s-2\u[1]\d\s+2\&.
109 .SH "AUTHOR"
110 .PP
111 \fBSam Varshavchik\fR
112 .RS 4
113 Author
114 .RE
115 .SH "NOTES"
116 .IP " 1." 4
117 \fBmaildirmake\fR(1)
118 .RS 4
119 \%[set $man.base.url.for.relative.links]/maildirmake.html
120 .RE