5.3.4 Header size exceeds fixed maximum size
See original GitHub issueDescribe the bug We upgraded from 2.0.3 to 2.3.0 and had issues with attachments when sending through smtp.office365.com
In the logs we would see the final attachment boundary, and then a vague error.
C: --=-DdAczYjEkl/ABnOTLAA2UQ==--
S: 552 5.3.4 Header size exceeds fixed maximum size
C: RSET
S: 250 2.0.0 Resetting
See the screenshot for a comparison of the 2 versions. It seems that message size, and BDAT options have changed between the versions, which is enough to trigger our issues.
If possible, I’d like to know:
- Is there a mail server setting we can change to remediate this issue for 2.3.0?
- Is there setting in MailKit 2.3.0 to use the older style of message?
Screenshots
If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
- .NET Core 2.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Error: 552 5.3.4 header size exceeds fixed maximum size
This response is coming from the destination mail server and is usually due to the message exceeding the limit on total size of...
Read more >"552 5.3.4. Header size execeeds fixed maximum ...
Header size execeeds fixed maximum size" error message from Exchange. Emails with very long email headers (often due to overly long lists of...
Read more >552 #5.3.4 message header size exceeds limit
There is a 1000-line limit for the message header. When the header length exceeds 1000 lines, the ESA sends the message "552 #5.3.4...
Read more >Error 5.3.4 552 5.3.4
This error occurs when the size of the message that was sent by the sender exceeds the maximum allowed message size when passing...
Read more >Header size exceeds fixed maximum size
I get this error although the file has 20kb size and it has only one receiver. com.sun.mail.smtp.SMTPSendFailedException: 552 5.3.4 Header size ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Confirmed. I just commented out the code in FilteredStream that flushed the source stream in its own implementations of Flush and FlushAsync and sending via office365.com worked fine.
So it seems that there was a bug in MimeKit and also a bug in office365.com’s SMTP server implementation because it should not be freaking out when it receives smaller packets.
@jstedfast Personally, I am not. The solution for me was to disable size and BDAT, so I’m not waiting on the fix to be released. When it is released though, I will update to the latest version of the nuget package, remove the line of code that disables size and BDAT, and try sending that message again that had failed prior. Thank you for all of your guidance, troubleshooting, and fixing of the issue!