



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




The goal of Postfix performance tuning is to improve the efficiency and throughput of an already functional Postfix system. This document outlines strategies for mail receiving, delivery, resource management, and operating system-level optimizations.
Note: Performance tuning is for working systems. If your Postfix cannot receive or deliver mail, resolve those issues first using the DEBUG_README guide.
Improving the rate at which Postfix accepts mail involves reducing latency and optimizing process management.
Local Name Server: Run a local DNS resolver to eliminate network latency for lookups. LDAP Optimization: Use domain filters to avoid unnecessary lookups for remote domains. Disable Unnecessary Checks: If performance is lagging, temporarily disable header_checks or body_checks to identify if patterns are causing bottlenecks.
Postfix uses "tar pitting" to slow down clients that make errors, but these delays consume server processes. In high-volume environments, you can minimize these delays:
A Technical Guide for High-Performance Mail Systems
smtpd_error_sleep_time = 0
Managed by the anvil service, these limits protect against abuse:
Parameter Default Description
smtpd_client_connection_count_limit 50 Max simultaneous connections per client IP.
smtpd_client_connection_rate_limit no limit
Max connections in a time interval (anvil_rate_time_unit).
smtpd_client_message_rate_limit no limit
Max messages in a time interval.
2. Mail Delivery Performance
Optimizing how Postfix sends mail focuses on parallelization and timeout management.
Submit via SMTP: Use SMTP for local submission instead of /usr/sbin/ sendmail for better scalability. Batch Recipients: Submit messages with multiple recipients rather than individual emails per recipient. Reduced Timeouts: Lower smtp_connect_timeout and smtp_helo_timeout to avoid wasting time on unresponsive servers.
Postfix uses a "slow start" strategy for delivery concurrency to avoid the thundering herd problem.
The default_process_limit (default: 100) applies to SMTP clients, servers, and other daemons. You can override this globally in main.cf or per-service in master.cf.
default_process_limit = 50
smtp inet n - - - 20 smtpd
5. Operating System Tuning
High-performance mail servers often require kernel-level adjustments to support many open files and processes.
fs.file-max = 16384 kernel.threads-max = 2048
kern.ipc.maxsockets = "5000" kern.maxfiles = "16384"
set rlim_fd_max = 4096 set rlim_fd_cur = 1024