summaryrefslogtreecommitdiff
path: root/sqmail-4.3.07/man/qmail-queue.8
blob: b025c95e74b80aedb9bd8d7da3bd356ca7685247 (plain)
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
.TH s/qmail: qmail-queue 8
.SH NAME
qmail-queue \- queue a mail message for delivery
.SH SYNOPSIS
.B qmail-queue
.SH DESCRIPTION
.B qmail-queue
reads a mail message from descriptor 0.
It then reads envelope information from descriptor 1.
It places the message into the outgoing queue
for future delivery by
.BR qmail-send .

The envelope information is
an envelope sender address
followed by a list of envelope recipient addresses.
The sender address is preceded by the letter F
and terminated by a 0 byte.
Each recipient address is preceded by the letter T
and terminated by a 0 byte.
The list of recipient addresses is terminated by an extra 0 byte.
If
.B qmail-queue
sees end-of-file before the extra 0 byte,
it aborts without placing the message into the queue.

Every envelope recipient address
should contain a username,
an @ sign,
and a fully qualified domain name.

.B qmail-queue
always adds a
.B Received
line to the top of the message.
Other than this,
.B qmail-queue
does not inspect the message
and does not enforce any restrictions on its contents.
However, the recipients probably expect to see a proper header,
as described in
.BR qmail-header(5) .

Programs included with qmail which invoke
.B qmail-queue
will invoke the contents of
.B QMAILQUEUE
instead, if that environment variable is set.
.SH "FILESYSTEM RESTRICTIONS"
.B qmail-queue
imposes two constraints on the queue structure:
each
.B mess
subdirectory must be in the same filesystem as the
.B pid
directory; and each
.B todo
subdirectory must be in the same filesystem as the
.B intd
directory.
.SH "EXIT CODES"
.B qmail-queue
does not print diagnostics.
It exits
0 if
it has successfully queued the message.
It exits between 1 and 99 if
it has failed to queue the message.

All
.B qmail-queue
error codes between 11 and 40
indicate permanent errors:
.TP 5
.B 11
Address too long.
.TP
.B 31
Mail server permanently refuses to send the message to any recipients.
(Not used by
.BR qmail-queue),
.TP
.B 32
Mail server does not accept the message.
(The message includes an identified virus.)
.TP
.B 33
Mail server does not accept the message.
(The message is identified as spam.)
.TP
.B 34
Mail server does not accept the message.
(The message carries an invalid MIME attachment.)
.PP
All other
.B qmail-queue
error codes indicate temporary errors:
.TP 5
.B 51
Out of memory.
.TP
.B 52
Timeout.
.TP
.B 53
Write error; e.g., disk full.
.TP
.B 54
Unable to read the message or envelope.
.TP
.B 55
Unable to read a configuration file.
The virus scanner called via the
.BR QHPSI
returned with return code other then
0 or QHPSIRC. 
.TP
.B 56
Problem making a network connection from this host.
(Not used by
.BR qmail-queue .)
.TP
.B 61
Problem with the qmail home directory.
.TP
.B 62
Problem with the queue directory.
.TP
.B 63
Problem with queue/pid.
.TP
.B 64
Problem with queue/mess.
.TP
.B 65
Problem with queue/intd.
.TP
.B 66
Problem with queue/todo.
.TP
.B 71
Mail server temporarily refuses to send the message to any recipients.
(Not used by
.BR qmail-queue .)
.TP
.B 72
Connection to mail server timed out.
(Not used by
.BR qmail-queue .)
.TP
.B 73
Connection to mail server rejected.
(Not used by
.BR qmail-queue .)
.TP
.B 74
Connection to mail server succeeded,
but communication failed.
(Not used by
.BR qmail-queue .)
.TP
.B 81
Internal bug; e.g., segmentation fault.
.TP
.B 91
Envelope format error.
.SH "QHPSI ARGUMENTS"
The Qmail High Performance Scanner interface QHPSI allows
.B qmail-queue
to read up to seven arguments taken from the environment to be used
as a call-interface for an external virus scanner:
.TP 5
.B QHPSI
is set to the file name of the virus scanner, ie. QHPSI='/usr/local/bin/clamscan'.
The path can be omitted, if the virus scanner is in the default path.
.TP
.B QHPSIARG1...3
Optional additional arguments can be included here, ie. QHPSIARG1="--verbose". 
Useful to suppress output in case an email is
clean and to enable mailbox support for the virus scanner.
.TP
.B QHPSIRC
To specify the return code of the virus scanner in case of an infection; default is 1.
.TP
.B QHPSIMINSIZE
The minimal size of the message to invoke the virus scanner; default is 0.
A typical choice would be QHPSIMINSIZE=10000 (~10k).
.TP
.B QHPSIMAXSIZE
The maximal size of the message to invoke the virus scanner; default is unrestricted.
A typical choice would be QHPSIMAXSIZE=1000000 (~1M).
.SH "SEE ALSO"
addresses(5),
envelopes(5),
qmail-header(5),
qmail-inject(8),
qmail-qmqpc(8),
qmail-send(8),
qmail-smtpd(8)