Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mail declined by recipient: Syntax error - line too long #106

Open
LinusGeffarth opened this issue May 1, 2020 · 8 comments
Open

Mail declined by recipient: Syntax error - line too long #106

LinusGeffarth opened this issue May 1, 2020 · 8 comments

Comments

@LinusGeffarth
Copy link

I cannot send emails to some email addresses. They are rejected with the following message:

Syntax error - line too long

and some more info from here:

Action: failed
Status: 5.0.0
Remote-MTA: DNS; mx-ha02.web.de [212.227.17.8]
Diagnostic-Code: SMTP; 501 Syntax error - line too long
Last-Attempt-Date:
Final-Log-ID: i04d66w419XirMM

Any idea what I need to do?

@evitiello
Copy link

I receive the same type of issue when sending an HTML attachment. The mail arrives, but it is truncated and has the following in the header:

Sun-Java-System-SMTP-Warning: Lines longer than SMTP allows found and truncated.

@mbarnach
Copy link
Member

mbarnach commented Oct 3, 2020

@LinusGeffarth Could you provide an example of mail and address that is declined?
Could it be declined by the receiving server (as the error message suggested)?

@LinusGeffarth
Copy link
Author

It is declined by the receiving server, yes. That's why I can still send to some email addresses, while I cannot send to others.
Unfortunately, it's been a while since this issue occurred so I'm not sure I'll find that email...what exactly do you need? The Leaf view? Or the raw email?

@mbarnach
Copy link
Member

mbarnach commented Oct 3, 2020

I was looking for a way to reproduce it.
I've also found that the maximum length for a line should be 998 (1000+CR LF).
This StackOverflow thread shows the same issue and the solution.
You could add that to your content.
If you come up with a good/generic solution, feel free to submit a PR!

@LinusGeffarth
Copy link
Author

Yeah that 998 chars per line was probably the issue. However, I was not able to reduce line lengths, because just making shorter HTML in the Leaf views didn't help.

@mbarnach
Copy link
Member

mbarnach commented Oct 3, 2020

Could it be the CR LF that was not using the right encoding? In that case, we will need to have a way to reproduce it in order to fix it...

@LinusGeffarth
Copy link
Author

I'll see if I can grab a copy of the email I tried to send. In which form do you need it? The email itself, or the Leaf view, or something else?

@mbarnach
Copy link
Member

mbarnach commented Oct 3, 2020

The raw text should do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants