Closed
Bug 72831
Opened 24 years ago
Closed 24 years ago
can't use localhost as an smtp server
Categories
(MailNews Core :: Networking: SMTP, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla0.9
People
(Reporter: blizzard, Assigned: gagan)
References
Details
(Keywords: verifyme)
Attachments
(3 files)
1.27 KB,
patch
|
Details | Diff | Splinter Review | |
2.85 KB,
patch
|
Details | Diff | Splinter Review | |
2.91 KB,
patch
|
Details | Diff | Splinter Review |
If you set your SMTP server as localhost you get the mysterious message "sending
of message failed." It apparently doesn't ever actually contact the server, either.
Reporter | ||
Comment 1•24 years ago
|
||
Setting it to 127.0.0.1 works.
Reporter | ||
Comment 2•24 years ago
|
||
I would love to try to get this working for 0.8.1 but it's pretty late in the
game. I'm waiting for my debug build to finish. Maybe there's a friendly
assertion or something.
Reporter | ||
Comment 3•24 years ago
|
||
tor pointed out that this might be because nsDNSService::Resolve() has a special
case for localhost. I'm going to guess that this is probably why things are
failing.
The special case rewrites localhost as the hostname and uses that IP address
instead. Why? That's going to fail on my machine because sendmail doesn't
listen to any interfaces except for 127.0.0.1. If I had wanted to use the
external IP I would have put the name for that interface in my SMTP server
configuration.
Is this here because of windows horkage wrt network configration or something?
Reporter | ||
Comment 4•24 years ago
|
||
Adding gagan who wrote the bad bad code.
Reporter | ||
Comment 5•24 years ago
|
||
Apparently this went in when proxy auto config went in. I don't know how it's
related.
Reporter | ||
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
sr=shaver. PAC doesn't even work right now anyway.
Comment 8•24 years ago
|
||
I don't feel comfortable super reviewing this until the DNS guys have looked at
it. I'm sure they understand why the code may have been in there in the first place.
Please wait for gagan and Gordon to both sign off on this before landing.Thanks.
Comment 10•24 years ago
|
||
I feel very comfortable asserting that any rewriting of localhost is ipso facto
broken. Gagan?
/be
Reporter | ||
Comment 11•24 years ago
|
||
If PAC needs that for some reason the PAC code should be doing it. I feel
pretty confidant that it shouldn't do that in the DNS service.
Comment 12•24 years ago
|
||
The string "localhost" is just that, a string in /etc/hosts. It has no
special meaning. It is not required to refer to the loopback interface,
although that is the conventional usage. I do not believe there is an
RFC or any other standard that specifies the meaning of "localhost." Of
course, the loopback IPV4 address *is* special.
In any event, mozilla should not assume has exclusive rights to, or can
control in any way, any interface; not for any reason, not ever.
Assignee | ||
Comment 13•24 years ago
|
||
I totally agree with you all. Some historical facts--
This went in around the time for PAC purely for the fact that PAC needs the two
functions Resolve and IsInNet. That explains the correlation.
As for the localhost problem-- I am totally to be blamed for that. This was
added to get to "myIPAddress" which correctly should really have been a separate
interface. So I am ok with the patch the way it is... except that this will
definitely break PAC with someone using/asking for myIPAddress (different than
127.0.0.1 loopback) So my suggestion is that we add another function to the
nsDNSService that returns our IP address.
Blizzard if you want to do that then go for it... or you could wait until later
tonight when I might be able to attach the patch for doing the same.
Assignee: mscott → gagan
Assignee | ||
Comment 14•24 years ago
|
||
Assignee | ||
Comment 15•24 years ago
|
||
oops... I missed an intended-but-later-than-diffs line of
NS_ENSURE_ARG_POINTER(o_ip) in the new function.
Reporter | ||
Comment 16•24 years ago
|
||
Are there any callers that require the new call? If not, sr=blizzard.
Comment 17•24 years ago
|
||
review comments:
- make MyIPAddress an attribute, not a method
- what does ``my'' mean? What happens for machines with multiple IP addresses
(like, say, _every_ Linux box in the universe)? I'd prefer
``localAddress'', but I also want to know what happens in that case.
For 0.8.1, let's just rip out the localhost->local-hostname crap and leave the
rest of this patch out.
Assignee | ||
Comment 18•24 years ago
|
||
shaver: I like the idea of making myIPAddress an attribute. I'll submit a new
patch soon. As for the case of multiple IP addresses-- AFAIK we use the default
(or primary) hostname to get to the IP address.
blizzard: the only caller of the "myIPAddress" functionality is in the PAC (bug
53080) and I will make sure I add the corresponding patch there as well. Thanks
for the sr.
Assignee | ||
Comment 19•24 years ago
|
||
Assignee | ||
Comment 20•24 years ago
|
||
fix is in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 21•24 years ago
|
||
Checked into 0.8.1.
Comment 22•23 years ago
|
||
Reporter can you verify this works for you now
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•