Set EXIM to deliver more emails in a single moment

updated on 12.feb.2023

This is especially cPanel related post.

With many senders and especially when someone is sending newsletters – you want your EXIM to deliver more and faster. But more important – you want emails to be accepted from sender fast and your server to get as less deferred emails, as possible.

Why deferred emails are bad? What does deferred email mean?

Deferred emails are bad for Exim/cPanel – because after some (unknown) amount of deferred emails – exim will actually pause all deliveries to that host. Deferred email is an non-critical way for recipient server to tell, that right now mail can not be accepted and you should try again later.

First, when I wrote this post, I was thinking, that we should maximize number of concurrent emails as much as we can in order to gain better speed. I was wrong.

Current approach on our servers is to send less concurrent emails, but run queue manager more often. This will limit number of emails-per-minute and will keep delivery speeds more stable.

Here are our settings, that you can add in Exim Configuration Manager under Advanced Editor. You might need to add missing option.

queue_run_max = 30
remote_max_parallel = 5
smtp_accept_queue_per_connection = 30
smtp_connect_backlog = 100

Also exim Tweak Settings I set Email delivery retry time = 1m

What do these settings do?

Let’s assume someone is sending large amount of emails, e.g. a newsletter. With these settings Exim will start delivery of first 30 emailsĀ (smtp_accept_queue_per_connection) and the rest will be put into local queue. Also Exim will be starting 30 queue runners (queue_run_max) every minute (Exim delivery retry time) and if email has multiple recipients – it will only handle 5 of them. Basically we can do higher math calculations and see, that Exim will be delivering around 1800 emails per hour. Practice show, that a bit more, but still – the delivery speed is quite stable and I see better results in our server park.

Got any questions or suggestions? Let me know!