Message has lines too long for transport ошибка

  • Reason for getting a bounce back error message when sending an email from outlook “message has lines too long for transport” It is most likely because Outlook is not configured to correctly wrap the sentences within the email. 
  • Long lines can be difficult to read in the emails, as such it is considered proper email etiquette to break the lines of your messages to somewhere between 90 and 100 characters, Also When you wrap long lines of text, the Outlook email client automatically breaks sentences away from the current line to start on a new line. This will shorten the length of all outgoing emails and is similar to narrowing the margins of the writing space. Outlook has a useful setting to set the line wrap to whatever number is needed

Step 1. Open Outlook and go to the File menu and Select Options.

absolutehosting.co.za - outlookoptions

Step 2. Within Outlook Options, select Mail.

absolutehosting.co.za - outlookmail

Step 3. Scroll down to Message format.

-In Automatically wrap text at character, enter a number to indicate where you want Outlook to wrap text. 

-Set characters to 90.
-Select OK to apply the changes and close the window.

Need more help with the email accounts on your 1-grid web hosting account? Visit the email category of our knowledge base.

Updated on April 12, 2023

Was this article helpful?

Related Articles

Если при отправке сообщений наблюдается ошибка в логе exim:

** R=dnslookup T=remote_smtp: message has lines too long for transport

Необходимо внести изменения в настройку remote_smtp. Находим

remote_smtp:

В этой секции находим

driver = smtp

И сразу после этой строки вставляем

message_linelength_limit=100000

Сохраняем, перезагружаем exim, проверяем работу exim и работу почты:

systemctl restart exim && systemctl status exim

Сервис должен быть активным:

Если всё заработало, проверяем работу почты и воспроизведение указанной ранее ошибки. Она не должна больше появляться.

If you see the error “Message has lines too long for transport” in Outlook, it’s likely because the email client isn’t configured to wrap sentences correctly, especially for HTML-formatted emails. Wrapping long lines of text is important in email etiquette, as long lines can be difficult to read.

To improve the readability of your emails, it’s recommended to break lines to around 65-70 characters. Outlook’s email client automatically breaks long sentences and starts them on a new line when lines are wrapped. This reduces the length of outgoing emails and makes them easier to read. You can easily configure the line wrap setting in Outlook to any number you prefer.

How to automatically wrap long lines in Outlook

Open Outlook and go to the File menu.

Select Options.

within Outlook Options, select Mail.

  • Scroll down to Message format.
  • In Automatically wrap text at character, enter a number to indicate where you want Outlook to wrap text. Keep this between 65 and 70 characters.
  • Select OK to apply the changes and close the window.

What version of OpenCart are you reporting this for?
3.0.3.8

Describe the bug
Order mails are not being sent with the mailserver rejecting them for «message has lines too long for transport» in accordance with RFC5322 and RFC2822.

To Reproduce
Steps to reproduce the behavior:

  1. Order anything.
  2. Receive no mail.
  3. Notice the error in the mail sending log

Expected behavior
The order mail being sent normally

Mail Log
2021-11-15 15:59:54 1mmdSc-0007cW-Q0 <= xxx@xxx.nl U=user P=local S=13397 T=»Shopname — Order 10″ from xxx@xxx.nl for yyy@yyy.com
2021-11-15 15:59:54 1mmdSc-0007cW-Q0 ** yyy@yyy.com F=xxx@xxx.nl R=smart_route T=remote_smtp: message has lines too long for transport
2021-11-15 15:59:54 1mmdSc-0007cW-Q0 Completed

Server / Test environment:

  • Deployed and live on a shared hosting.
  • Apache2 2.4.51
  • PHP 7.3.32
  • Exim 4.95

Additional context
Nothing was modified in the OC installation to have caused this. This is a standard/default installation when it comes to mail.
The host has recently updated Exim, and according to them and the changelog it enables line length limit by default. Any mail sent through the server that isn’t OpenCart is sent without a problem.

  • #41

Today I got a message from a customer who experienced the same on a centos 7.9.2009 server.

Is there a step by step instruction on how to downgrade?

  • #42

customer who experienced the same

What is the error ?

  • #43

«message has lines too long for transport»

  • #44

@cDGo
maybe this conf can help you
«message_linelength_limit=2048» //2048 is for test purpose, default value are 998

try adding to «/etc/exim.variables.conf»
and restart exim

if fixed issued, add it to «exim.variables.conf.custom»

  • #45

Hi jamgames2,

Adding «message_linelength_limit=2048» to «/etc/exim.variables.conf» sets exim to proccess stopped

Exim panic log:
Exim configuration error in line 30 of /etc/exim.variables.conf:
main option «message_linelength_limit» unknown

So I double checked that exim is in fact version 4.95.
And ofcourse I didn’t used the quotes, and also left out the comment.

Than I also rebuild Apache, PHP and Exim, but still the issue remains.

Last edited: Nov 2, 2021

  • #46

Sorry, I wrong reading from change log
not for global config, It should for smtp transport option

Example: put directly into remote_smtp:
inside exim.conf

this’s your problem, it relate to «message_linelength_limit» ( Line 5054 )

this version, I still learning some future/update too

  • #47

Hi jamgames2,

Thanks for looking into it again.
I’m afraid, I’m not sure what you want me to do.

In exim.conf I’ve got no reference to remote_smtp at all.
So Should I add it and where?
And what value to use?

  • #48

@cDGo

remote_smtp:
driver = smtp
headers_add = «${if def:authenticated_id{X-Authenticated-Id: ${authenticated_id}}}»
interface = <; ${if exists{/etc/virtual/domainips}{${lookup{$sender_address_domain}lsearch*{/etc/virtual/domainips}}}}
helo_data = ${if exists{/etc/virtual/helo_data}{${lookup{$sending_ip_address}iplsearch{/etc/virtual/helo_data}{$value}{$primary_hostname}}}{$primary_hostname}}
message_linelength_limit = 2048
.include_if_exists /etc/exim.dkim.conf

if im not wrong, should be like this.
2048 is for test, it upto you, too much value can be security issued

  • #49

«message has lines too long for transport»

This is not a bug, but result of finally added built-in checking of SMTP standard compliance, that specifies maximum line length (998 characters excluding CRLF).
1) Microsoft Outlook implementation is broken and wraps line after 1012 characters (for Reference: header) — someone in MS heard about SMTP maximum line length, but forgot to include length of e.g. ‘References: ‘ header name to overall line length 🤟
2) Some clients are even more broken and doesn’t wrap too long lines at all.

Last edited: Nov 2, 2021

  • #50

Adding these lines to exim.conf makes the proccess of exim stop again when I restart the service
panic log:
Exim configuration error in line 1082 of /etc/exim.conf:
missing error type in retry rule

I also tried to only have this, but same problem:
remote_smtp:
message_linelength_limit = 2048

So I now downgraded exim to 4.94.2

And after a while new emails do come in again, but:

echo «Subject: Hello» | sendmail -t -f -i [email protected]
Still gives:
2021-11-02 11:38:21 1mhrBN-00019V-7d 1mhrBN-00019V-7d no recipients found in headers

Last edited: Nov 2, 2021

  • #52

If Outlook doesn’t count line lengths right, I think it would make sense for CustomBuild to increase the line length limit in Exim to something more than 998 during build. We’re seeing customers having this issue as well now (with Reference: header).

  • #53

If Outlook doesn’t count line lengths right, I think it would make sense for CustomBuild to increase the line length limit in Exim to something more than 998 during build. We’re seeing customers having this issue as well now (with Reference: header).

This is not SMTP compliant solution, so I think it is not recommended to set it as ‘default’ + each user can adjust maximum length value.

Ideally Exim team should implement builtin line folding, something like Postfix already has.
Line length exceeds maximum length? Add CRLF + space after x characters. This is 100% valid solution.
Currently there is possibility to implement it as transport_filter in e.g C++, but dealing with input, that can reach hundreds of megabytes is not pleasent.

  • #54

Perhaps I’m missing something, but it doesn’t look like I can override the default in a way that is kept between exim/exim_conf rebuilds by CustomBuild?

  • #55

After the last update, I have already received 2 reports from customers about the «message has lines too long for transport» error. They both use Outlook and they both had attachments in the message, I saw that other users here are reporting this too, but I didn’t understand if the problem is server side with exim or client side with outlook? Anyone have to suggest a solution to this?

Pzz

Pzz

Verified User


  • #56

I’m not really into these SRS-things but I installed 4.95 yesterday and got the same problem. And after reading this forum I wonder why the update to 4.95 was still present at DA (or CB). Maybe a stupid question from someone who doesn’t understand enough of the updateprocess of DA…

Last edited: Nov 4, 2021

  • #57

We are also getting the lines too long error with Exim 4.95, this was not an issue in Exim 4.94.2:

Workaround: downgrading to Exim 4.94.2:

Code:

echo "exim:4.94.2:" >> /usr/local/directadmin/custombuild/custom_versions.txt
/usr/local/directadmin/custombuild/build update
/usr/local/directadmin/custombuild/build exim

  • #58

We are also getting the lines too long error with Exim 4.95, this was not an issue in Exim 4.94.2:

Workaround: downgrading to Exim 4.94.2:

Code:

echo "exim:4.94.2:" >> /usr/local/directadmin/custombuild/custom_versions.txt
/usr/local/directadmin/custombuild/build update
/usr/local/directadmin/custombuild/build exim

This wasn’t an issue in 4.94.2, because messages were not validated for maximum line length specified in RFC standard in that version, but for a long time some people used such a hack to enforce the same functionality:

Code:

remote_smtp:
...
  message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}

In 4.95 there is a smtp transport (not router) option (message_linelength_limit) to specify maximum line length:

30. The smtp transport

Exim is a message transfer agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the Internet.


www.exim.org

If you want to make your mailserver violate SMTP standard, you can change default value (998) to eg. 4096 via editing /etc/exim.conf:

Code:

#COMMENT#61:
remote_smtp:
  driver = smtp
  headers_add = "${if def:authenticated_id{X-Authenticated-Id: ${authenticated_id}}}"
  interface = <; ${if exists{/etc/virtual/domainips}{${lookup{$sender_address_domain}lsearch*{/etc/virtual/domainips}}}}
  helo_data = ${if exists{/etc/virtual/helo_data}{${lookup{$sending_ip_address}iplsearch{/etc/virtual/helo_data}{$value}{$primary_hostname}}}{$primary_hostname}}
  hosts_try_chunking =
  hosts_try_fastopen =
.include_if_exists /etc/exim.dkim.conf

remote_smtp_forward_transport:
  driver = smtp
  headers_add = "${if def:authenticated_id{X-Authenticated-Id: ${authenticated_id}}}"
  interface = <; ${if exists{/etc/virtual/domainips}{${lookup{$original_domain}lsearch*{/etc/virtual/domainips}}}}
  helo_data = ${if exists{/etc/virtual/helo_data}{${lookup{$sending_ip_address}iplsearch{/etc/virtual/helo_data}{$value}{$primary_hostname}}}{$primary_hostname}}
  hosts_try_chunking =
  hosts_try_fastopen =
.include_if_exists /etc/exim.dkim.conf

to

Code:

#COMMENT#61:
remote_smtp:
  driver = smtp
  message_linelength_limit = 4096
  headers_add = "${if def:authenticated_id{X-Authenticated-Id: ${authenticated_id}}}"
  interface = <; ${if exists{/etc/virtual/domainips}{${lookup{$sender_address_domain}lsearch*{/etc/virtual/domainips}}}}
  helo_data = ${if exists{/etc/virtual/helo_data}{${lookup{$sending_ip_address}iplsearch{/etc/virtual/helo_data}{$value}{$primary_hostname}}}{$primary_hostname}}
  hosts_try_chunking =
  hosts_try_fastopen =
.include_if_exists /etc/exim.dkim.conf

remote_smtp_forward_transport:
  driver = smtp
  message_linelength_limit = 4096
  headers_add = "${if def:authenticated_id{X-Authenticated-Id: ${authenticated_id}}}"
  interface = <; ${if exists{/etc/virtual/domainips}{${lookup{$original_domain}lsearch*{/etc/virtual/domainips}}}}
  helo_data = ${if exists{/etc/virtual/helo_data}{${lookup{$sending_ip_address}iplsearch{/etc/virtual/helo_data}{$value}{$primary_hostname}}}{$primary_hostname}}
  hosts_try_chunking =
  hosts_try_fastopen =
.include_if_exists /etc/exim.dkim.conf

It’s important to guard edited /etc/exim.conf via chattr +i /etc/exim.conf, because CustomBuild will override it when you run ./build exim_conf or ./build exim or ./build dovecot.

Last edited: Nov 5, 2021

  • #59

So, for those of us getting the «message has lines too long for transport» error — is the consensus that we downgrade to 4.94.2? I’ve just gotten a few complaints from one client who uses Outlook. Their parent organization uses Microsoft 365 and my client is now unable to send email them.

Are there any security implications to downgrading?

  • #60

So, for those of us getting the «message has lines too long for transport» error — is the consensus that we downgrade to 4.94.2? I’ve just gotten a few complaints from one client who uses Outlook. Their parent organization uses Microsoft 365 and my client is now unable to send email them.

Are there any security implications to downgrading?

Exim 4.95

Today I got a message from a customer who experienced the same on a centos 7.9.2009 server. Is there a step by step instruction on how to downgrade?

forum.directadmin.com


forum.directadmin.com

Понравилась статья? Поделить с друзьями:
  • Mertech 50 mini ошибка ee5
  • Merrychef ошибка е104
  • Mercury ошибка 025
  • Mercury кассовый аппарат ошибка 478
  • Mercury 231 ошибка e01