📧 Postfix/ISPConfig “Critical Mail” Troubleshooting & Hardening Guide (2025 Edition)

Table of Contents

  1. Introduction
  2. How Mail Filtering Really Works in ISPConfig
  3. Symptoms and Real-World Examples
  4. Quick Fix: ISPConfig Server Whitelist
  5. Root Causes & Why Whitelisting Sometimes Fails
  6. Step-by-Step Troubleshooting Decision Tree
  7. Best Practices for 2FA/OTP Delivery Reliability
  8. Example: ISPConfig Whitelisting That Actually Works
  9. Testing and Verification
  10. Advanced: When and How to Tune Filters or Disable Temporarily
  11. Appendix: Deeper Dives, Tools, and References

1. Introduction

This guide’s goal: Keep critical transactional, 2FA, and OTP emails from providers (OpenAI, Google, banks, Mandrill, etc.) reliably landing in your inbox—every time, no exceptions—on an ISPConfig-managed Postfix server.


2. How Mail Filtering Really Works in ISPConfig


3. Symptoms and Real-World Examples


4. Quick Fix: ISPConfig Server Whitelist

If you do only one thing: Go to ISPConfig > Email > Server Whitelist, add the sending domain used in the actual email’s Return-Path/Envelope-From, e.g.,

Why this works: Server-level whitelisting in ISPConfig tells all mail filters to always allow mail from those senders for all domains on your server. This bypasses most filter-level rejections, even if SpamAssassin or Amavis is running.


5. Root Causes & Why Whitelisting Sometimes Fails

Common reasons 2FA/OTP emails are lost or delayed:


6. Step-by-Step Troubleshooting Decision Tree

A. Is it just one sender (e.g., OpenAI)?


B. Are all 2FA/transactional mails affected?


C. Did adding to ISPConfig Server Whitelist fix it?


D. If whitelisting doesn’t fix it:


E. For Greylisting Delays


7. Best Practices for 2FA/OTP Delivery Reliability


8. Example: ISPConfig Whitelisting That Actually Works

A. Where to add (ISPConfig 3.x):

  1. Login to ISPConfig Panel
  2. Go to Email > Server Whitelist
  3. Add a new entry:

    • Domain: mandrillapp.com
    • (Repeat for any other third-party domains as found in logs)
  4. Save and apply changes

What this does: Mail from these domains will always be accepted, regardless of filter/greylisting.


B. Finding the Correct Domain to Whitelist

Check the “Return-Path” or log lines:


9. Testing and Verification

  1. Send a real OTP/2FA/test email from the service
  2. Check your inbox
  3. If missing or delayed, check /var/log/mail.log and look for:

    • Temporary rejections (4xx errors)
    • Repeated attempts before success (greylisting symptom)
    • “milter-reject” or “spam” related soft bounces
  4. If mail arrives immediately after whitelisting—success!
  5. If not: Re-check the actual sender domain and whitelist that.

10. Advanced: When and How to Tune Filters or Disable Temporarily


11. Appendix: Deeper Dives, Tools, and References


Summary Checklist: For Every New Service