The error 552 5.3.4 Message size exceeds fixed limit appears in Postfix logs when a message, including headers, body, and MIME encoding overhead, exceeds message_size_limit. This is a hard rejection, not a deferral. The sender receives a bounce, and the message never enters the queue.
The default message_size_limit is 10240000 bytes (approximately 10 MB). Base64 encoding inflates binary attachments by roughly 33 percent, so a 7 MB attachment becomes approximately 9.3 MB of encoded data before headers are added. Many operators discover this only when users report that “sometimes attachments work, sometimes they don’t.”
The rejection can occur at several points: at MAIL FROM time if the sender specifies a SIZE parameter exceeding the limit, at DATA completion if the actual message exceeds the limit, or at the destination’s own size cap. The fix is not always to raise the limit. Determine whether the message is legitimately oversized, whether the limit is set too low for the workload, or whether a downstream component (content filter, destination MX) has its own lower cap.
What this means
Postfix enforces message_size_limit as a hard ceiling on the total size of any message it accepts, including envelope information, headers, and body. The limit applies at the smtpd (inbound SMTP) and cleanup (message normalization) stages.
Postfix advertises the SIZE capability in its EHLO response, set to the value of message_size_limit. Well-behaved senders check this advertisement before attempting to transmit and never send a message that exceeds it. Some senders pipeline SMTP commands aggressively and may not process the SIZE advertisement before sending MAIL FROM with a SIZE parameter, resulting in the 552 rejection.
flowchart TD
A["Message rejected: 552 5.3.4"] --> B{"In your Postfix logs?"}
B -->|Yes| C{"SIZE in MAIL FROM?"}
B -->|No| D["Destination MX cap"]
C -->|Yes| E["Limit too low"]
C -->|No| F{"Content filter in path?"}
F -->|Yes| G["Check filter limit"]
F -->|No| E
D --> H["Not your server"]
E --> I["Raise limit, check effects"]
G --> ICommon causes
| Cause | What it looks like | First thing to check |
|---|---|---|
message_size_limit set too low for attachment workload | Users can send small files but not large ones. 552 5.3.4 on messages with attachments near the limit. | postconf -h message_size_limit |
| MIME/base64 overhead not accounted for | 7 MB attachment rejected under a 10 MB limit. Base64 inflates the binary by approximately 33 percent. | Calculate raw attachment size times 1.37, plus headers |
mailbox_size_limit set below message_size_limit | Postfix refuses to start. Fatal error in logs at startup. | postconf -h mailbox_size_limit message_size_limit |
| Content filter has its own lower size cap | Message passes Postfix but gets rejected by Amavis, Rspamd, or other filter. Error appears in filter logs, not Postfix. | Check filter configuration for size limits |
| Destination MX enforces its own size limit | Your Postfix accepts and queues the message, then logs a 552 from the remote server during delivery. | Check Postfix log for the remote 552 response |
Disk space below 1.5x message_size_limit | All mail rejected, not just large messages. Insufficient storage error (typically 452 4.3.1). | df on the queue partition |
Quick checks
# Check current message_size_limit (default: 10240000)
postconf -h message_size_limit
# Check mailbox_size_limit (must be >= message_size_limit, default: 51200000)
postconf -h mailbox_size_limit
# Check queue_minfree (default: 0, meaning 1.5x message_size_limit is the floor)
postconf -h queue_minfree
# Verify the EHLO SIZE advertisement your server sends
{ echo "EHLO test.local"; sleep 1; echo "QUIT"; } | nc -w 5 localhost 25 | grep -i SIZE
# Check free space on the queue partition
df -h /var/spool/postfix
# Search logs for 552 5.3.4 rejections
grep '552 5.3.4' /var/log/mail.log | tail -20
# Search for size-related rejections with context
grep -i 'exceeds.*limit\|message too large\|size limit' /var/log/mail.log | tail -20
# Check if Postfix started cleanly (catches mailbox_size_limit mismatch)
postfix check 2>&1
If your distribution uses /var/log/maillog instead of /var/log/mail.log, adjust the path accordingly.
How to diagnose it
Confirm the rejection is from your Postfix, not the destination. Search your mail log for the 552 5.3.4 string. If it appears during an inbound SMTP transaction (client connecting to your server), the rejection is yours. If it appears in an outbound delivery log as the remote server’s response, the destination MX has its own size cap and you cannot fix it by changing your configuration.
Determine the actual message size. The 552 rejection often includes the message size or the configured limit. Compare against
postconf -h message_size_limit. The limit covers the entire message including envelope, headers, and MIME structure, not just the attachment payload.Account for base64 overhead. Binary attachments encoded in base64 grow by approximately 33 percent (every 3 bytes becomes 4 bytes on the wire). A 7 MB binary file produces roughly 9.3 MB of encoded data before headers are added. If your
message_size_limitis 10240000 (10 MB), the practical attachment ceiling is about 7 MB.Check for a content_filter size mismatch. If you run Amavis, Rspamd, or another content filter, the filter may have its own size limit lower than Postfix’s
message_size_limit. The message passes Postfix’s size check but gets rejected by the filter. Look in the filter’s logs, not justmail.log.
Verify Postfix started cleanly. If you recently raised
message_size_limitwithout also adjustingmailbox_size_limit, Postfix may have failed to start. The error is:fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit. Runpostfix checkto confirm.Check disk space on the queue partition. Postfix rejects all inbound mail (not just oversized messages) when free space drops below 1.5 times
message_size_limit. This produces a different error code (typically 452 4.3.1) but operators sometimes conflate the two when investigating “mail rejection” incidents.
Metrics and signals to monitor
| Signal | Why it matters | Warning sign |
|---|---|---|
message_size_limit value | Determines the EHLO SIZE advertisement senders see. Drift after config changes or package updates. | Value lower than expected or changed without corresponding mailbox_size_limit adjustment |
mailbox_size_limit relative to message_size_limit | If lower, Postfix refuses to start. Fatal at boot, not at runtime. | mailbox_size_limit < message_size_limit |
| Queue partition free space | Below 1.5x message_size_limit, all mail is rejected. Raising the limit without ensuring disk headroom can cause a total outage. | Free space approaching 1.5 * message_size_limit |
| 552 5.3.4 rejection rate | Sudden spike indicates either a new large-message workload or a configuration change. | Any sustained increase from baseline |
| Bounce rate correlation | Size-limit rejections generate bounces to the original sender. Sustained high bounce rates damage sender reputation. | Bounce rate above 1 percent of injection |
| Content filter rejection rate | Filter may reject messages that pass Postfix’s size check. | Rejections in filter logs that do not appear in Postfix SMTP rejections |
Fixes
Raise message_size_limit
The direct fix when the limit is genuinely too low for your workload.
# Set message_size_limit to 26214400 (25 MB)
postconf -e 'message_size_limit = 26214400'
# Ensure mailbox_size_limit is >= message_size_limit
# Default is 51200000 (50 MB), but verify
postconf -h mailbox_size_limit
# Reload Postfix to apply (non-disruptive, does not restart)
postfix reload
Tradeoffs to understand before raising the limit:
- Memory and queue implications. Each message that enters the queue occupies disk space and, during processing, memory in cleanup and delivery agents. Raising the limit allows larger messages to flow through, which increases peak resource consumption.
- Disk space floor rises. The 1.5x free-space check scales with
message_size_limit. If you raise the limit from 10 MB to 50 MB, Postfix requires at least 75 MB free on the queue partition before accepting any mail. On small partitions, this can cause an unexpected outage. - MIME nesting limit. Deeper MIME structures in large messages can hit
mime_nesting_limitindependently of the byte limit. Check whether the current default (20) is sufficient for your workload.
Set message_size_limit to 0 (unlimited)
Setting message_size_limit = 0 removes the limit entirely. This is valid but risky. A single oversized message or a flood of large messages can fill the queue partition, exhaust inodes, and cause a broader outage. Use this only if you have robust disk space monitoring and understand the downstream impact on delivery agents and content filters.
Adjust mailbox_size_limit
If you are raising message_size_limit above the default mailbox_size_limit of 51200000 (50 MB), you must also raise mailbox_size_limit:
# Set both consistently
postconf -e 'message_size_limit = 104857600'
postconf -e 'mailbox_size_limit = 104857600'
# Reload
postfix reload
If mailbox_size_limit is set lower than message_size_limit, Postfix logs fatal: main.cf configuration error: mailbox_size_limit is smaller than message_size_limit and refuses to start.
Fix content_filter size limits
If the rejection comes from your content filter, not Postfix itself, raising Postfix’s message_size_limit will not help. The filter has its own size cap that must be adjusted independently.
Check the filter’s configuration and raise its limit to match or exceed your Postfix message_size_limit. After changing the filter, test by sending a message near the new limit and verifying it passes both Postfix and the filter.
Address destination-side size limits
If the 552 5.3.4 comes from the destination MX, not your Postfix, you cannot fix it by changing your configuration. The destination has its own message size cap. Options include advising the sender to use a file-sharing service for large attachments, or configuring a transport map to route large messages to a destination that accepts them.
Prevention
- Calculate the effective attachment ceiling. Take your
message_size_limitand divide by approximately 1.37 to get the maximum binary attachment size that will fit after base64 encoding and headers. If users need to send 20 MB attachments, setmessage_size_limitto at least 30 MB (31457280). - Always adjust mailbox_size_limit in tandem. Verify
postconf -h mailbox_size_limitis greater than or equal tomessage_size_limitafter any change. Apostfix checkafterpostfix reloadcatches the fatal mismatch. - Monitor free space against the 1.5x floor. When you raise
message_size_limit, the disk space threshold for accepting any mail rises proportionally. Alert on free space dropping below 2xmessage_size_limitto leave headroom. - Document the content_filter size limit. If you run Amavis, Rspamd, or another filter, record its size limit alongside your Postfix
message_size_limit. They must be consistent, or the filter will silently reject messages that Postfix accepted. - Patch regularly. A BDAT command handler bug (introduced in Postfix 3.4) allowed the SMTP server to read
message_size_limitbytes into memory when handling malformed BDAT commands. Ensure you are running a patched version.
How Netdata helps
- Per-second queue metrics show the immediate impact of a size-limit change on active, deferred, and incoming queue depth. If raising
message_size_limitcauses queue processing to slow under larger messages, the effect is visible within seconds. - Disk space and inode monitoring on the queue partition catches the 1.5x free-space floor before it triggers total mail rejection. Correlating disk usage with mail flow velocity tells you whether a disk-space event is caused by queue growth or an unrelated process.
- Bounce rate tracking surfaces the reputation impact of size-limit rejections. A spike in 552 bounces after a configuration change is visible alongside delivery rate and injection rate.
- Correlation across signals (queue depth, disk usage, bounce rate, delivery latency) in a single view shortens diagnosis when a size-limit change has unintended side effects on the broader mail pipeline.
Related guides
- Postfix active queue saturation: hitting qmgr_message_active_limit
- Postfix backscatter storm: bounces to forged senders and blocklisting
- Postfix IP blocklisted: deliverability collapse and sender reputation
- Postfix bounce rate spike: 5xx failures, bad address lists, and reputation risk
- Postfix check warnings: configuration drift and permission problems
- Postfix connection refused: blocked port 25 and rejected outbound delivery
- Postfix connection timed out: delivery deferrals to unreachable destinations
- Postfix content_filter backpressure: incoming queue growth when Amavis or Rspamd slows
- Postfix deferred queue growing: why mail piles up and how to drain it
- Postfix destination concurrency limit: tuning per-destination delivery
- Postfix DNS resolver failure: when a broken resolver defers mail to everyone
- Postfix flushing and clearing the deferred queue: postqueue and postsuper






