How to resolve the mail Sending Error: "message has lines too long for transport"?

A recent update to cPanel has caused a problem for many people trying to send emails from the server. Users are getting bounce emails saying the "message has lines too long for transport."

This issue seems to be caused by an update to EXIM, which made cPanel also update and set a limit on the maximum line length in sending emails.

The problem is that PHP Mail and other packages don't break lines, so any large or HTML emails will have this issue. It's also seen with emails sent from Outlook.

The sender usually gets a bounce email with a specific subject when this happens.

Sample of Bounce email:

Subject: Mail delivery failed: returning message to sender

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its

recipients. This is a permanent error. The following address(es) failed:

message has lines too long for transport

Action: failed

This guide will show you the steps to fix the "maximum line length for SMTP transports" error and make sure your emails go through smoothly.

Solution 1: Adjusting Max Linе Lеngth for SMTP Transports in cPanеl/WHM

To fix the "Message Has Lines Too Long for Transport" problem, cPanel can change a setting called "Max Line Length for SMTP transports." This helps to avoid the error of the lines being too long. Follow these steps:

Step 1: Log in to your WHM (Web Host Manager) control panel.

Step 2: Use the search feature in WHM to find "Exim" and click on "Exim Configuration Manager."

Step 3: Look for the "Maximum Line Length for SMTP Transports" setting in the Exim Configuration options.

Step 4: The default value is usually set at 2048. Consider making it higher, like 40000, to allow for longer email lines. Find the field for this value and type in the number you want.

Step 5: Click on the "Save" button to apply the changes.

Check if the changes worked by keeping an eye on your mail server logs. Make sure that the adjustments have successfully fixed the "Message Has Lines Too Long For Transport" issue.

To prevent the “Message Has Lines Too Long For Transport” error, monitor your mail server logs and email client logs for any errors. If you see that your message is rejected because it's too long, adjust the limit to allow for longer messages.

While setting the “Max Line Length for SMTP transports” to a high number can help with the “Message Has Lines Too Long For Transport” error on a cPanel server, it's not the best solution. Use a value that fits the longest emails you send without exceeding the maximum line length.

Another fix is to use a different email client. Sometimes, this error happens because of the email client used by the person sending the email. Certain email clients may not format messages correctly, causing them to be too long.

Switching to a different email client could solve the problem and make sure your emails go through without any issues.

Solution 2: Adjusting Line Wrapping in Microsoft Outlook to Avoid "Message Has Lines Too Long For Transport" Error

When you use the Outlook email client to send emails and get an error saying, "message has lines too long for transport," it usually means your Outlook is not set up to wrap sentences in the email properly. This often happens in HTML-formatted emails. Long lines are difficult to read in emails, so email etiquette usually breaks lines to around 65 to 70 characters.

Simply put, Outlook automatically breaks your sentences, making outgoing emails shorter, like reducing writing space margins. Luckily, Microsoft's email client has a useful option to increase this value if necessary.

Follow these steps to wrap long lines in Microsoft Outlook and prevent the "Message Has Lines Too Long For Transport" error:

Step 1: Open Microsoft Outlook and go to the "File" menu in the top left corner.

Step 2: In the "File" menu, select "Options" to access Outlook Options.

Step 3: In the Outlook Options window, click on the "Mail" tab.

Step 4: Scroll down to the "Message format" section.

Step 5: Find the "Automatically wrap text at character" field.

Step 6: Enter your desired character number. It's recommended to keep this value between 65 and 80 characters.

Step 7: Click "OK" to save the changes.

Step 8: Close the Outlook Options window.

Adjusting the line-wrapping settings in Microsoft Outlook ensures that sentences are automatically broken within the specified character limit, following email etiquette. This prevents the "Message Has Lines Too Long For Transport" error when sending emails.

Conclusion

In summary, fixing the "Message Has Lines Too Long For Transport" error involves adjusting settings specific to the email system you're using. For cPanel/WHM, you need to tweak the "Max Line Length for SMTP transports" setting and keep an eye on logs. In Microsoft Outlook, preventing the error is about configuring line-wrapping. If problems persist, trying out different email clients is a recommended solution. These steps together ensure smoother and error-free email communication.


Was this answer helpful?

« Back

chat

/* */