Code: Select all
message has lines too long for transport
Why does this happen?
Some email clients (most often Microsoft Outlook, especially after copy/paste from Word) can generate emails where a single line exceeds the standard SMTP line length (998 characters). By default, Exim (the mail server used by myVesta) will block or fail to forward these emails, resulting in the above error.
How to fix:
Edit your Exim configuration template:
Open this file:
Code: Select all
/etc/exim4/exim4.conf.template
Code: Select all
message_linelength_limit
Code: Select all
remote_smtp
Code: Select all
remote_forwarded_smtp
Code: Select all
message_linelength_limit = 1G
Do this for every section where you find this parameter.
Update your Exim configuration and restart the service:
Code: Select all
update-exim4.conf
systemctl restart exim4
Code: Select all
echo -e "Subject: Test long line\nTo: [email protected]\nFrom: [email protected]\n\n$(printf 'A%.0s' {1..1500})" > /tmp/testlongline.txt
exim -v [email protected] < /tmp/testlongline.txt
A few notes
- This change tells Exim to accept (and forward) messages with lines much longer than the RFC standard, solving compatibility issues with some clients.
- After making this change, emails that previously bounced due to this error should go through without problems.
- If you want to strictly follow the RFC, you might keep the limit, but in the real world, relaxing it avoids headaches for your users.