Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-27-2017, 04:27 AM   #1
LQ Newbie
Registered: Feb 2017
Posts: 2

Rep: Reputation: Disabled
Selecting source IP based on SpamAssassin spam_score_int value within Exim 4.88


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:

condition = ${if >{$spam_score_int}{100} {0}{1}}
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp_normal
ignore_target_hosts = :

driver = dnslookup
domains = ! +local_domains
transport = remote_smtp_dirty
ignore_target_hosts = :

Transports configured as follows:

driver = smtp
interface = x.x.x.x

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.
Old 02-28-2017, 08:21 AM   #2
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, RPi OS, Mint & Android
Posts: 12,900

Rep: Reputation: 1680Reputation: 1680Reputation: 1680Reputation: 1680Reputation: 1680Reputation: 1680Reputation: 1680Reputation: 1680Reputation: 1680Reputation: 1680Reputation: 1680
For this to stay working, you'll have to figure out what to do/say when your 'dirty' IP is blocked by trigger happy sites like

SpamAssassin marks emails above a certain score as spam, and I take it you're not editing the customer emails, so a copy is required. Some MDA like Procmail suggests itself as a way forward. I also imagine they would love this question on spamassassin forums. Mind you, they might answer in Perl :-).
Old 02-28-2017, 11:48 AM   #3
LQ Newbie
Registered: Feb 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
Its does seem to be working now after a re-install????


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question for Exim and Spamassassin mkp Linux - Newbie 3 07-01-2009 03:05 AM
Spamassassin+exim ? piyushmap Linux - Networking 2 04-07-2008 12:33 PM
Spamassassin, Exim, delay problems jademan83 *BSD 0 05-16-2005 04:23 PM
Exim4/ sa-exim/Spamassassin - Flags as Spam but Still Accepts jonwatson Linux - Software 4 11-29-2004 06:18 PM
Exim/spamassassin problems tensigh Linux - Software 1 04-27-2004 05:01 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration