Mail from a website is not delivered, or fails with 'message file too big'
What you see
Section titled “What you see”- A contact form or WordPress reports that sending failed, or the visitor never receives the message.
- PHP’s
mail()fails withsendmail: fatal: … message file too big. - The Email log shows a message as failed, with a relay reply starting with 5.
- Service health, Mail delivery shows a red row.
1. The message is bigger than postfix allows
Section titled “1. The message is bigger than postfix allows”“message file too big” means postfix refused the message. Its default limit is 10 MB, and the limit counts the encoded message, so attachments get about three quarters of it.
Fix: open Settings, Mail, Largest message, enter Limit in MB (up to 100; most receivers accept up to 25) and click Save. It applies at once. See Set up the outgoing mail relay.
2. Postfix is not running, or the node has no way out
Section titled “2. Postfix is not running, or the node has no way out”Open Service health, Mail delivery and read the rows, see Diagnose mail delivery on a node:
- Postfix stopped or missing: start it or install it from the page.
- Outbound ports: a provider block on outbound port 25 stops direct delivery. Turn on a relay that accepts mail on an open port, or ask the provider to unblock port 25.
- Reverse DNS (PTR): a missing or non-matching PTR is the most common reason for direct delivery being refused. Set it where the address is managed. Hyperion cannot change it.
- Hostname (HELO) without a dot: set a full hostname with
sudo hostnamectl set-hostname <name>.<domain>and click Reconfigure postfix.
3. The receiver refused or the message is queued
Section titled “3. The receiver refused or the message is queued”Search the Email log for the recipient. A relay reply that starts with 250 means the relay accepted the message. A 5xx reply means it was refused, and the full reply is in the row. See Find out whether an email was delivered. From the server:
sudo hctl mail statussudo hctl mail log --hosting example.com --limit 20For missing SPF or DKIM records, see SPF and DKIM.
4. The site sends through its own SMTP plugin
Section titled “4. The site sends through its own SMTP plugin”A plugin such as WP Mail SMTP does not use the server’s mail path. The site’s Emails tab shows “No outbound mail captured yet” for it, and the failure is in the plugin’s own log and settings.
Apply the fix for the cause that matched. Then send a test message from Settings, Mail.
Check that it is fixed
Section titled “Check that it is fixed”The test message arrives, the Email log shows it as Sent with a 250 reply, and the rows under Mail delivery are green.