SECURITY WARNING: Never run commands you don't understand. Always review code before execution. Use at your own risk.
Email New Added 19 September 2026

SMTP: 552 5.3.4 Message size exceeds fixed maximum message size

The message was larger than the receiving server accepts, and the limit applies after MIME encoding, which inflates attachments by roughly a third. A 20 MB file therefore fails against a 25 MB limit, and the rejection happens at the smallest limit along the path, not the one you configured.

Quick fix

Read the commands before running them. Anything that restarts a service, deletes data or changes permissions should be tried on a non-production system first.

Quick fix
# Ask the server what it will take: the SIZE extension is advertised in EHLO
swaks --server smtp.example.com --quit-after EHLO | grep SIZE
openssl s_client -starttls smtp -connect smtp.example.com:587 -crlf

# Base64 costs about 37 per cent, so budget the raw file accordingly
postconf message_size_limit mailbox_size_limit   # Postfix, bytes
sudo postconf -e 'message_size_limit = 52428800'
sudo systemctl reload postfix

# mailbox_size_limit must stay larger than message_size_limit or local delivery fails

# Exim
exim -bP message_size_limit

# The relay, the recipient and any scanner each impose their own limit:
# send a link instead once the file is over about 10 MB, it is the only reliable fix

How to diagnose Email errors

SMTP errors follow a strict convention: a 4xx code is temporary and will be retried, a 5xx is permanent and will not. Beyond delivery mechanics, most modern email problems are authentication problems (SPF, DKIM and DMARC alignment) which cause silent filtering into spam rather than an explicit bounce, and therefore need to be checked proactively.

If the quick fix above does not resolve it, work through these steps. They apply to this whole class of error, not just to this one message, which is usually what saves the time.

  1. Read the full bounce message. The enhanced status code (for example 5.7.1) is far more specific than the three-digit code and usually names the exact policy that rejected the message.
  2. Test the SMTP conversation manually with swaks --to [email protected] --server smtp.example.com --tls. It shows each command and response.
  3. Verify SPF, DKIM and DMARC records with dig TXT example.com, dig TXT selector._domainkey.example.com and dig TXT _dmarc.example.com.
  4. Check DMARC alignment, not just presence: the domain in the From: header must align with the SPF or DKIM domain, or DMARC fails even when both pass individually.
  5. Confirm the sending IP is not on a blocklist and has valid reverse DNS. Missing PTR records cause rejection by many large providers.

Tools worth reaching for

  • swaks
  • dig TXT
  • openssl s_client -starttls smtp
  • postfix mail logs
  • DMARC aggregate reports

Authoritative references

Primary documentation for this error, worth reading before applying any fix in production.

datatracker.ietf.org postfix.org

Related Email errors

See all 11 Email errors →

Browse other categories

Something missing or wrong?

This entry is maintained by hand. If the fix is out of date, incomplete, or you have a better one, email a correction and it will be reviewed.