VERP_README.html revision 1.1.1.6 1 1.1 tron <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
2 1.1.1.6 christos "https://www.w3.org/TR/html4/loose.dtd">
3 1.1 tron
4 1.1 tron <html>
5 1.1 tron
6 1.1 tron <head>
7 1.1 tron
8 1.1 tron <title>Postfix VERP Howto</title>
9 1.1 tron
10 1.1.1.4 christos <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
11 1.1.1.5 christos <link rel='stylesheet' type='text/css' href='postfix-doc.css'>
12 1.1 tron
13 1.1 tron </head>
14 1.1 tron
15 1.1 tron <body>
16 1.1 tron
17 1.1 tron <h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix VERP Howto</h1>
18 1.1 tron
19 1.1 tron <hr>
20 1.1 tron
21 1.1 tron <h2>Postfix VERP support</h2>
22 1.1 tron
23 1.1 tron <p> Postfix versions 1.1 and later support variable envelope return
24 1.1 tron path addresses on request. When VERP style delivery is requested,
25 1.1 tron each recipient of a message receives a customized copy of the
26 1.1 tron message, with his/her own recipient address encoded in the envelope
27 1.1 tron sender address. </p>
28 1.1 tron
29 1.1 tron <p> For example, when VERP style delivery is requested, Postfix
30 1.1 tron delivers mail from "<tt>owner-listname@origin</tt>" for a recipient
31 1.1 tron "<tt>user@domain</tt>", with a sender address that encodes the
32 1.1 tron recipient as follows: </p>
33 1.1 tron
34 1.1 tron <blockquote>
35 1.1 tron <pre>
36 1.1 tron owner-listname+user=domain@origin
37 1.1 tron </pre>
38 1.1 tron </blockquote>
39 1.1 tron
40 1.1 tron <p> Thus, undeliverable mail can reveal the undeliverable recipient
41 1.1 tron address without requiring the list owner to parse bounce messages.
42 1.1 tron </p>
43 1.1 tron
44 1.1 tron <p> The VERP concept was popularized by the qmail MTA and by the ezmlm
45 1.1.1.6 christos mailing list manager. See <a href="https://cr.yp.to/proto/verp.txt">https://cr.yp.to/proto/verp.txt</a> for the
46 1.1 tron ideas behind this concept. </p>
47 1.1 tron
48 1.1 tron <p> Topics covered in this document: </p>
49 1.1 tron
50 1.1 tron <ul>
51 1.1 tron
52 1.1 tron <li> <a href="#config"> Postfix VERP configuration parameters </a>
53 1.1 tron
54 1.1 tron <li> <a href="#majordomo"> Using VERP with majordomo etc. mailing lists </a>
55 1.1 tron
56 1.1 tron <li> <a href="#smtp"> VERP support in the Postfix SMTP server</a>
57 1.1 tron
58 1.1 tron <li> <a href="#sendmail"> VERP support in the Postfix sendmail command </a>
59 1.1 tron
60 1.1 tron <li> <a href="#qmqp"> VERP support in the Postfix QMQP server </a>
61 1.1 tron
62 1.1 tron </ul>
63 1.1 tron
64 1.1 tron <h2> <a name="config"> Postfix VERP configuration parameters </a> </h2>
65 1.1 tron
66 1.1 tron With Postfix, the whole process is controlled by four configuration
67 1.1 tron parameters.
68 1.1 tron
69 1.1 tron <dl>
70 1.1 tron
71 1.1 tron <dt> <a href="postconf.5.html#default_verp_delimiters">default_verp_delimiters</a> (default value: +=)
72 1.1 tron
73 1.1 tron <dd> <p> What VERP delimiter characters Postfix uses when VERP
74 1.1 tron style delivery is requested but no explicit delimiters are
75 1.1 tron specified. </p>
76 1.1 tron
77 1.1 tron <dt> <a href="postconf.5.html#verp_delimiter_filter">verp_delimiter_filter</a> (default: -+=)
78 1.1 tron
79 1.1 tron <dd> <p> What characters Postfix accepts as VERP delimiter
80 1.1 tron characters on the sendmail command line and in SMTP commands.
81 1.1 tron Many characters must not be used as VERP delimiter characters,
82 1.1 tron either because they already have a special meaning in email
83 1.1 tron addresses (such as the @ or the %), because they are used as
84 1.1 tron part of a username or domain name (such as alphanumerics), or
85 1.1 tron because they are non-ASCII or control characters. And who
86 1.1 tron knows, some characters may tickle bugs in vulnerable software,
87 1.1 tron and we would not want that to happen. </p> </dd>
88 1.1 tron
89 1.1 tron <dt> <a href="postconf.5.html#smtpd_authorized_verp_clients">smtpd_authorized_verp_clients</a> (default value: none)
90 1.1 tron
91 1.1 tron <dd> <p> What SMTP clients are allowed to request VERP style
92 1.1 tron delivery. The Postfix QMQP server uses its own access control
93 1.1 tron mechanism, and local submission (via /usr/sbin/sendmail etc.)
94 1.1 tron is always authorized. To authorize a host, list its name, IP
95 1.1 tron address, subnet (net/mask) or parent .domain. </p>
96 1.1 tron
97 1.1 tron <p> With Postfix versions 1.1 and 2.0, this parameter is called
98 1.1 tron <a href="postconf.5.html#authorized_verp_clients">authorized_verp_clients</a> (default: $<a href="postconf.5.html#mynetworks">mynetworks</a>). </p> </dd>
99 1.1 tron
100 1.1 tron <dt> <a href="postconf.5.html#disable_verp_bounces">disable_verp_bounces</a> (default: no)
101 1.1 tron
102 1.1.1.2 tron <dd> <p> Send one bounce report for multi-recipient VERP mail,
103 1.1.1.2 tron instead of one bounce report per recipient. The default,
104 1.1 tron one per recipient, is what ezmlm needs. </p> </dd>
105 1.1 tron
106 1.1 tron </dl>
107 1.1 tron
108 1.1 tron <h2> <a name="majordomo"> Using VERP with majordomo etc. mailing lists </a> </h2>
109 1.1 tron
110 1.1 tron <p> In order to make VERP useful with majordomo etc. mailing lists,
111 1.1 tron you would configure the list manager to submit mail according
112 1.1 tron to one of the following two forms: </p>
113 1.1 tron
114 1.1 tron <p> Postfix 2.3 and later: </p>
115 1.1 tron
116 1.1 tron <blockquote>
117 1.1 tron <pre>
118 1.1 tron % sendmail -XV -f owner-listname other-arguments...
119 1.1 tron
120 1.1 tron % sendmail -XV+= -f owner-listname other-arguments...
121 1.1 tron </pre>
122 1.1 tron </blockquote>
123 1.1 tron
124 1.1 tron <p> Postfix 2.2 and earlier (Postfix 2.3 understands the old syntax
125 1.1 tron for backwards compatibility, but will log a warning that reminds
126 1.1 tron you of the new syntax): </p>
127 1.1 tron
128 1.1 tron <blockquote>
129 1.1 tron <pre>
130 1.1 tron % sendmail -V -f owner-listname other-arguments...
131 1.1 tron
132 1.1 tron % sendmail -V+= -f owner-listname other-arguments...
133 1.1 tron </pre>
134 1.1 tron </blockquote>
135 1.1 tron
136 1.1 tron <p> The first form uses the default <a href="postconf.5.html">main.cf</a> VERP delimiter characters.
137 1.1 tron The second form allows you to explicitly specify the VERP delimiter
138 1.1 tron characters. The example shows the recommended values. </p>
139 1.1 tron
140 1.1 tron <p> This text assumes that you have set up an owner-listname alias
141 1.1 tron that routes undeliverable mail to a real person: </p>
142 1.1 tron
143 1.1 tron <blockquote>
144 1.1 tron <pre>
145 1.1 tron /etc/aliases:
146 1.1 tron owner-listname: yourname+listname
147 1.1 tron </pre>
148 1.1 tron </blockquote>
149 1.1 tron
150 1.1 tron <p> In order to process bounces we are going to make extensive use
151 1.1 tron of address extension tricks. </p>
152 1.1 tron
153 1.1 tron <p> You need to tell Postfix that + is the separator between an
154 1.1 tron address and its optional address extension, that address extensions
155 1.1 tron are appended to .forward file names, and that address extensions
156 1.1 tron are to be discarded when doing alias expansions: </p>
157 1.1 tron
158 1.1 tron <blockquote>
159 1.1 tron <pre>
160 1.1 tron /etc/postfix/<a href="postconf.5.html">main.cf</a>:
161 1.1 tron <a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a> = +
162 1.1 tron <a href="postconf.5.html#forward_path">forward_path</a> = $home/.forward${<a href="postconf.5.html#recipient_delimiter">recipient_delimiter</a>}${extension},
163 1.1 tron $home/.forward
164 1.1 tron <a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a> = canonical, virtual
165 1.1 tron </pre>
166 1.1 tron </blockquote>
167 1.1 tron
168 1.1 tron <p> (the last two parameter settings are default settings). </p>
169 1.1 tron
170 1.1 tron <p> You need to set up a file named .forward+listname with the
171 1.1 tron commands that process all the mail that is sent to the owner-listname
172 1.1 tron address: </p>
173 1.1 tron
174 1.1 tron <blockquote>
175 1.1 tron <pre>
176 1.1 tron ~/.forward+listname:
177 1.1 tron "|/some/where/command ..."
178 1.1 tron </pre>
179 1.1 tron </blockquote>
180 1.1 tron
181 1.1 tron <p> With this set up, undeliverable mail for user@domain will be returned
182 1.1 tron to the following address: </p>
183 1.1 tron
184 1.1 tron <blockquote>
185 1.1 tron <pre>
186 1.1 tron owner-listname+user=domain (a] your.domain
187 1.1 tron </pre>
188 1.1 tron </blockquote>
189 1.1 tron
190 1.1 tron <p> which is processed by the command in your .forward+listname file.
191 1.1 tron The message should contain, among others, a To: header with the
192 1.1 tron encapsulated recipient sender address: </p>
193 1.1 tron
194 1.1 tron <blockquote>
195 1.1 tron <pre>
196 1.1 tron To: owner-listname+user=domain (a] your.domain
197 1.1 tron </pre>
198 1.1 tron </blockquote>
199 1.1 tron
200 1.1 tron <p> It is left as an exercise for the reader to parse the To: header
201 1.1 tron line and to pull out the user=domain part from the recipient address.
202 1.1 tron </p>
203 1.1 tron
204 1.1 tron <h2> <a name="smtp"> VERP support in the Postfix SMTP server </a> </h2>
205 1.1 tron
206 1.1 tron <p> The Postfix SMTP server implements a command XVERP to enable
207 1.1 tron VERP style delivery. The syntax allows two forms: </p>
208 1.1 tron
209 1.1 tron <blockquote>
210 1.1 tron <pre>
211 1.1 tron MAIL FROM:<sender@domain> XVERP
212 1.1 tron
213 1.1 tron MAIL FROM:<sender@domain> XVERP=+=
214 1.1 tron </pre>
215 1.1 tron </blockquote>
216 1.1 tron
217 1.1 tron <p> The first form uses the default <a href="postconf.5.html">main.cf</a> VERP delimiters, the
218 1.1 tron second form overrides them explicitly. The values shown are the
219 1.1 tron recommended ones. </p>
220 1.1 tron
221 1.1.1.2 tron <p> You can use the <a href="postconf.5.html#smtpd_command_filter">smtpd_command_filter</a> feature to append XVERP
222 1.1.1.3 tron to SMTP commands from legacy software. This requires Postfix 2.7
223 1.1.1.2 tron or later. </p>
224 1.1.1.2 tron
225 1.1.1.2 tron <blockquote>
226 1.1.1.2 tron <pre>
227 1.1.1.2 tron /etc/postfix/<a href="postconf.5.html">main.cf</a>:
228 1.1.1.2 tron <a href="postconf.5.html#smtpd_command_filter">smtpd_command_filter</a> = <a href="pcre_table.5.html">pcre</a>:/etc/postfix/append_verp.pcre
229 1.1.1.2 tron <a href="postconf.5.html#smtpd_authorized_verp_clients">smtpd_authorized_verp_clients</a> = $<a href="postconf.5.html#mynetworks">mynetworks</a>
230 1.1.1.2 tron
231 1.1.1.2 tron /etc/postfix/append_verp.<a href="pcre_table.5.html">pcre</a>:
232 1.1.1.2 tron /^(MAIL FROM:<listname@example\.com>.*)/ $1 XVERP
233 1.1.1.2 tron </pre>
234 1.1.1.2 tron </blockquote>
235 1.1.1.2 tron
236 1.1 tron <h2> <a name="sendmail"> VERP support in the Postfix sendmail command </a> </h2>
237 1.1 tron
238 1.1 tron <p> The Postfix sendmail command has a -V flag to request VERP style
239 1.1 tron delivery. Specify one of the following two forms: </p>
240 1.1 tron
241 1.1 tron <p> Postfix 2.3 and later:</p>
242 1.1 tron <blockquote>
243 1.1 tron <pre>
244 1.1 tron % sendmail -XV -f owner-listname ....
245 1.1 tron
246 1.1 tron % sendmail -XV+= -f owner-listname ....
247 1.1 tron </pre>
248 1.1 tron </blockquote>
249 1.1 tron
250 1.1 tron <p> Postfix 2.2 and earlier (Postfix 2.3 understands the old syntax
251 1.1 tron for backwards compatibility, but will log a warning that reminds
252 1.1 tron you of the new syntax): </p>
253 1.1 tron
254 1.1 tron <blockquote>
255 1.1 tron <pre>
256 1.1 tron % sendmail -V -f owner-listname ....
257 1.1 tron
258 1.1 tron % sendmail -V+= -f owner-listname ....
259 1.1 tron </pre>
260 1.1 tron </blockquote>
261 1.1 tron
262 1.1 tron <p> The first form uses the default <a href="postconf.5.html">main.cf</a> VERP delimiters, the
263 1.1 tron second form overrides them explicitly. The values shown are the
264 1.1 tron recommended ones. </p>
265 1.1 tron
266 1.1 tron <h2> <a name="qmqp"> VERP support in the Postfix QMQP server </a> </h2>
267 1.1 tron
268 1.1 tron <p> When the Postfix QMQP server receives mail with an envelope
269 1.1 tron sender address of the form: </p>
270 1.1 tron
271 1.1 tron <blockquote>
272 1.1 tron <pre>
273 1.1 tron listname- (a] your.domain-@[]
274 1.1 tron </pre>
275 1.1 tron </blockquote>
276 1.1 tron
277 1.1 tron <p> Postfix generates sender addresses
278 1.1 tron "<tt>listname-user=domain (a] your.domain</tt>", using "-=" as the VERP
279 1.1 tron delimiters because qmail/ezmlm expect this. </p>
280 1.1 tron
281 1.1 tron <p> More generally, a sender address of "<tt>prefix@origin-@[]</tt>"
282 1.1 tron requests VERP style delivery with sender addresses of the form
283 1.1 tron "<tt>prefixuser=domain@origin</tt>". However, Postfix allows only
284 1.1 tron VERP delimiters that are specified with the <a href="postconf.5.html#verp_delimiter_filter">verp_delimiter_filter</a>
285 1.1 tron parameter. In particular, the "=" delimiter is required for qmail
286 1.1 tron compatibility (see the qmail addresses(5) manual page for details).
287 1.1 tron
288 1.1 tron </body>
289 1.1 tron
290 1.1 tron </html>
291