FETCH 1:* BINARY[1]

I expect it would be rare for a client to issue a FETCH for a specified
body part for multiple messages but it is certainly possible and I can
imagine odd situations where it would be quite plausible.

If the client already knows that all the messages in the range are encoded using only base64 or qp (the mandatory-to-implement encodings) then it knows that the request "cannot" fail due to UNKNOWN-CTE, thus it's perfectly reasonable for the client to issue that command.

Fair enough. Of course there's no law that says a client has to know what it's doing but let us suppose that it does. Then a lot depends on exactly what one means by "know". I was thinking of the kind of situation where a client knows implicitly that all messages filtered into a certain mailbox are created by a certain automaton and always formatted in an identical way. (And being the kind of client that uses BINARY, the last thing it wants to do is waste transmission cost by verifying the format by fetching BODYSTRUCTUREs.) Then one day someone decides to "improve" the automaton by having it use a different encoding method but neglects to inform the client.



Suppose that
the server works through the messages, decoding each appropriate MIME
part and sending it.  Then suppose it hits one message that has the
part encoded using a method that the server does not know about and
cannot decode.  The prescribed action is to send a NO response
containing UNKNOWN-CTE.  The problem lies in dealing with the
requirement that the FETCH (like any IMAP command) totally succeed or
totally fail.  What should a server do?

I would have the server return all the decodeable parts, and return a NO [UNKNOWN-CTE]. From that the client should be able to figure out what's going on and act appropriately.

Great! Thanks. That's the answer I wanted to hear <grin>



The second issue is what should a server do if it comes across a MIME
part that it is asked to send as BINARY but which it cannot decode
because the part is improperly encoded?  Maybe there should be some
response similar to UNKNOWN-CTE for this case?

I would just return UNKNOWN-CTE, since that's exactly what you're faced with.

Will do.


Pete




Reply via email to