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?
 
@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"
 
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:
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?
 
@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
 
"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:
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:
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).
 
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.
 
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?
 
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?
 
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:
We are also getting the lines too long error with Exim 4.95, this was not an issue in Exim 4.94.2:
Code:
2021-11-05 14:36:03 1mizNz-000Ly1-1G ** [email protected] F=<[email protected]> R=lookuphost T=remote_smtp: message has lines too long for transport

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
 
We are also getting the lines too long error with Exim 4.95, this was not an issue in Exim 4.94.2:
Code:
2021-11-05 14:36:03 1mizNz-000Ly1-1G ** [email protected] F=<[email protected]> R=lookuphost T=remote_smtp: message has lines too long for transport

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:

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:
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?
 
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?
 
Back
Top