useMatchingHostNameServer pref is ignored

RESOLVED FIXED

Status

RESOLVED FIXED
14 years ago
10 years ago

People

(Reporter: iann_bugzilla, Assigned: Bienvenu)

Tracking

({regression})

Trunk
x86
Windows XP
regression

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

14 years ago
Using BuildID 2004082007 on WinXP SP1
Steps to reproduce
1. Have IMAP and SMTP servers on same machine (adm1 in my case)
2. Set mail.smtp.useMatchingHostNameServer to true
3. Start Mozilla and enter password for IMAP server (adm1 in my case)
4. Compose an email and click on send.

Expected Result
1. Email is sent

Actual Result
1. Prompted for password for SMTP server (adm1 in my case)

Done some testing as to when the regression happened. Works fine in BuildID
2004081809 but has regressed by BuildID 2004081910. Tested on BuildID 2004082209
and it still happens.

Looking at checkins during that period possibly bug 41929 is to blame so cc'ing
relevant people.
(Assignee)

Comment 1

14 years ago
oy, taking.
Assignee: sspitzer → bienvenu

Comment 2

14 years ago
Created attachment 158241 [details] [diff] [review]
Possible solution

Possible fix for this.

The problem arises from the call to FindRealServer with an empty type so that
we can find any server that is on the same host/domain.  In the URL method that
we are using now, you can't set the scheme to an empty value.

So this patch uses 'any' as a magic scheme when we pass in an empty type to
FindRealServer.

What do you think?

Comment 3

14 years ago
Comment on attachment 158241 [details] [diff] [review]
Possible solution

Style nits:

>+      type.AssignLiteral("");
type.Truncate();

>+  if (!(type.EqualsLiteral("none") || type.EqualsLiteral("")))
if (!(type.EqualsLiteral("none") || type.IsEmpty()))

>+  serverInfo.type = (!(type.IsEmpty() || type.EqualsLiteral(""))) ? type.get() : "";
serverInfo.type = type.get();
[this was true on the old code too]

>+  if (PL_strcmp(type, "")==0) {
if (!*type)
(Assignee)

Comment 4

14 years ago
if it would simplify the patch, I'm happy to pass in "any" in the one place we
call FindServer with an empty type...

Comment 5

14 years ago
(In reply to comment #4)
> if it would simplify the patch, I'm happy to pass in "any" in the one place we
> call FindServer with an empty type...

Either way is about the same ... it just depends how you want to advertise the
interface to outside users ... "" for matching any type or "any" as the wildcard.

If I don't hear anything from you, I'll just use the method that I have here
(with your comments addressed of course)

Kevin

Comment 6

14 years ago
Created attachment 158302 [details] [diff] [review]
patch

cleaned up patch

I kept the format of passing in "" for the wildcard type from outside
FindRealServer so that it would be consistent with what we do for the username
and and hostname.

Neil's nits addressed also

Updated

14 years ago
Attachment #158241 - Attachment is obsolete: true

Comment 7

14 years ago
Comment on attachment 158302 [details] [diff] [review]
patch

When you have a moment

If someone wants to r/sr or if you wish to reverse these ... go ahead

Kevin
Attachment #158302 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #158302 - Flags: review?(bienvenu)
(Assignee)

Comment 8

14 years ago
Comment on attachment 158302 [details] [diff] [review]
patch

I'll check this in once Neil sr's
Attachment #158302 - Flags: review?(bienvenu) → review+

Updated

14 years ago
Attachment #158302 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
(Reporter)

Comment 9

14 years ago
Patch was checked in so can this be closed or is it needed for aviary too?

Comment 10

14 years ago
(In reply to comment #9)
> Patch was checked in so can this be closed or is it needed for aviary too?

This isn't needed for aviary unless the stuff from bug 41929 gets ported over to
the aviary branch.



Product: MailNews → Core
(Reporter)

Updated

14 years ago
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.