In order to make VERP useful with majordomo etc. mailing lists,
you would configure the list manager to submit mail according
to one of the following two forms:
Postfix 2.3 and later:
% sendmail -XV -f owner-listname other-arguments...
% sendmail -XV+= -f owner-listname other-arguments...
Postfix 2.2 and earlier (Postfix 2.3 understands the old syntax
for backwards compatibility, but will log a warning that reminds
you of the new syntax):
% sendmail -V -f owner-listname other-arguments...
% sendmail -V+= -f owner-listname other-arguments...
The first form uses the default main.cf VERP delimiter characters.
The second form allows you to explicitly specify the VERP delimiter
characters. The example shows the recommended values.
This text assumes that you have set up an owner-listname alias
that routes undeliverable mail to a real person:
/etc/aliases:
owner-listname: yourname+listname
In order to process bounces we are going to make extensive use
of address extension tricks.
You need to tell Postfix that + is the separator between an
address and its optional address extension, that address extensions
are appended to .forward file names, and that address extensions
are to be discarded when doing alias expansions:
/etc/postfix/main.cf:
recipient_delimiter = +
forward_path = $home/.forward${
recipient_delimiter}${extension},
$home/.forward
propagate_unmatched_extensions = canonical, virtual
(the last two parameter settings are default settings).
You need to set up a file named .forward+listname with the
commands that process all the mail that is sent to the owner-listname
address:
~/.forward+listname:
"|/some/where/command ..."
With this set up, undeliverable mail for user@domain will be returned
to the following address:
[email protected]
which is processed by the command in your .forward+listname file.
The message should contain, among others, a To: header with the
encapsulated recipient sender address:
To: [email protected]
It is left as an exercise for the reader to parse the To: header
line and to pull out the user=domain part from the recipient address.