On Tue, 14 Jul 2020, gnd wrote:
anyway, if there is anyway how to optimize dovecot for effective delivery of 20k+ emails within a few minutes, id be glad to know.
It depends on what you mean by "optimize". Arguably, letting postfix/dovecot hammer its brains out for a few minutes might have the lowest overall performance/complexity cost, but may also be DoS'ing your mail system for a small time window.
Configuring postfix to concurrently send message to a single set-UID LMTP will probaby help with minimizing process overhead. It might be especially useful if you also need to de-duping large attachments.
If your current setup can cope with this mail load, just let it. If it ain't broke, why fix it?
If the intensity is causing problems, you could offload mail delivery to an auxilliary process outside your mail system by aliasing to a handler script ( e.g. |remail.sh), which accepts the message, then sends it to your 20k+ recipients in small batches with small delays.
Joseph Tam <jtam.home@gmail.com>