Hello Bknonix,

On Saturday, February 15, 2003 at 12:16:39 AM you wrote (at least in
part):
[unreadable top posting fixed]

>>>>And the output of:
>>>>
>>>>cat <home-directory-of-that-domain>/.qmail-default

>>> | /home/VMail/bin/vdelivermail '' [EMAIL PROTECTED] 
>>> | /home/VMail/bin/vdelivermail '' bounce-no-mailbox

>> And you _really_ wonder why mails are delivered twice?

>> The first line searches for the user in vpasswd.cdb and if found delivers
>> the mail. If not is redirects the mail to postmaster@... The second line
>> does exactly the same, except in case of failure it bounces the message. A
>> successful delivery done in line 1 does _NOT_ stop qmail-local executing the
>> other lines in .qmail-default, which a quick look into man dot-qmail and man
>> qmail-local would have revealed.

>> Decide ... Bounce or Forward. If you _really need_ both you'll for sure have
>> no problem with writing an own program or script that is called from
>> vdelivermail (|.../vdelivermail '' |/path/to/my/prog) and forwards and
>> bounces by itself, with the effect you only have _one_ delivery instruction
>> in .qmail-default.

> Interesting Answer Peter, but I will through a bit of a loop into this.

> 1.  User account "bruce", no .qmail-bruce file.
>     - two messages are delivered to bruce when addressed to
>     [EMAIL PROTECTED]

With above (or similar) .qmail-default? No wonder. Two delivery
instructions. Both success in the "user lookup" vdelivermail does and
therefore two messages are delivered.

> 2.  User account "bruce", with .qmail-bruce file.
>     - one message is delivered to bruce when addressed to
>     [EMAIL PROTECTED]

No wonder. .qmail-bruce is read by qmail-local directly, vdelivermail
ain't invoked in any manner.

> So, unless I am missing something (in which case, please point me to where)
> I do not see why the above example should go to the .qmail-default file.

If there is _no_ .qmail-bruce qmail-local can use it (qmail-local)
looks for .qmail-default. That's how qmail works.

> In the event that the message does go to the default file, I do want both.
> I want the bounce to go back AND a copy to be forwarded to the postmaster.

I showed a "work around". Write an own program or script.
Call is like this

| /home/VMail/bin/vdelivermail '' |/path/to/your/handler

_this_ handler forwards the message to 'postmaster@...' and than does
something like

echo "No Mailbox here by that name"
exit 100

This will tell vdelivermail to "exit 100" by itself and qmail-local,
being the caller of vdelivermail, will bounce the message.

> I performed an intersting test.   I deleted ALL .qmail-* files, including
> the .qmail-default and the email to [EMAIL PROTECTED] just got delivered
> once.

That's _in fact_ interesting, as I don't know where your qmail-local
did know from where to deliver the mail to.

> So, my theory is that creating a .qmail-default file in a virtual domain,
> requires every user to have a .qmail-(user) file.

No. You haven't understood how qmail-local works.
And to stretch the topic a bit: vpopmail is out now for several years.
I guess even if I'd be _totally_ wrong and your assumption would be
correct somebody would have already noticed this _fundamental_ flaw
and vpopmail wouldn't be that popular. Except M$ there's nearly nobody
being able spread software that wide if it ain't work. :-)

I'd suggest you go, get the "qmail picture" [1] and read the qmail
documentation. Both in combination describe in a wonderful way how
qmail in general and qmail-local in this case work and what
/var/qmail/users/assign tells qmail (-local). And after reading and
understanding this you'll see, why a .qmail-default is _essential_ for
the way vpopmail goes :-) Else you'd have to create a .qmail-user for
_every_ single mailbox (and not only for forwarders / aliases) :-)
-- 
Best regards
Peter Palmreuther

Sex is not the answer. Sex is the question. "Yes" is the answer. -
Swami X


Reply via email to