>> Is it really that overwhelmingly difficult to have whatever configures
>> your bounce handler look in /var/qmail/control/virtualdomains to see
>> what prefix to strip off the local part of the VERP address? I
>> suspect either of us could do it in about four lines of perl.
>
>You can turn the question upside-down:
>
>Is is really that overwhelmingly difficult to add or change about four
>lines of C and make qmail behave in a sane way and eliminate the need to
>add such a twisted piece of code to every program using VERP on this
>planet?
Difficult? Of course not, if you want to change that, you have the
source. But just because it's easy doesn't mean it's not a good idea.
>If I (DJB) want to keep my program (qmail) as small and clean as possible
>to avoid bugs etc., I should not force other people to make their programs
>bloated, should I?
Of course. That's why it works the way it does.
The Delivered-To: contents is actually $RECIPIENT which is
$LOCAL@$HOST. When qmail delivers a message, it finds the longest
prefix of $LOCAL in the "users" database and uses that to set the
user/group IDs and home directory for the delivery. Then the rest of
$LOCAL is the extension and is used to pick the appropriate .qmail
file and is available as $EXT and so forth. This is what happens
regardless of whether the message was originally addressed to a local
domain or a virtual one. If it was to a virtual domain, there was a
preprocessing step that put the virtual domain's prefix on the front
of $LOCAL, but delivery code doesn't have to worry about that. In the
particular case where a program run from .qmail does VERP bounce
processing, it has to de-prefix $LOCAL, but for other purposes, $LOCAL
shows the address that the message is delivered to and that's what
delivery scripts need.
Now let's look at your plan. If a message is addressed to a virtual
domain, qmail looks it up, finds the prefix and does, um, something
with it. Does it change $LOCAL? Or does it concoct $REALLYLOCAL or
the like? Do .qmail scripts see the unprefixed $LOCAL or the prefixed
one? Since $LOCAL no longer is the actual delivery address for
virtual domains, to work reliably scripts that deliver mail that might
have been sent to a virtual domain have to look at $HOST and do one
thing if it's a local domain and another if it's virtual. Sounds
pretty bloated to me, particularly since there are generally far more
deliveries to virtual addresses, which want the prefixed address, than
VERP bounces, which don't.
Like I said:
> It's true, qmail doesn't work the way you might first have guessed it
> does. That doesn't mean it's wrong.
--
John R. Levine, IECC, POB 727, Trumansburg NY 14886 +1 607 387 6869
[EMAIL PROTECTED], Village Trustee and Sewer Commissioner, http://iecc.com/johnl,
Member, Provisional board, Coalition Against Unsolicited Commercial E-mail