Recently many of my emails are rejected, and I am getting the below message regardless to whom I sending it to
You get a bounce from the server:
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
This problem isn’t just seen with cPanel servers but is also an issue with other servers that have the Exim version 4.95.
How to fix “message has lines too long for transport”
The default message_linelength_limit was increased, and an option to adjust this limit was added to the Exim Configuration Manager in cPanel version 102.0.2. This setting is called “Maximum line length for SMTP transports”
Workaround :
Change “Maximum line length for SMTP transports” from “2048” to “1000000”. within WHM > Exim Configuration Manager > Advanced Configuration Manager.
You can run the following command to confirm the Exim change in the cPanel server
grep -i linelen /etc/exim.conf.localopts
output
[root@nod]# grep -i linelen /etc/exim.conf.localopts
message_linelength_limit=1000000
Although we recently raised the “Maximum line length for SMTP transports” from “2048” to “1000000”.limits in WHM, we’ve been still receiving reports that messages are being rejected with the “Message has lines too long for transport” error. If this is happening at your server then it’s likely because of your MailChannels Exim configuration separately from cPanel standard configuration. So, even if you raise the limit in WHM, you will continue to see the same error.
Workaround :
Add a message_linelength_limit line to your @TRANSPORTSTART@ entry for your Smarthost within WHM > Exim Configuration Manager > Advanced Configuration Manager.
For MailChannels example,
#MAILCHANNELS_TRANSPORTSTART
mailchannels_smtp:
driver = smtp
hosts_require_auth = *
message_linelength_limit = 1000000
tls_tempfail_tryclear = true
Click the Save button to restart Exim. If that doesn’t work, then restart it manually from server WHM