Skip to content

BINARYMIME attempts to send content with DATA instead of BDAT command #151

Description

@nzbart

We are having trouble sending email to a server that supports the BINARYMIME extension. The server is correctly responding with a 503 "Bad sequence of commands" when MailKit sends a DATA command. Please see RFC 3030 section 3, "Framework for the Binary Service Extension":

The following service extension is hereby defined:

  1. The name of the binary service extension is "BINARYMIME".

  2. The EHLO keyword value associated with this extension is "BINARYMIME".

  3. The BINARYMIME service extension can only be used with the "CHUNKING" service extension.

...

BINARYMIME cannot be used with the DATA command. If a DATA command is issued after a MAIL command containing the body-value of "BINARYMIME", a 503 "Bad sequence of commands" response MUST be sent. The resulting state from this error condition is indeterminate and the transaction MUST be reset with the RSET command.

This is the conversation as dumped via the protocol logger (with personally identifiable information replaced with ?????):

EHLO ?????
250-????? Hello [?????]
250-SIZE 20971520
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH
250-X-EXPS NTLM
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-XEXCH50
250 XSHADOW
MAIL FROM:<?????> BODY=BINARYMIME
RCPT TO:<?????>
250 2.1.0 Sender OK
250 2.1.5 Recipient OK
DATA
503 5.5.1 Bad sequence of commands
RSET
250 2.0.0 Resetting

Is there any chance of altering BINARYMIME to use BDAT as required?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions