I think I've found a bug in qmail-local regarding the handling rewriting a
sender address with virtualdomains. Let me show you my test setup:
This is all in the home directory of the user "test12" which has the domain
"test12.com" mapped to their username with the control/virtualdomains file.
The system is "hobbes.drh.net"
[test12@hobbes home]$ echo $USER
test12
[test12@hobbes home]$ grep test12 /var/qmail/control/virtualdomains
test12.com:test12
[test12@hobbes home]$ cat /var/qmail/control/me
hobbes.drh.net
I have five .qmail files setup for this user. First, .qmail-foo forwards
e-mail so it will go to the files .qmail-bar and .qmail-bouncer. But first,
notice the .qmail-foo-owner, which should cause all e-mail going through
.qmail-foo to acquire .qmail-foo-owner as the sender. Any mail going to
.qmail-foo-owner will get dropped in the mbox ./mailfile-foo-owner.
[test12@hobbes home]$ cat .qmail-foo
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[test12@hobbes home]$ cat .qmail-foo-owner
./mailfile-foo-owner
Now the two destinations files... .qmail-bar stores the e-mail to the mbox
./mailfile-var. .qmail-bouncer will bounce the e-mail, so it should end up
going back to .qmail-foo-owner and end up in the mbox ./mailfile-foo-owner.
[test12@hobbes home]$ cat .qmail-bar
./mailfile-bar
[test12@hobbes home]$ cat .qmail-bouncer
bouncesaying "bounced as a test"
Okay, look good?
Now we send a test message, first clearing out the two mailfiles for the
test
[test12@hobbes home]$ rm mailfle-*
[test12@hobbes home]$ qmail-inject
to: [EMAIL PROTECTED]
subject: here we go and test stuff
testing line one
testing line two
[test12@hobbes home]$
Now, we _should_ have a copy of the message in mailfile-bar and a copy of a
bounce in mailfile-foo-owner.
Looking at mailfile-bar reveals that the owner has been rewritten
incorrectly, IMO.
[test12@hobbes home]$ cat mailfile-bar
From [EMAIL PROTECTED] Tue Jun 15 20:08:22 1999
Return-Path: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 2374 invoked by uid 513); 15 Jun 1999 20:08:22 -0000
Delivered-To: [EMAIL PROTECTED]
Received: (qmail 2371 invoked by uid 513); 15 Jun 1999 20:08:20 -0000
Date: 15 Jun 1999 20:08:10 -0000
Message-ID: <[EMAIL PROTECTED]>
From: [EMAIL PROTECTED]
to: [EMAIL PROTECTED]
subject: here we go and test stuff
testing line one
testing line two
[test12@hobbes home]$
The "^From" line should read "[EMAIL PROTECTED]" or
"[EMAIL PROTECTED]", right?
IMO, the iron clad test of this sender rewriting is this: Did we get bounce
messages? The answer is no:
[test12@hobbes home]$ cat mailfile-foo-owner
cat: mailfile-foo-owner: No such file or directory
This make sense to anyone else there?
- David Harris
Principal Engineer, DRH Internet Services