Selecting source IP based on SpamAssassin spam_score_int value within Exim 4.88
Hi,
New to the forum but I have been searching high and low trying to implement a solution with Exim using SpamAssassin to select a transport based on the spam_score_int value returned within the acl_smtp_data ACL. The SMTP is configured as a customer SMTP relay. The idea being we can have 2 source IP addresses, one being for clean email and the other for email scoring above X. The end result is that 'good' users get a clean IP with a good reputation and the others via the IP which 'could' end up with a poor reputation. We cannot 'block' any of the email.
Within the ACL I have:
warn spam = nobody/defer_ok
log_message = "SPAM: spam_score_int=$spam_score_int"
Routers configured as follows:
dnslookup_normal:
condition = ${if >{$spam_score_int}{100} {0}{1}}
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp_normal
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
dnslookup_dirty:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp_dirty
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
no_more
Transports configured as follows:
remote_smtp_normal:
driver = smtp
interface = x.x.x.x
remote_smtp_dirty:
driver = smtp
interface = y.y.y.y
The correct spam_score_int is being logged but does not seem to be available within the router section, although documentation suggests it should be. The logic has been tested and seems to work using values either side of 100 instead of the variable. I am unable to see this variable in the .H spool file either.
Any help would be appreciated.
|