/
/
Exim returns the error "message has lines too long for transport" when sending a message

Exim returns the error "message has lines too long for transport" when sending a message

Symptoms

The Exim mail server does not send emails, there is a format error in the server error log:

<email-id> ** <email-addressee> R=dnslookup T=remote_smtp: message has lines too long for transportation

Causes

The message text contains a string with a number of characters that, in total bytes, exceeds the limit of the "message_linelength_limit" parameter.

Solution

The best solution is to address the problematic message: identify and edit the problematic line.

If it is not possible to do so, you can increase the value of the "message_linelength_limit" parameter:

  1. Using any text editor, open the configuration file "/etc/exim4/exim4.conf.template" ("/etc/exim/exim.conf" for CentOS and AlmaLinux);
  2. Go to the "remote_smtp" section on the line after the "driver = smtp" parameter;
  3. By default, "message_linelength_limit" is not written in the configuration file, so it must be specified along with the required value, e.g., "message_linelength_limit=10000".

In this article