Solved

Exchange 2003 ActiveSync command GetAttachment gives HTTP500 error

Posted on 2014-01-20
7
1,006 Views
Last Modified: 2014-01-24
Hi guys,

I have a very strange one here that I could do with some help on!  A customer has two Exchange 2003 SP2 servers, not in a front-end/back-end setup (yeah, I know :)).  It's not clear if this has always been happening or if it is a new issue, but when a user clicks an attachment in an email on their Apple iOS device it tries for a moment then says it cannot download the attachment.  If they click "Download full message" and then click the attachment it will generally open no problem.  Initially this seemed like an iOS issue but I have now setup some Android devices for them and no attachments will download (there is no "download full mail" option in the Android mail client).

On further research we've found the Exchange server is giving a HTTP500 response to the ActiveSync GetAttachment command.  At first I blamed the AntiVirus (GroupShield) so we built another Exchange 2003 server in the Organisation without AV installed and moved some mailboxes to it, the exact same problem is present.

I think I've checked virtually all possible KB articles but I'm hoping I've missed something.  All other functions of ActiveSync are working except GetAttachment.

I'm not 100% certain but I understand that iOS might use a different mechanism when you do the "Download full message", maybe a SYNC followed by a ITEMOPERATIONS command to grab the attachment.  This may be why one method works and the other does not.


Any ideas?

Below is an excerpt from the ActiveSync session -
2014-01-20 18:53:46,771 INFO [HttpRequest.debugLog:305] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) REQ ToSrv POST /Microsoft-Server-ActiveSync Cmd=GetAttachment&AttachmentName=Inbox/Test%2018:31.EML/1_multipart_xF8FF_2_image001.png&User=joe.bloggs%40internal.local&DeviceId=SEC1082ABFAF1655&DeviceType=SAMSUNGGTI9195 HTTP/1.1 Content:n/a,0,0
2014-01-20 18:53:46,771 DEBUG [AbstractHttpMessage.debugLog2:759] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: Authorization: Basic joe.bloggs@internal.local:*****
2014-01-20 18:53:46,771 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: MS-ASProtocolVersion: 2.5
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: Connection: keep-alive
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: User-Agent: SAMSUNG-GT-I9195/101.40202
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: X-MS-PolicyKey: 0
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: Accept-Encoding: gzip
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: Content-Length: 0
2014-01-20 18:53:46,772 DEBUG [AbstractHttpMessage.debugLog2:755] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Header: Host: exch2k3.internal.local
2014-01-20 18:53:46,772 DEBUG [SocketThread.getServerSocket:1918] (Thread-46) (TAG,UP,1.2.3.4:16121,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,exch2k3.internal.local) Connecting to: exch2k3.internal.local:443

2014-01-20 18:53:56,346 INFO [HttpResponse.debugLog:173] (Thread-46) (TAG,DOWN,1.2.3.4:16137,SAMSUNGGTI9195,SEC1082ABFAF1655,joe.bloggs@internal.local,ActiveSync,GetAttachment,54237:exch2k3.internal.local) RSP FromSrv HTTP/1.1 500 Internal Server Error Content:text/html,56,0

Open in new window

0
Comment
Question by:Zenith63
  • 4
  • 3
7 Comments
 
LVL 76

Expert Comment

by:Alan Hardisty
ID: 39795079
0
 
LVL 11

Author Comment

by:Zenith63
ID: 39795211
Thanks for the reply Alan,

Yes I'd actually come across your article a couple of times before re-activating my EE account so I could post this question.  I've been through your article and the only two things I can see that I have not tried is to try ActiveSync over HTTP rather than HTTP and to run isinteg, however I don't think either of these will solve the issue as in general ActiveSync seems to be fine over HTTPS, it's one very specific ActiveSync command I'm having issues with, and on the isinteg test we have moved users to different databases, storage groups and Exchange servers.  It really is a very strange issue, any other ideas?

Regards,
Philip
0
 
LVL 76

Expert Comment

by:Alan Hardisty
ID: 39795267
No problems.  How exactly are the servers configured?

Is it one server with the problem or both servers?

What versions are the massync.dll's on both servers?

What firewall / router do you have installed?

Alan
0
The problems with reply email signatures

Do you wish that you could place an email signature under a reply? Well, unfortunately, you can't. That great Exchange/Office 365 signature you've created will just appear at the bottom of an email chain. What a pain! Is there really no way to solve this? Well, there might be...

 
LVL 11

Author Comment

by:Zenith63
ID: 39795298
Hi Alan,

I think I might have just discovered the issue so I might put this on-hold if you don't mind.  There is a MobileIron Sentry reverse-proxy in front of the Exchange servers and it seems the version they are on may not be encoding the GetAttachment POST command properly if the attachment name has a space or special character in it.  We hadn't come across the issue before because GetAttachment is dropped in Exchange 2010+ so the filename mangling hasn't been an issue for other customers!

To answer your question though; 3 Exchange servers, none set as front-ends.  Not sure on the firewall/router I'm afraid.
0
 
LVL 76

Accepted Solution

by:
Alan Hardisty earned 500 total points
ID: 39795308
Okay - thanks for the info.  Sounds like you might be on to something so see where that takes you and shout if that's a dead-end.

Alan
0
 
LVL 11

Author Comment

by:Zenith63
ID: 39807469
OK this turned out to be a bug in Sentry version 4.7.1, it doesn't handle spaces or special characters in attachment names properly when calling the GetAttachment function so Exchange naturally cannot retrieve the garbled file it asks for. Fixed in Sentry 4.9.0.

Thanks again Alan.
0
 
LVL 11

Author Closing Comment

by:Zenith63
ID: 39807472
Thanks for the help!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this video we show how to create a User Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Mailb…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now