Re: VERP oddness--qmail bug?
Gerrit Pape <[email protected]>
| Newsgroups | gmane.comp.misc.pape.general |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Dec 02, 2003 at 11:06:58AM -0500, Chris Johnson wrote: > Playing with the new qconfirm features, I came across the following > oddness. > > In my virtualdomains file, I have: > test.palomine.net:testguy > > In testguy's home directory, I invoke qconfirm in .qmail-jsmith. > > Then I send mail from my account (on the same server that hosts > test.palomine.net), using qconfirm-inject, to [email protected]: [...] > qconfirm sends a confirmation message from jsmith's account: [...] > Notice the VERP part of the address that qmail created is > testguy-jsmith=test.palomine.net, not jsmith=test.palomine.net. qmail > has added the prepend in the VERP address. > > When this confirmation message is received back in my account, this > appears in the logs: > > delivery 235299: failure: Sorry,_no_mailbox_here_by_that_name:_testguy-jsmith=test:palomine:net/ > > I presume this happens because qconfirm-notice doesn't know that it's > ever sent mail to [email protected] knows only that > it sent mail to [email protected]. Well, I've thought about this, but didn't code accurately; look for ``virtualdomains'' in src/qconfirm-notice.c. Could you please try the attached patch? > At first glance, this would appear to be a qmail bug. I'd think that > ezmlm's bounce handling wouldn't work if a subscriber to a list is on > a virtual domain on the same server that hosts the lists. > > This just in! I found this in the qmail archives: > http://www.geocrawler.com/archives/3/513/2001/8/1200/6367356/ > Apparently I'm not the first to have discovered this. I think djb was well aware of this, but I agree, it's unexpected behavior. $ head -n1 qmail-1.03/TODO consider stripping vdoms for VERPs; tnx PJH $ Regards, Gerrit.
diff
(text/plain, 1.1 KB)
Index: src/qconfirm-notice.c
===================================================================
RCS file: /var/lib/cvs/qconfirm/src/qconfirm-notice.c,v
retrieving revision 1.6
diff -u -r1.6 qconfirm-notice.c
--- src/qconfirm-notice.c 24 Nov 2003 19:43:02 -0000 1.6
+++ src/qconfirm-notice.c 2 Dec 2003 17:53:33 -0000
@@ -333,13 +333,13 @@
opt =str_chr(sa.s +i +1, '\n');
if (byte_equal(sa.s +i +1, opt, dflt)) {
if (dflt[opt++] != '-') continue;
- if (! stralloc_copys(&sa, qconfirm_dir)) die_nomem();
- if (! stralloc_cats(&sa, "/notice/")) die_nomem();
- if (! stralloc_cats(&sa, dflt +opt)) die_nomem();
- if (! stralloc_0(&sa)) die_nomem();
- if (openreadclose(sa.s, &tmp, 504) <= 0) {
+ if (! stralloc_copys(&fn, qconfirm_dir)) die_nomem();
+ if (! stralloc_cats(&fn, "/notice/")) die_nomem();
+ if (! stralloc_cats(&fn, dflt +opt)) die_nomem();
+ if (! stralloc_0(&fn)) die_nomem();
+ if (openreadclose(fn.s, &tmp, 504) <= 0) {
if (errno != error_noent)
- fatal("unable to open: ", sa.s);
+ fatal("unable to open: ", fn.s);
}
else
break;