SOLVED Problem CPANEL-39824 : message has lines too long for transport - Since January 21, 2022

sparek-3

Well-Known Member
Aug 10, 2002
2,067
237
368
cPanel Access Level
Root Administrator
When the value is changed in the WHM interface we update /etc/exim.pl.local with the following value:

our $O_DIRECTORY = 65536;
It's not a value set in /etc/exim.conf.localopts?

You really need to be able to make every configuration change through a command-line process. Because logging into 50 different WHMs to make a change isn't feasible. But you can use something like Cluster SSH to log into 50 servers all at once and mirror the same command to all 50 servers.
 

Michael-Inet

Well-Known Member
Feb 20, 2014
125
16
68
Nashville, TN, USA
cPanel Access Level
Root Administrator
Hi Rex,

This is the process that triggered me seeing the error in the first place.


You can read the whole thread (lol) or just start reading from:

# # #

Okay, this is long winded, and addresses the issue that you want an exact replication of the original emails being sent by cron so that you don’t have to change email filters (or other flagging logic). As well as addressing that we can’t use existing text from cPanel commands in crontab (as cPanel’s regex frags stuff then).
As desired I can open a ticket or feature request using one of my production (but not used much as it's in France) DNSONLY boxes. You can do most anything you want with it as long as it serves DNS...

Let me know, best,
Michael
 

Michael-Inet

Well-Known Member
Feb 20, 2014
125
16
68
Nashville, TN, USA
cPanel Access Level
Root Administrator
Thanks Sparek,

Code:
[email protected] [~/bin]# grep -i linelen /etc/exim.conf.localopts
message_linelength_limit=65536

[email protected] [~]# grep -i linelen /etc/exim.conf.localopts
[email protected] [~]#
Yeah, seems like an

echo 'message_linelength_limit=65536' >> /etc/exim.conf.localopts

should do the trick? (Well and restart Exim)

Thoughts?
 

sparek-3

Well-Known Member
Aug 10, 2002
2,067
237
368
cPanel Access Level
Root Administrator
You would have to run /scripts/buildeximconf after making changes to the /etc/exim.conf.localopts file and then restart Exim.

The /scripts/buildeximconf script just takes all of the various configuration options and templates scattered about for cPanel's Exim control and builds an actual /etc/exim.conf file out of it.

You still need to restart Exim after all of this to have the new configuration go into affect - /scripts/restartsrv_exim

IF message_linelength_limit is an actual configuration option that is configured in /etc/exim.conf.localopts. I have no idea if that's actually the case.
 
  • Like
Reactions: Michael-Inet

mdspidle

Member
Feb 17, 2015
7
1
51
cPanel Access Level
Root Administrator
I am on v 102.0.11 and I am having this issue now. It is obviously not resolved. I have tried changing the value but it has no effect. Still get the error when trying to send email via php
 
  • Like
Reactions: allpar

Steini Petur

Well-Known Member
Apr 24, 2016
87
20
58
Iceland
cPanel Access Level
Root Administrator
Hi, we did the same with our to 65536 which should be more than enough, we set the settings as well but it does nothing,

Our client is running into:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:

[email protected]

message has lines too long for transport

[email protected]???.com

message has lines too long for transport
The issue here is that the message according to our remote mail server, was delivered so either cPanel transmitted "partial message" to be delivered and didn't really STOP the message from going through our smart, OR it is a false bug reply to the client even if the message goes

1nk3kE-0001ra-Ax2022-04-28 12:59host server[email protected][email protected][email protected]allowlistedRE: Introductiondelivered
1nk3kE-0001ra-Ax2022-04-28 12:59host server[email protected][email protected][email protected]allowlistedRE: Introductiondelivered

According to our SpamExpert server, the message went out to the receivers, but the sender received a bounce back that it didn't, so either cPanel is flawed and

a) Sends out the message, but tells the sender it didn't (false positive trigger in this message length)
b) Sends out partial rendered message, then tells the client some of it wasn't sent (UNLIKELY)

So we need someone to look into this at cPanel.

Just my two cents, following this thread.
 

Steini Petur

Well-Known Member
Apr 24, 2016
87
20
58
Iceland
cPanel Access Level
Root Administrator
@Steini Petur - we changed the value limit to 1000000 so you can try increasing that even more and see if that helps.
Doesn't that seem a tad overzelous, I mean


It seems like 1M bytes is pushing it a bit, this does however not explain if the return to the client about "message not sent" is actually false because our remote server does send a message which means the message did leave cpanel and was transmitted through the smart routing to the spamexpert server.

Our Exim transportstart is because we use SpamExperts

remote_smtp_smart_dkim:
driver = smtp
hosts_require_tls = *
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}
dkim_domain = $sender_address_domain
dkim_selector = default
dkim_private_key = "/var/cpanel/domain_keys/private/${lookup{$dkim_domain}dsearch{/var/cpanel/domain_keys/private/}}"
dkim_canon = relaxed
headers_add = "${perl{check_mail_permissions_headers}}"


remote_smtp_smart_regular:
driver = smtp
hosts_require_tls = *
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch*{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch*{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}
headers_add = "${perl{check_mail_permissions_headers}}"


So as someone said above he added the 65k line there?, shouldn't it be enough to change the exim itself?

EDIT: If you add "message_linelength_limit = 65536"just under driver, things should work, this is me with SpamExpert outgoing setup
 
Last edited:

Steini Petur

Well-Known Member
Apr 24, 2016
87
20
58
Iceland
cPanel Access Level
Root Administrator
@cPRex here is my problem I believe, took a command from way back on the page

[[email protected] ~]# exim -bP transport_list | while read list ; do echo "$list" ; exim -bP transport $list | grep line ; done
remote_smtp_smart_dkim
message_linelength_limit = 998
remote_smtp_smart_regular
message_linelength_limit = 998
mailman_virtual_transport
mailman_virtual_transport_nodns
remote_smtp
message_linelength_limit = 100000
dkim_remote_smtp
message_linelength_limit = 100000


It indicates "linelength limit 998 for the smart dkim and regular, whileon the bottom its set to 100k which I set earlier,,so where is the settings for the former which is 998

[email protected] etc]# grep -ir "100000" exim*
exim.conf: message_linelength_limit = 100000
exim.conf: message_linelength_limit = 100000
exim.conf.localopts:message_linelength_limit=100000


Here are the 100k ones but where is this 998 coming from


[[email protected] etc]# exim -bP transport remote_smtp_smart_dkim | grep "998"
message_linelength_limit = 998

[[email protected] etc]# exim -bP transport remote_smtp_smart_regular | grep "998"
message_linelength_limit = 998


okay lets append the message_linelength_limit into the transport start with SpamExperts and see if that wont resolve this for me..

[[email protected] etc]# exim -bP transport_list | while read list ; do echo "$list" ; exim -bP transport $list | grep message_linelength ; done
remote_smtp_smart_dkim
message_linelength_limit = 65535
remote_smtp_smart_regular
message_linelength_limit = 65535


Resolves this, probably this is why the message failed, it was 998 on the remote_smtp_smart while proper in cPanel, need to let SpamExperts know about this.
 

Steini Petur

Well-Known Member
Apr 24, 2016
87
20
58
Iceland
cPanel Access Level
Root Administrator
Hi Rex, I had not seen this, I don't genuinely look at those articles unless something is wrong, didn't occur to me this would affect us this much.

Seems like there should be a way to make the figure in the Exim configuration, search for smarthost use and append the line to the TRANSPORTSTART if smarthost exists.