content-disposition

This is a discussion on content-disposition within the IMAP forums in Other Technologies category; I am tring to get attachment from exchange server 2003. I can telnet to exchange server port 143 which supports IMAP protocol. I can send command to server and get response informartion. My question is where I can get the information of contect-date parameter in content- disposition? I use this command "A001 FETCH 215 BODYSTRUCTURE" to get bodystructure of message. I can see the attachment, filename in content-disposition. However, I can't see creation-date and modification-date. here is sample of response from exchange server * 215 FETCH (BODYSTRUCTURE ((("TEXT" "PLAIN" ("charset" "us-ascii") NIL NIL "QUOTED-PRINTABLE" 7 1 NIL NIL NIL)("TEXT" "HTML" ...

Go Back   Application Development Forum > Other Technologies > IMAP

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-28-2008, 09:14 AM
TravelMan
Guest
 
Default content-disposition

I am tring to get attachment from exchange server 2003. I can telnet
to exchange server port 143 which supports IMAP protocol. I can send
command to server and get response informartion. My question is where
I can get the information of contect-date parameter in content-
disposition?

I use this command "A001 FETCH 215 BODYSTRUCTURE" to get bodystructure
of message. I can see the attachment, filename in content-disposition.
However, I can't see creation-date and modification-date.

here is sample of response from exchange server

* 215 FETCH (BODYSTRUCTURE ((("TEXT" "PLAIN" ("charset" "us-ascii")
NIL NIL "QUOTED-PRINTABLE" 7 1 NIL NIL NIL)("TEXT" "HTML" ("charset"
"us-ascii") NIL NIL "QUOTED-PRINTABLE" 1306 22 NIL NIL NIL)
"alternative" ("boundary" "----_=_NextPart_002_01C90798.96D28C3F") NIL
NIL)("IMAGE" "JPEG" ("name" "Sample.JPG") NIL "Sample.JPG" "BASE64"
26226 NIL ("attachment" ("filename" "Sample.JPG")) NIL)
"mixed" ("boundary" "----_=_NextPart_001_01C90798.96D28C3F") NIL NIL))
A001 OK FETCH completed.



Thanks,
Reply With Quote
  #2  
Old 08-28-2008, 06:31 PM
Sam
Guest
 
Default Re: content-disposition

TravelMan writes:

> I use this command "A001 FETCH 215 BODYSTRUCTURE" to get bodystructure
> of message. I can see the attachment, filename in content-disposition.
> However, I can't see creation-date and modification-date.


There's no such thing as "creation-date" and "modification-date" in IMAP.

The only two defined properties are called "DATE" and "INTERNALDATE". "DATE"
is obtained from the message's Date: header, and may be NIL if the message
doesn't have one. "DATE" is returned by in the ENVELOPE response, not
BODYSTRUCTURE. "INTERNALDATE" is a server-defined datestamp, usually the
time that the message was delivered to the mailbox, and it's returned by a
separate FETCH command.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAki3J08ACgkQx9p3GYHlUOKD0ACfU92nwUw+aN 8aPqL6doXJC5AY
p6AAmQEf3hsohHr58dgX7tBfpVZjugiF
=PRfk
-----END PGP SIGNATURE-----

Reply With Quote
  #3  
Old 08-29-2008, 07:49 AM
TravelMan
Guest
 
Default Re: content-disposition

Thanks your reply. I would like the date of attachment. I could not
find it using FETCH command. I did some research and fould creation-
date and modification-date are the part of content-disposition
parameters based on RFC2183. Also, I can see those parameters from
outlook source view,

--_004_4B11063F81CADD4CBBEBCEFA7AA05999022B3614A928S YDDC1Adatu_
Content-Type: text/plain; name="Note.txt"
Content-Description: Note.txt
Content-Disposition: attachment; filename="Note.txt"; size=258;
creation-date="Tue, 07 Aug 2008 21:00:57 GMT";
modification-date="Tue, 07 Aug 2008 21:00:57 GMT"
Content-Transfer-Encoding: base64


If there do have these information stored in Exchange server side, how
can we get them using IMAP command?

Thanks
Reply With Quote
  #4  
Old 08-29-2008, 10:14 AM
Mark Crispin
Guest
 
Default Re: content-disposition

On Fri, 29 Aug 2008, TravelMan posted:
> If there do have these information stored in Exchange server side, how
> can we get them using IMAP command?


It's a simple three steps.

1. Send a bug report to Microsoft and ask them to fix Exchange so that it
includes the information in the BODYSTRUCTURE, as the IMAP specification
tells them to do.

2. Wait for Microsoft to fix the bug.

3. Implement the code to read the data in your program.

What? You use Exchange, and actually expect this to happen before the sun
novas? Oh dear, oh my...


If the above answer isn't clear enough, I'll be more direct: you can't.
A mechanism exists in IMAP for reporting those disposition attributes as
part of the BODYSTRUCTURE. For whatever reason, Exchange doesn't
implement that mechanism.

Microsoft has other priorities for Exchange than IMAP, so it is unlikely
that you will see this fixed any time soon. And, since you report using
Exchange 2003, it is quite unlikely that they will fix it in such an old
version.

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 01:59 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.