This guide aims to walk you through fixing the "Maximum line length for SMTP transports" error in cPanel. Whether you're a regular cPanel user working around the limitation or a root user making permanent fixes, following this guide will restore your email reliability.
Symptoms
- Emails bounce with obscure SMTP errors
- Clients report "message too long" or "line length exceeded"
- Your transactional emails (like property inquiries) go missing
Possible Cause
The Maximum line length for SMTP transports setting in cPanel controls how long email lines can be before your server refuses to send them. The SMTP protocol limits line length to 1000 characters including CRLF. This is an international standard (The RFC 5322 (SMTP 5321)). By default, cPanel uses 2048
. This is non-compliant and violates RFC 5321 standards as values like 2048 can be used when you're delivering internally or to non-standard MTAs.
- RFC 5321 Standard: Maximum 1000 characters per line (including CRLF)
- cPanel Default: 2048 characters (violates standards!)
- Real-World Impact: Remote servers reject your emails as non-compliant
RFC 5321 998 Characters
998 characters for content
+ 2 characters for CRLF (\r\n)
= 1000 total (RFC 5321 compliant)
Why cPanel Uses 2048 for SMTP Line Length
As stated above, RFC 5321 (the SMTP standard) dictates a maximum line length of 1000
characters, including CRLF. In practice, this means the body of each line must not exceed 998
characters before the line break.
While cPanel's choice to set the default SMTP line length to 2048
may appear to violate standards, but it's a calculated decision driven by real-world email behavior and user experience.
Why Does cPanel Use 2048?
- Accommodating Modern Email Clients
Many popular email clients (like Outlook, Thunderbird, and webmail apps) generate Base64-encoded messages or HTML bodies that frequently exceed 998 characters per line. Setting a limit of 2048 avoids delivery errors or silent failures in these cases.
- Minimizing Support Tickets
Most cPanel users are not sysadmins. They use CMS tools (like WordPress) that send complex emails without granular control over MIME formatting or line breaks. Rather than frustrate users with cryptic SMTP rejections, cPanel prioritizes resilience over strict compliance.
- Compatibility vs. Purism
In the evolving landscape of email delivery, well, many modern mail systems tolerate longer lines without rejection. cPanel makes a conscious trade-off which is to prioritize successful delivery in 99% of cases over strict RFC purity.
What about Plesk? How Does Plesk Handle This?
Plesk doesn't directly set the SMTP line length in its GUI, but it typically ships with Postfix as its MTA.
Surprisingly, Postfix defaults to a message_line_length_limit
of:
postconf | grep line_length_limit
Output is usually:
line_length_limit = 2048
lmtp_line_length_limit = 998
smtp_line_length_limit = 998
This means that Postfix is kinda sticking to strict standards.
SMTP Line Length Comparison Table
Platform | MTA | Default Max Line Length | RFC-Compliant? | Rationale |
---|---|---|---|---|
cPanel | Exim | 2048 | ❌ No | Reduce errors from modern email clients |
Plesk | Postfix | 998 | ❌ No | Totally compliant |
RFC 5321 | — | 1000 (998 + CRLF) | ✅ Yes | Ensure strict interoperability |
Solution for Regular cPanel Users
- Switch to Webmail instead of Outlook or Thunderbird. This respects server line length limits automatically. Perfect for urgent emails while your host fixes the issue
- Try the latest version of Microsoft Edge or Safari. Configure Thunderbird with different line wrapping settings. See Content conversion in Exchange Server for more info.
- Use plain-text format temporarily instead of HTML emails as clients like Outlook may automatically format content into longer lines. Note that Base64 and MIME attachments are especially sensitive to line lengths.
- Contact our technical team by submitting a support ticket requesting RFC 5321 compliance. Mention potential delivery issues with major email providers.
Solution for Root Users
Diagnose Your Current Configuration
Before fixing anything, it is important to see what you're working with. This command checks all SMTP transport configurations:
sudo exim -bP transport_list | while read list; do echo "$list"; exim -bP transport $list | grep line; done
This command checks all transports (custom, remote_smtp, etc.) for their message_linelength_limit
.
exim -bP transport_list
- Lists all email transport methodswhile read list
- Loops through each transportgrep line
- Shows line length settings for each transport
You'll likely see output like:
message_linelength_limit = 2048
dkim_remote_smtp
message_linelength_limit = 2048
remote_forwarded_smtp
message_linelength_limit = 2048
dkim_remote_forwarded_smtp
message_linelength_limit = 2048
-- truncated ---
You can also use:
sudo exim -bP transport remote_smtp | grep message_linelength_limit
Method 1: WHM Interface (Recommended)
- Log into WHM as the 'root' user
- Go to:
WHM » Service Configuration » Exim Configuration Manager
- Click on the "Mail" tab
- Find "Maximum line length for SMTP transports"
- Change the value from 2048 to a higher value.
- Click "Save"
Method 2: Advanced Editor (TRANSPORTSTART Section)
Always backup your Exim configuration before changes and keep a record of your modifications for future reference.
- In WHM: Go to Exim Configuration Manager » Advanced Editor
- Find Section: TRANSPORTSTART
- Add these lines at the end:
smtp:
driver = smtp
port = 587
hosts_require_auth = *
hosts_require_tls = *
message_linelength_limit = $value
Email and Your Business
Email reliability isn't just technical, it's business critical. A reliable email delivery maintains professional credibility, and ensures order confirmations and invoices reach customers.
If you want an email that just works, try our business-class email hosting optimized for:
- Business professionals and security conscious users
- High-volume lead forms and newsletters
- Bulletproof deliverability to Gmail, Outlook, and Yahoo
You can start with our normal existing email packages, or consult with our team to deploy a well-configured, security hardened cPanel Email Only server, or use one of our 1-click Webmail Lite, Roundcube and/or Postfix Admin email applications to host your email.
We also provide full email integration services if you are using Google Workspace, Proton Mail, Apple Mail, etc.