[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
user@[my.ip.add.ress]
On Tue, 13 Feb 1996, Matti Aarnio wrote:
> > of the bugs in which have since been fixed bar one (that is, attempting to
> > send to the current machine via name@[x.x.x.x] still does not work without
> > applying a correction to rrouter.cf).
>
> In theory, the change is rather simple -- we must add recognition
> of local bracketed address into that place
~
> z# router "fii@[130.232.1.11]"
> <mea.interactive@mea.utu.fi>: address: fii@[130.232.1.11]
> (((local fii@[130.232.1.11] fii default_attributes)))
> z# router "foo@[130.232.1.1]"
> <mea.interactive@mea.utu.fi>: address: foo@[130.232.1.1]
> (((smtp [130.232.1.1] foo@polaris.cc.utu.fi default_attributes)))
>
> That latter form is illegal in local system -- polaris does
> not have mailer at all, and this form does not use MXes to
> find the right host.. (mailhost.utu.fi)
The problem isn't where the mail *originates*, though, but to whom
the mail is addressed (ie. the recipient). When Zmailer attempts to
deliver mail coming from outside which is addressed to user@[...]
(where ... is its own ip address), rrouter.cf still returns an smtp
target, and ends up bouncing the mail because it tries to deliver
to itself.
> ------------- $MAILSHARE/cf/rrouter.cf --------------
> .....
> (.*)<@\[(.)\]>(.*)
> # numeric internet spec
> if [ $(deliver "[\2]") ]; then
> address="\1<@>\3"
> else
> return (((smtp "[\2]" "\1@$(gethostbyaddr \2)\3" $A)))
> fi
> ;;
> .....
> ------------------------------------------------------
Actually, the fix I applied is simpler than that, and does not require
fiddling with $MAILSHARE/db/localnames. I simple changed the line
which read:
return (((smtp "[\2]" "\1@$(gethostbyaddr \2)\3" $A))) ;;
to read:
address = "\1<@$(gethostbyaddr \2)\3" ;;
Mail which resolves to a local address seems to then get local, and
remote ip addresses get the correct target also.
Is there some other side-effect of doing this that I've missed? When
I first applied it, I tested it quite extensively since I'm naturally
suspicious of such a simple fix. :-)
> > FWIW, I just did some testing later with sendmail 8.6.12, and it does show
> > the correct MX target. Perhaps that's what I'm remembering.
>
> sendmail is monolithic, and there seeing the difference of
> routeing phase, and delivery phase is a bit difficult..
Understandably. I honestly can't imagine what would ever convince
me to go back to using sendmail...
--
David Nugent: davidn@blaze.net.au, davidn@unique.blaze.net.au
Unix/Linux/DOS/Win/Os2 Microsystem Technical Support [FOR HIRE!]
http://www.blaze.net.au/~davidn