[1238] in NetBSD-Development
Re: Masquerading dupe suppresion loses on FQ and non-FQ together
daemon@ATHENA.MIT.EDU (John Hawkinson)
Mon Feb 5 03:32:21 1996
Date: Mon, 5 Feb 1996 03:31:25 -0500
To: Christophe Wolfhugel <wolf@pasteur.fr>
Cc: sendmail-bugs@sendmail.org, netbsd-dev@MIT.EDU
In-Reply-To: "[1237] in NetBSD-Development" aka
Christophe Wolfhugel <wolf@pasteur.fr>'s message
<199602050750.IAA26105@yseult.sis.pasteur.fr>
of Mon, 5 Feb 1996 08:50:33 +0100 (MET)
From: John Hawkinson <jhawk@MIT.EDU>
I said:
} If mail on such a client is sent to both a full-quallified address and
} a non-fully qualified address, one is resolved to the relay mailer and
} the other to the smtp mailer, and so the message is twice-delivered.
And wolf replied:
> Yes this is correct, you may wish to have LOCAL_RELAY, MAIL_HUB use the
> same mailer, for exemple esmtp.
[...]
> Another solution would be to define esmtp as the default relay mailer
> (which is what I usually recommend) :
>
> define(`confRELAY_MAILER', `esmtp')dnl
I should point out that my understanding of the purpose of the relay
mailer is kind of clouded, and I'm afraid I don't see why it should
exist at all in the default configuration, or why something like the
above should not be the default. op.me doesn't seem to really discuss
this, and I guess it might be worth a small section (?).
It's the case that the above fails in my configuration, because the
default mailer is "smtp", so this produces one message to through the
"smtp" mailer and one through the "esmtp" mailer; of course, this is
easily fixed with
define(`confRELAY_MAILER', `smtp')dnl
which has the desired effect. Thanks.
Unfortunately, it's still not quite right:
---cut
[lola-granola!jhawk] /usr/src/usr.sbin/sendmail/cf/cf> !se
sendmail -oQ/var/tmp/jhawk -odi -v -C obj/lola-granola.cf -d0.1,20,25,26,29.5 jhawk jhawk@mit.edu
Version 8.6.12
[...]
--parseaddr(jhawk)
parseaddr-->4b280=jhawk:
mailer 3 (local), host `', user `jhawk', ruser `<null>'
next=0, flags=0, alias 0, uid 0, gid 0
owner=(none), home="(none)", fullname="(none)"
recipient: 4b280=jhawk:
mailer 3 (local), host `', user `jhawk', ruser `<null>'
next=0, flags=10, alias 0, uid 0, gid 0
owner=(none), home="(none)", fullname="(none)"
recipient: testing local? cl=5, rr5=3d930
4b280=jhawk:
mailer 3 (local), host `', user `jhawk', ruser `<null>'
next=0, flags=10, alias 0, uid 0, gid 0
owner=(none), home="(none)", fullname="(none)"
maplocaluser: 4b280=jhawk:
mailer 3 (local), host `', user `jhawk', ruser `<null>'
next=0, flags=10, alias 0, uid 0, gid 0
owner=(none), home="(none)", fullname="(none)"
maplocaluser: QDONTSEND 4b280=jhawk:
mailer 3 (local), host `', user `jhawk', ruser `<null>'
next=0, flags=11, alias 0, uid 0, gid 0
owner=(none), home="(none)", fullname="(none)"
recipient: 4b2c0=jhawk@mit.edu:
mailer 4 (smtp), host `mit.edu', user `jhawk@mit.edu', ruser `<null>'
next=0, flags=0, alias 4b280, uid 0, gid 0
owner=(none), home="(none)", fullname="(none)"
sendto: jhawk@mit.edu
ctladdr=[NULL]
--parseaddr(jhawk@mit.edu)
parseaddr-->4b340=jhawk@mit.edu:
mailer 4 (smtp), host `mit.edu.', user `jhawk@mit.edu', ruser `<null>'
next=0, flags=0, alias 0, uid 0, gid 0
owner=(none), home="(none)", fullname="(none)"
recipient: 4b340=jhawk@mit.edu:
mailer 4 (smtp), host `mit.edu.', user `jhawk@mit.edu', ruser `<null>'
next=0, flags=10, alias 0, uid 0, gid 0
owner=(none), home="(none)", fullname="(none)"
---cut
That is, sameaddr() failed to recognize 4b340 as the same as 4b2c0,
and so delivers it twice:
---cut
220 MIT.EDU Sendmail 5.61/1.1 (MIT Mailhub) No collect or third-number calls at Mon, 5 Feb 96 03:15:31 EST
>>> HELO lola-granola.MIT.EDU
250 MIT.EDU Hello lola-granola.MIT.EDU, pleased to meet you
>>> MAIL From:<jhawk@mit.edu>
250 <jhawk@mit.edu>... Sender ok
>>> RCPT To:<jhawk@mit.edu>
250 <jhawk@mit.edu>... Recipient ok
>>> RCPT To:<jhawk@mit.edu>
250 <jhawk@mit.edu>... Recipient ok
>>> DATA
---cut
But since they're to the same mailer, the receiving daemon handles
duplicate supprsion.
Why does sameaddr() fail? According to the source [8.6.12], addresses
are the same if:
They have the same mailer
They have the same user [oversimplification]
They don't use the prog mailer
Their hosts are the same
all of those conditions seem to have been met, however debugging
output does not say "jhawk@mit.edu in sendq:..." like it ought to.
This does not appear to be fixed in 8.7.3. (empirically, I haven't
checked the sources)
--jhawk