DirectAdmin, Exim and SpamExperts: message has lines too long for transport

Modified on Mon, 6 Feb, 2023 at 6:20 AM

When using Exim 4.95+ on DirectAdmin in combination with SpamExpers, you may encounter the following error:

[..] ** receiver@receiver-domain.com F=<sender@sender-domain.com> R=spamexperts_smarthost_router T=spamexperts_smarthost_transport: message has lines too long for transport


DirectAdmin has resolved this issue with Exim, however, SpamExperts requires additional configuration. The default configuration of SpamExperts for DirectAdmin with IP based authentication and SpamExperts for DirectAdmin with username based authentication is incomplete. This article assumes, however, that you did follow these steps.


To resolve this issue, open /etc/exim.conf or /etc/exim.transports.pre.conf. Find the following line:

spamexperts_smarthost_router:
  driver = manualroute


Create a new record after the row with driver and add message_linelength_limit = 52428800.

spamexperts_smarthost_router:
  driver = manualroute
  message_linelength_limit = 52428800

Restart Exim

systemctl restart exim



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article