1

Topic: Postfix long response time

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====I use an iRedMail server as relay with anti-spam, I use Maia Mailguard for the anti-spam part.

The response time for connexion on the SMTP port is sometimes over 5 or 10 seconds but the most part of connexion have a response within 200ms.
There are usualy between 10 and 15 smtpd active process on server.

How can I optimize postfix to have better performance?

I put my postfix config in attachment.

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.0
- Linux/BSD distribution name and version: Debian 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
====

Post's attachments

postconf.txt 42.91 kb, 1 downloads since 2016-04-27 

You don't have the permssions to download the attachments of this post.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Postfix long response time

The delay is caused by Postfix postscreen service. FYI:
http://www.postfix.org/POSTSCREEN_README.html#general

For each connection from an SMTP client, postscreen(8) performs a number of tests in the order as described below. Some tests introduce a delay of a few seconds. postscreen(8) maintains a temporary whitelist for clients that pass its tests; by allowing whitelisted clients to skip tests, postscreen(8) minimizes its impact on legitimate email traffic.

Does it cause some performance issue on your server?

3

Re: Postfix long response time

ZhangHuangbin wrote:

Does it cause some performance issue on your server?

The server ( a virtual machine) is not overloaded, RAM and CPU are under 50% usually and there is no noticeable peak.
The server handle around 3000 mails per day with 2Go of RAM and 1CPU at 2.8Ghz, this can be sufficient for you?

ZhangHuangbin wrote:

The delay is caused by Postfix postscreen service.

I'll try to add my monitoring host to the postscreen whitelist and make some tests again.

4

Re: Postfix long response time

Martin wrote:

I'll try to add my monitoring host to the postscreen whitelist and make some tests again.

The results are similar with my monitoring host on the postscreen whitelist.
I think I have to increase the vm performance.

5

Re: Postfix long response time

The delay caused by postscreen service is not the bottleneck, i suggest you keep it running.
If you still prefer to disable it, maybe try to disable postscreen service completely by following this tutorial:
http://www.postfix.org/POSTSCREEN_README.html#turnoff

(Comment out "smtp ... postscreen" line and uncomment "smtp ... smtpd" line should be enough.)