-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsendmail-tryqueue.1
125 lines (90 loc) · 2.45 KB
/
sendmail-tryqueue.1
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
.TH SENDMAIL-TRYQUEUE 1
.SH NAME
sendmail-tryqueue \- A generic utility that caches/queues emails that couldn't be sent
.SH SYNOPSIS
.PP
.B sendmail-tryqueue
[\fB\-h\fR] [\fB\-v\fR] [\fB\-d\fR] [\fB\-n\fR]
[\fB\-D\fR \fIqueue_directory\fR]
[\fB\-Q\fR \fIqueue_name\fR]
\fIcommand\fR ...
.SH DESCRIPTION
sendmail-tryqueue tries sending an email by reading it on the standard input
and forwarding it to the standard input of a given sendmail command. If
the command fails, the email and command are stored on disk, in a "queue
directory".
.SH OPTIONS
.TP
.B \-h, \-\-help
show this help message and exit
.TP
.B \-v, \-\-verbose
display information messages
.TP
.B \-d, \-\-debug
display debug messages
.TP
.B \-n, \-\-dry-run
do not modify the database, only print commands that would otherwise have been run
.TP
.B \-D, \-\-queue\-directory \fIqueue_directory\fR
path to the directory that stores queues, defaults to
\fI$XDG_DATA_HOME/sendmail-tryqueue/queues\fR
.TP
.B \-Q, \-\-queue\-name \fIqueue_name\fR
name of the default queue, defaults to \fIdefault\fR
.SH COMMANDS
.TP
.B send \fIsendmail_command\fR
forward the email to the given \fIsendmail_command\fR, queue if unsuccessful
.TP
.B list
list all the emails stored in a queue
.TP
.B flush
try to re-send all the emails stored in a queue, stopping on the first
failure and unqueuing emails unsuccessfully re-sent
.SH ENVIRONMENT
.TP
.BR XDG_DATA_HOME
defaults to \fI~/.local/share\fR if undefined
.SH FILES
Queues are directories created in the queue directory, and contain two types
of files, whose name have format \fI<ts>-<subject>-<seed>.<extension>\fR,
with each token being defined as follows:
.nf
.RS
- \fIts\fR: millisecond-based timestamp of the moment the email was first sent
- \fIsubject\fR: subject of the email, with whitespace and slash characters
replaced with underscore characters
- \fIseed\fR: a random four-digit number
.RE
.fi
The file extensions indicate the nature of their contents:
.TP
.BR .eml
email that was written on the standard input of \fBsendmail-tryqueue\fR,
the file is created in mode 0600
.TP
.BR .sh
command that was passed to \fBsendmail-tryqueue\fR, the file is created in
mode 0700
.SH RETURN VALUES
Note that failing to send an email with the \fIsend\fR command is not
treated as an error.
.TP
0
no errors
.TP
1
generic error
.SH EXAMPLES
.PP
Try to send an email:
.nf
.RS
cat test.eml | sendmail-tryqueue send sendmail -- [email protected]
.RE
.fi
.SH SEE ALSO
\fBsendmail\fR(8)