icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Email » Whitelist based on subject line?

Email General questions, webmail, mailing lists.

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread
Old July 18th, 2006, 12:25 PM   #19 (permalink)
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
I think I had it exiting the script before it delivered the non-spam mail.

This is cleaner version using elif:
Code:
if 
  $h_X-Spam-Status: matches score=(\\d+)
 
  if $1 is above 20
    then deliver "mailtrap2@stegenga.net"
  elif $1 is above 7
    then deliver "mailtrap@stegenga.net"
  else
  endif
 
endif
This for sure would have to be the last filter to be processed, or, it would continue on to additional filters, without an explicit deliver statement for the less than 7 score mails.

Additionally, I wonder and have to think more about:
Code:
if not first_delivery and error_message then finish endif
I use:
Code:
if error_message then finish endif
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2006, 12:34 PM   #20 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
that top line is 'default' from the server... so I'm not messing with that.

But I'll put your newly modified filter at the bottom of my list...
Like so:
Code:
# Exim filter

if not first_delivery and error_message then finish endif

if
 $header_subject: contains "Notice_--Possible_SPAM"
 or $header_to: contains "adkins@stegenga.net"
 or $message_headers contains "adkins@stegenga.net"
 or $message_headers contains "jimenez"
 or $message_headers contains "maldonado@stegenga.net"
 or $message_headers contains "mendoza@stegenga.net"
 or $message_headers contains "ortiz@stegenga.net"
 or $message_headers contains "rios@stegenga.net"
 or $message_headers contains "robbins@stegenga.net"
 or $message_headers contains "watts@stegenga.net"
then
 save "/dev/null" 660
endif
if 
  $h_X-Spam-Status: matches score=(\\d+)
 
  if $1 is above 20
    then deliver "mailtrap2@stegenga.net"
  elif $1 is above 7
    then deliver "mailtrap@stegenga.net"
  else
  endif
 
endif
And that's all of it - right? if it does not match those rules, normal delivery will occur?
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2006, 12:48 PM   #21 (permalink)
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
Quote:
Originally Posted by Bigjohn
that top line is 'default' from the server... so I'm not messing with that.
I figured it was the dafault. Mine is my server's default.

Did SA apply a score to your test mail from GMAIL?

If I have time later today I am going to apply it to one of my domains. If not I will work with it more next week, I'm taking a few days to the Black Hills.
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2006, 12:55 PM   #22 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
yes. A score was applied. I know it's hitting SA first, before it hits these rules.

Is the script as posted above all that I need? NO further lines to determine default delivery?
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2006, 1:18 PM   #23 (permalink)
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
Quote:
Originally Posted by Bigjohn
yes. A score was applied. I know it's hitting SA first, before it hits these rules.
Is the script as posted above all that I need? NO further lines to determine default delivery?
Try it. Since your test had a score I am confident it is going through the score if statement, the question now is it catching the number.
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2006, 2:35 PM   #24 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
because of the extra 'endif/finish/endif' they didn't even get delivered until a while ago... I guess that 'finish' ended processing before delivery?

So, I'll load up the script as it is here and see what happens.

John
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2006, 2:36 PM   #25 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
crap.
Mail is not being delivered again... Just sent myself 3 messages from 3 different addresses...

John
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2006, 4:19 PM   #26 (permalink)
Surpass Fan
Excelling Contributor
 
cowboy's Avatar
 
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
937 posts
Gave thanks: 2
Thanked 95 times
This is working. The () do need the "" so the escape needs an escape and missed a 'then'.
Code:
if 
  $h_X-Spam-Status: matches "score=(\\\\d+)"
then
  if $1 is above 20
    then deliver "mailtrap2@stegenga.net"
  elif $1 is above 7
    then deliver "mailtrap@stegenga.net"
  else
  endif 
endif
__________________
Where would you be if you were at the highest court in the land (US)?
cowboy is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old July 18th, 2006, 4:50 PM   #27 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,395 posts
Gave thanks: 28
Thanked 94 times
Indeed. that one does indeed seem to work - at least on regular messages. I'll know in an hour how the spam filter hits...
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On