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