NextIT
Verified User
I successfully configured rspamd using the instructions on this forum and in the readme.txt. Rspamd is adding its headers and seems to be running fine. However, I noticed that greylisting was not working (even after configuring redis) and also that the other in directives in "/etc/exim/rspamd/check_message.conf" didn't seem to be processed.
Although I am not an exim expert, I think i identified the issue...
At the start of an SMTP connection "/etc/exim/rspamd/connect.conf" sets the "acl_m_rspamd" variable to 1. This can be observed in the Exim debug log when a new SMTP session starts:
As can be seen, this all happens before the EHLO. The exim documentation on ACL variables mentions:
This would mean that the variable is reset after the HELO because the acl_m_rspamd variable starts with an 'm_'. The 'on/off' switch in the check_message.conf file checks for this variable in order to activate the various directives in the config:
This "eq{$acl_m_rspamd}{1}" always fails because the variable was reset after the EHLO:
I implemented a simple workaround by adding the following directive to the check_messages.conf file:
Is this a bug or am I missing something else?
Although I am not an exim expert, I think i identified the issue...
At the start of an SMTP connection "/etc/exim/rspamd/connect.conf" sets the "acl_m_rspamd" variable to 1. This can be observed in the Exim debug log when a new SMTP session starts:
Code:
Aug 25 17:47:52 test exim[17178]: 17653 processing "warn"
Aug 25 17:47:52 test exim[17178]: 17653 check set acl_m_easy69 = 0
Aug 25 17:47:52 test exim[17178]: 17653 check set acl_m_esf_skip = 0
Aug 25 17:47:52 test exim[17178]: 17653 check set acl_m_rspamd = 0
Aug 25 17:47:52 test exim[17178]: 17653 warn: condition test succeeded in ACL "acl_connect"
Aug 25 17:47:52 test exim[17178]: 17653 processing "warn"
Aug 25 17:47:52 test exim[17178]: 17653 check set acl_m_rspamd = 1
Aug 25 17:47:52 test exim[17178]: 17653 warn: condition test succeeded in ACL "acl_connect"
Aug 25 17:47:52 test exim[17178]: 17653 processing "accept"
Aug 25 17:47:52 test exim[17178]: 17653 check hosts = *
Aug 25 17:47:52 test exim[17178]: 17653 host in "*"? yes (matched "*")
Aug 25 17:47:52 test exim[17178]: 17653 accept: condition test succeeded in ACL "acl_connect"
Aug 25 17:47:52 test exim[17178]: 17653 end of ACL "acl_connect": ACCEPT
Aug 25 17:47:52 test exim[17178]: 17653 SMTP>> 220 test.nextit.nl ESMTP Exim 4.91 Sat, 25 Aug 2018 17:47:52 +0200
As can be seen, this all happens before the EHLO. The exim documentation on ACL variables mentions:
The values of those variables whose names begin with $acl_m persist only while a message is being received. They are reset afterwards. They are also reset by MAIL, RSET, EHLO, HELO, and after starting up a TLS session.
This would mean that the variable is reset after the HELO because the acl_m_rspamd variable starts with an 'm_'. The 'on/off' switch in the check_message.conf file checks for this variable in order to activate the various directives in the config:
Code:
# General on/off switch.
warn logwrite = acl_m_rspamd:$acl_m_rspamd
warn condition = ${if eq{$acl_m_rspamd}{1}}
condition = ${if !eq{$acl_m_esf_skip}{1}}
condition = ${if < {$message_size}{EASY_SPAMASSASSIN_MAX_SIZE}}
condition = ${if !eq{$acl_m_spam_user}{nobody}}
set acl_m_rspamd_on = 1
This "eq{$acl_m_rspamd}{1}" always fails because the variable was reset after the EHLO:
Code:
Aug 25 17:47:52 test exim[17178]: 17653 processing "warn"
Aug 25 17:47:52 test exim[17178]: 17653 check condition = ${if eq{$acl_m_rspamd}{1}}
Aug 25 17:47:52 test exim[17178]: 17653 =
Aug 25 17:47:52 test exim[17178]: 17653 warn: condition test failed in ACL "acl_check_message"
I implemented a simple workaround by adding the following directive to the check_messages.conf file:
Code:
warn set acl_m_rspamd = 1
Is this a bug or am I missing something else?