Tag Archives: postfix


Postfix: Queue Management

Postfix is a mail server that started life at IBM research as an alternative to the widely-used Sendmail program. Newer versions of Plesk install with Postfix as the default mail server but when upgrading older versions of Plesk, Qmail may remain the default mail server. It is suggested to use Postfix, since postfix is an actively maintained mail server package widely used in production environments

# View emails in the queue

postqueue -p

# read email from mail queue (header and body)

postcat -q MAIL_ID

# number of emails in Mail queue

postqueue -p | grep -c "^[A-Z0-9]"

# Flush the queue: attempt to deliver all queued mail.

postqueue -f

To remove all mail from the queue :

# postsuper -d ALL

To remove all mails in the deferred queue :

# postsuper -d ALL deferred

Performance Tuning and increasing delivery speed in Postfix

Postfix is a MTA which is rich in features and if configured properly can be used for sending mails faster than other MTA’s. Postfix is mainly preferred by admins when it comes for bulk mailing. There are different ways in which we can configure mail server for bulk mailing.

But if the list if quite large, we may need to do some tweaks in the conf to handle the additional overhead. All these values should be changed gradually keeping the server  hardware configuration and your requirements in your mind.

Some of the values which will help are given below.

1. Increase the number of SMTP process, increase the value “default_process_limit” in main.cf

         default_process_limit = 75

2. in_flow_delay  – Adjust interval for  accepting new messages,  when the message arrival rate exceeds the message delivery rate. With the default 50 Postfix SMTP server process limit, value 1s limits the mail inflow to 50 messages per second above the number of messages delivered per second.

3.  Another value which help is increasing speed is  default_destination_concurrency_limit parameter . Default value is 10 .This controls how many messages may be sent to the same destination simultaneously.  We can increase this safely between 20 – 40 according to the server capacity.

     default_destination_concurrency_limit = 30

Cannot start Postfix – Postfix integrity check failed Error

Postfix was not running and an attempt to restart Postfix was failing with the following error in maillog.

mail postfix/postfix-script: fatal: Postfix integrity check failed!
mail postfix/postfix-script: fatal: the Postfix mail system is not running

We have tried a number of solutions and after a bit googling, we found the following command and running that resolved the issue. Continue reading