Closed Bug 411132 Opened 17 years ago Closed 17 years ago

Error 5.5.4 on sending to MS Exchange server due to newlines in hostname

Categories

(Thunderbird :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3

People

(Reporter: jamesmstone, Assigned: mkmelin)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Build Identifier: Thunderbird 2.0.0.9 When I send mail vi the MS Exchange server at work, I get the error "5.5.4 Invalid Address" and the mail is not sent. This makes using Thunderbird impossible. The error is apparently due to an idiosyncrasy in the way the MS Exchange server handles trailing spaces and dots: http://support.microsoft.com/kb/291828 Reproducible: Always Steps to Reproduce: 1. 2. 3.
More info: It seems to be generated by the strange name that is given to my PC on this network.. Here is the log from Thunderbird talking to the exchange server: -1610567004[130d020]: SMTP Response: 220 x.x.ac.uk Microsoft ESMTP MAIL Serv ice, Version: 6.0.3790.3959 ready at Mon, 7 Jan 2008 15:20:27 +0000 -1610567004[130d020]: SMTP entering state: 15 -1610567004[130d020]: SMTP Send: EHLO pc02607 sgd-01790.x.x.ac.uk -1610567004[130d020]: SMTP entering state: 0 -1610567004[130d020]: SMTP Response: 501 5.5.4 Invalid Address Notice the PC name seems to have a <CR> in it!! So this is clearly a local problem. I think if Thunderbird just sent the sgd-01790.x.x.ac.uk part of the address, it would work fine.. I guess this is what other email clients do. James
Could would be around here: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/compose/src/nsSmtpProtocol.cpp&rev=1.200#375 Can you try to workaround the problem by setting the name without line break? The pref is something like mail.smtpserver.<smtpXXX>.hello_argument
Oh, and you have to use a nightly, because that pref isn't available on 2.0. http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/latest-trunk/
I added the pref in 2.0.0.9 and it worked fine. Thanks! Would it be possible for future versions of TB to strip out any unacceptable characters from the PC name prior to speaking to SMTP? Other mail clients seem to work around somehow, so it would be good if TB is not alone in looking broken. Anyway, many thanks for your help! James
Turns out is is available for 2.0 also - the keyword was just forgotten in that bug.
OS: Mac OS X → All
Hardware: Macintosh → All
Summary: Error 5.5.4 on sending to MS Exchange server → Error 5.5.4 on sending to MS Exchange server due to newlines in hostname
Attached patch proposed fix (deleted) — Splinter Review
Wouldn't imagine it's very common for the hostname to have newlines, but apparently it can in some cases.
Assignee: nobody → mkmelin+mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #296709 - Flags: superreview?(bienvenu)
Attachment #296709 - Flags: review?(bienvenu)
Comment on attachment 296709 [details] [diff] [review] proposed fix Wild. thx, Magnus. The other possibility would be to call StripWhitespace(), but I'll leave that up to you.
Attachment #296709 - Flags: superreview?(bienvenu)
Attachment #296709 - Flags: superreview+
Attachment #296709 - Flags: review?(bienvenu)
Attachment #296709 - Flags: review+
StripWhitespace() sounds like a good idea! Fixed that and checked in. Checking in mailnews/compose/src/nsSmtpProtocol.cpp; /cvsroot/mozilla/mailnews/compose/src/nsSmtpProtocol.cpp,v <-- nsSmtpProtocol.cpp new revision: 1.201; previous revision: 1.200 done ->FIXED
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3
James: Any possibility you could provide more details on how your PC is configured (and where it got the funny name)?
The bug is fixed (see the post before yours). Why are you replying to a closed bug? The PC name is automatically assigned on my network at work. I have nothing to do with the network admin so I can't give any more details.
I wanted to know because there are other possible places we should test....
Ah.. OK. Well, I'm afraid I can't really give you much more info. The IT department at work has some very odd practices.. For instance my computer is assigned a new name every time I connect to the network (it's a powerbook, and I think they are set up primarily for windows PCs).. I don't know how the names are generated or why some of them have spaces or <CR> in them. All I know is that after that fix to Thunderbird, mail works perfectly. James
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: