question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

5.3.4 Header size exceeds fixed maximum size

See original GitHub issue

Describe 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:

  1. Is there a mail server setting we can change to remediate this issue for 2.3.0?
  2. 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. image

Server (please complete the following information):

  • .NET Core 2.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jstedfastcommented, Sep 7, 2019

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.

0reactions
ghostcommented, Sep 7, 2019

@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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found