LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


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

Rep: Reputation: Disabled
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.
 
Old 02-28-2017, 08:21 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 11,552

Rep: Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336Reputation: 1336
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 spamhaus.org.

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
ScubaStu
LQ Newbie
 
Registered: Feb 2017
Posts: 2

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


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:34 PM.

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