aiosmtpd icon indicating copy to clipboard operation
aiosmtpd copied to clipboard

Possible standards violation: 8BITMIME (decode_data=True) implies Strict ASCII (if SMTPUTF8 not enabled)

Open pepoluan opened this issue 4 years ago • 2 comments

Currently, the only way to make SMTP return the 8BITMIME capability is by setting decode_data=True

However, this activated the piece of code in smtp_DATA which enforces "Strict ASCII".

Indicating 8BITMIME but rejecting "arbitrary octet-aligned data" is a violation of RFC 6152, notably Section 3.

I propose:

  1. We separate decode_data with "Strict ASCII", and
  2. For decode_data without "Strict ASCII", the encoding used for .decode() should be "Latin-1"

Point No. 1 above means that this change have the potential of breaking things; so I propose we bump up the version to 1.3 while we're at it.

pepoluan avatar Dec 07 '20 06:12 pepoluan

This might impact #216

pepoluan avatar Dec 07 '20 06:12 pepoluan

Changing the behavior of decode_data will likely break things.

I'll defer this to the "2.0" Milestone.

pepoluan avatar Dec 26 '20 19:12 pepoluan