SMTP Exim slow, timeouts & connection lost

walterdevos

Member
Apr 30, 2011
15
2
53
Hi

Brand new server (vps) install and configuring Exim. I noticed a lot of these lines in de exim_main.log

Code:
2016-09-30 16:20:14 SMTP connection from [46.183.220.150]:48721 lost
I couldn't find anything on the internet, so I let it be.

But when I let mxtoolbox check the SMTP configuration, it came back with:
SMTP Transaction Time 15.427 seconds - Not good! on Transaction Time
SendSMTPCommand: Timeout waiting for response after 15 seconds.​

In the exim_main.log this was logged:
Code:
2016-09-30 16:18:18 SMTP connection from pws3.mxtoolbox.com [64.20.227.134]:55736 lost
I tried logging in with telnet port 25
Between "connected to" and "220" was almost 20 seconds.

I found out that the setting " Introduce a delay into the SMTP transaction for unknown hosts and messages detected as spam. " in the Exim Basic editor ACL options was de culprit. When I disabled that option, mxtoolbox reported:
SMTP Connection Time 0.855 seconds - Good on Connection time
Is there a way to make that setting a little less aggressive? Like 5 seconds delay, not 20, because most SMTP clients time out.

Thanks
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Is there a way to make that setting a little less aggressive? Like 5 seconds delay, not 20, because most SMTP clients time out.
Hello,

20 seconds was found to be the most effective, however you can customize that value in your Exim configuration file. Here are the sections to modify:

Code:
#BEGIN ACL_PRE_RECIPIENT_BLOCK
          # BEGIN INSERT delay_unknown_hosts

warn
  !authenticated = *
  !hosts = : +neighbor_netblocks : +loopback : +trustedmailhosts : +recent_authed_mail_ips : +backupmx_hosts : +skipsmtpcheck_hosts : +senderverifybypass_hosts : +greylist_trusted_netblocks : +cpanel_mail_netblocks
  #only rate limit port 25
  condition = ${if eq {$received_port}{25}{yes}{no}}
  delay = 20s

# END INSERT delay_unknown_hosts

Code:
#BEGIN ACL_CONNECT_BLOCK
# BEGIN INSERT delay_unknown_hosts


warn
    !hosts = : +neighbor_netblocks : +loopback : +trustedmailhosts : +recent_authed_mail_ips : +backupmx_hosts : +skipsmtpcheck_hosts : +senderverifybypass_hosts : +greylist_trusted_netblocks : +cpanel_mail_netblocks
    #only rate limit port 25
    condition = ${if eq {$received_port}{25}{yes}{no}}
    delay = 20s


# END INSERT delay_unknown_hosts
Information on custom Exim ACL changes is available at:

Exim Configuration Manager - Documentation - cPanel Documentation

Thank you.
 
  • Like
Reactions: walterdevos

masamia

Member
Nov 24, 2019
6
0
1
Kazakhstan
cPanel Access Level
Root Administrator
I need to do the same thing as topikstarter: reduce the delay time to 5 seconds. I logged into the WHM panel, opened the Exim Advanced Editor, found the delay_unknown_hosts section there and I see this line in it - "delay = 20s". But I can't edit anything since it is an uneditable block of text. I can only turn off this block entirely. I'm probably dumb, but can you please tell me how to edit this line? How to modify "delay = 20s" to "delay = 5s"?