stalwartlabs/smtp-server

[bug]: Invalid MIME Content: Single text value size (33061) exceeded allowed maximum (32768)

johansmitsnl opened this issue · 2 comments

What happened?

When I try to send a email to a M365 account I get an error: (host 'xxx.mail.protection.outlook.com' rejected command 'BDAT 39278 LAST' with code 554 (5.6.211) 'Invalid MIME Content: Single text value size (33061) exceeded allowed maximum (32768) for the 'Autocrypt' header. [DU0P189MB2614.EURP189.PROD.OUTLOOK.COM 2023-08-13T19:53:47.768Z 08DB9C24282B6B4C] [AM0PR06CA0099.eurprd06.prod.outlook.com 2023-08-13T19:53:47.777Z 08DB9AF04AB2BAF4] [AM7EUR06FT066.eop-eur06.prod.protection.outlook.com 2023-08-13T19:53:47.790Z 08DB9B6C45AE318B]')

How can we reproduce the problem?

I have only ed25519 for dkim. I'm looking to disable dkim or allow a 1024 rsa key. AWS Route53 does not support 2048 keys in their DNS.

Version

v0.3.1

Which directory type are you using for local address resolution?

LDAP

What operating system are you using?

Linux

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

This error seems related to something else. Based on the error message, the remote server apparently is rejecting the email because the Autocrypt header is too big. This header is probably being added by your mail client.
As a test, try sending a plain text email without encryption or signatures. If it goes well then you'll have to find out why the Autocrypt header added by your client is so large.

Was indeed the autocrypt. Disabled it because I was confused with the config option.