[exim] mail delivery to smarthost very slow

Etusivu
Poista viesti
Vastaa
Lähettäjä: Jonas Meurer
Päiväys:  
Vastaanottaja: 'Exim-users'
Aihe: [exim] mail delivery to smarthost very slow
Hi Exim users,

for some reason, mail delivery from Exim4 (4.84-8 on an up-to-date
Debian
8 Jessie system) to the configured smarthost is very slow. Initially I
used the default Debian Exim4 configuration and set a global smarthost
for all outgoing mail.

The system in question is a box used to send personalized newsletters,
i.e. a separate message is created for each recipient. Some newsletters
have several ten thousand recipients. The mails are created by a web
application and delivered to Exim4 through the PHP mail() function.

After a newsletter is sent out, I see all outgoing mails in the Exim4
mail queue. According to the Exim4 mainlog, approximately one mail
per second is delivered to the smarthost. I honestly don't understand
why Exim4 delivers only one mail per second, e.g. why mails are sent
out that slowly.

Here is an example from the mainlog with Exim4 sending some of the
mails from the queue:

2015-11-13 14:13:03 1ZxEA2-0002TF-VT <=
melin+N7-IDNL1447420377-C0@??? H=localhost
(example-newsletter) [127.0.0.1] P=esmtp S=64814
id=1038582402.1681447420382973.JavaMail.root@example-newsletter
2015-11-13 14:13:03 1ZxEA3-0002TF-1F <=
melin+N7-IDNL1447420377-C0@??? H=localhost
(example-newsletter) [127.0.0.1] P=esmtp S=16799
id=2069093441.1691447420383037.JavaMail.root@example-newsletter
[...]
2015-11-13 14:13:04 1ZxEA2-0002TF-VT => user.name@??? R=smarthost
T=remote_smtp_smarthost H=smtp2.eu [195.34.176.148]
X=TLS1.0:RSA_AES_128_CBC_SHA1:128 DN="OU=GT46541191,OU=See
www.rapidssl.com/resources/cps (c)14,OU=Domain Control Validated -
RapidSSL(R),CN=*.inet.de" C="250 2.0.0 tADDD3NM028115 Message accepted
for delivery"
2015-11-13 14:13:04 1ZxEA2-0002TF-VT Completed
[...]
2015-11-13 14:17:13 1ZxEE5-0002YF-D7 <=
melin+N7-IDNL1447420608-C0@??? H=localhost
(example-newsletter) [127.0.0.1] P=esmtp S=60583
id=757069355.4901447420633404.JavaMail.root@example-newsletter
2015-11-13 14:17:13 1ZxEE5-0002YF-D7 no immediate delivery: more than
100 messages received in one connection
[...]
2015-11-13 14:44:47 1ZxEE5-0002YF-D7 => user.name@???
R=smarthost T=remote_smtp_smarthost H=smtp2.eu [195.34.176.148]
X=TLS1.0:RSA_AES_128_CBC_SHA1:128 DN="OU=GT46541191,OU=See
www.rapidssl.com/resources/cps (c)14,OU=Domain Control Validated -
RapidSSL(R),CN=*.inet.de" C="250 2.0.0 tADDik9H020819 Message accepted
for delivery"
2015-11-13 14:44:47 1ZxEE5-0002YF-D7 Completed

As you can see, the mails are sent to the smarthost one by one, with
a new connection for each mail. Is it possible to make Exim4 deliver
several mails together to the smarthost in one connection?

The outgoing smarthost is definitely not the problem, it takes mail
from other satellite mail servers much faster.

I already tried to speed up mail delivery using the following settings,
which didn't help at all:

smtp_accept_queue_per_connection = 100
remote_max_parallel = 30
queue_run_max = 10

Any suggestions?

Cheers
jonas