Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    5 Star Lounger ibe98765's Avatar
    Join Date
    Aug 2001
    Location
    Bay Area, California, USA
    Posts
    968
    Thanks
    19
    Thanked 4 Times in 4 Posts

    Rules logic (OL2002 SP2)

    Is there any way to use If-Then-Else logic in an Outlook rule? For instance, I want to query a value in the header of all emails that has a numeric value. If it is greater than some value, I want to immediately delete it.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Rules logic (OL2002 SP2)

    You want something like

    If Spam Score > 51 Then Delete Message?

    I don't think this is an option through the Rules Wizard, which basically offers simple string matching in the message header. Depending on the range of values, you could look for a number of strings that would attempt to accomplish most of the same thing. Not the most efficient approach.

    You could try a Visual Basic for Applications (VBA) solution. To read the message header using VBA requires an extended MAPI library such as Redemption, because Outlook doesn't normally give you access to the message headers using Outlook's built-in programming model. Unless someone's already built this, it seems like a lot of work.

    If you give us a little more background on the header info maybe you will get some more promising suggestions. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  3. #3
    5 Star Lounger ibe98765's Avatar
    Join Date
    Aug 2001
    Location
    Bay Area, California, USA
    Posts
    968
    Thanks
    19
    Thanked 4 Times in 4 Posts

    Re: Rules logic (OL2002 SP2)

    This is what the field looks like:

    X-Text-Classification: K9spam [97.7%]

    Obviously the 97.7% number can vary.

    This is from a spam trap program that I have been having very good success with K9 (http://keir.net/k9.html). It's free/donateware. It only works with POP3 email servers and is Bayesian based.

    I get around 100+ emails a day and most of them are spam. K9, as you can see below, is catching 98.5% of the spam. Actually, the number is over 99% recently (the 98.5% number is averaged over a longer time period). Compared to the last spam program I used, this requires almost no maintenance or tweaking. I have setup a whitelist and my blacklist has all of 2 rules.

    K9 forwards all emails to Outlook. I use a rule looking for the header field above and route the spam to a folder. But all I do then is go to the folder, Ctrl-A to select them all and then delete them all. But since Robin at K9 just added the % spam statistic, I thought I might be able to automate a bit and maybe auto delete anything with say , a figure over 90%. And also maybe route something with a lower spam % value to another folder (though K9 is rarely wrong).

    ---------------------------------------------------

    Since 5/26/2003 12:00:00 AM
    Total number of emails processed 7,472
    Number of Good emails processed 1138
    Number of Spam emails processed 6,334
    Percentage of emails that matched whitelist rules 10.1%
    Percentage of emails that matched blacklist rules 0.4%
    Number of emails re-classified to Good 4
    Number of emails re-classified to Spam 173
    Percentage emails misidentified as Spam (false positives) 0.1%
    Percentage emails misidentified as Good (false negatives) 2.3%
    Overall accuracy 97.6%

    Since 7/4/2003 12:09:18 AM
    Total number of emails processed 3,471
    Number of Good emails processed 462
    Number of Spam emails processed 3,009
    Percentage of emails that matched whitelist rules 8.8%
    Percentage of emails that matched blacklist rules 0.8%
    Number of emails re-classified to Good 3
    Number of emails re-classified to Spam 50
    Percentage emails misidentified as Spam (false positives) 0.1%
    Percentage emails misidentified as Good (false negatives) 1.4%
    Overall accuracy 98.5%

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Rules logic (OL2002 SP2)

    Try a match on K9spam [9 in the message header and see if that works.

  5. #5
    5 Star Lounger ibe98765's Avatar
    Join Date
    Aug 2001
    Location
    Bay Area, California, USA
    Posts
    968
    Thanks
    19
    Thanked 4 Times in 4 Posts

    Re: Rules logic (OL2002 SP2)

    Hmmm. Interesting idea....

  6. #6
    5 Star Lounger ibe98765's Avatar
    Join Date
    Aug 2001
    Location
    Bay Area, California, USA
    Posts
    968
    Thanks
    19
    Thanked 4 Times in 4 Posts

    Re: Rules logic (OL2002 SP2)

    OK, that works. Too bad MS didn't see fit to add some IF logic to the rules base. It seems the only way to get any more granularity would be to make a whole series of rules for each percentile. Thanks!

  7. #7
    5 Star Lounger ibe98765's Avatar
    Join Date
    Aug 2001
    Location
    Bay Area, California, USA
    Posts
    968
    Thanks
    19
    Thanked 4 Times in 4 Posts

    Re: Rules logic (OL2002 SP2)

    I tried to create a rule that would permanently delete a message (if it was rated at 100% likely hood of spam). This will happen when one of my blacklist rules are hit in K9. Mother Microsoft won't let me do a permanent delete for some reason unless I stop processing more rules. Hmph! Where's the logic in this restriction?

    Apply to message
    with "X-Text-Classification: K9spam [100" in the message header
    permanently delete it
    and stop processing more rules

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Rules logic (OL2002 SP2)

    Well, "stop processing" means "for this message." If you didn't stop after deleting, Outlook would crash trying to apply a rule to a nonexistent message. Unless I'm missing something, like a condition that would cause you to want to "undelete" it. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  9. #9
    5 Star Lounger ibe98765's Avatar
    Join Date
    Aug 2001
    Location
    Bay Area, California, USA
    Posts
    968
    Thanks
    19
    Thanked 4 Times in 4 Posts

    Re: Rules logic (OL2002 SP2)

    OK, I'll try it. I thought it meant no more messages would be processed. I did some searching and finally found this reference on the MS website (didn't find anything in the Outlook help file):

    "To avoid multiple rules operating on the same message, especially if you don't want the bottom-most rule to prevail when multiple rules apply, select stop processing more rules as an action".

  10. #10
    5 Star Lounger ibe98765's Avatar
    Join Date
    Aug 2001
    Location
    Bay Area, California, USA
    Posts
    968
    Thanks
    19
    Thanked 4 Times in 4 Posts

    Re: Rules logic (OL2002 SP2)

    Everything working OK now...

  11. #11
    5 Star Lounger ibe98765's Avatar
    Join Date
    Aug 2001
    Location
    Bay Area, California, USA
    Posts
    968
    Thanks
    19
    Thanked 4 Times in 4 Posts

    Re: Rules logic (OL2002 SP2)

    Well, almost working OK.

    This rule:
    Apply to message
    with "X-Text-Classification: K9spam [100" in the message header
    permanently delete it
    and stop processing more rules

    occasionally generates the following error messge

    Rules in error
    X-Text-Classification: K9spam [100 You don't have appropriate permission to perform this operation.

    When this error occurs, the rule is turned off and the error message sticks on my screen. Most of the time it works without issue. Any idea why this error is occuring and what to do about it?

  12. #12
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Rules logic (OL2002 SP2)

    When the error message comes up, are you logged onto your machine with Administrator rights? HTH
    Gre

  13. #13
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Rules logic (OL2002 SP2)

    I didn't realize I could need permission to delete an e-mail message. <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

    Is this mail coming through Exchange Server?

  14. #14
    5 Star Lounger ibe98765's Avatar
    Join Date
    Aug 2001
    Location
    Bay Area, California, USA
    Posts
    968
    Thanks
    19
    Thanked 4 Times in 4 Posts

    Re: Rules logic (OL2002 SP2)

    Nope. No Exchange involved here. Straight OL 2002. I've gotten this message 3 times in the last 2 days. Unsure what triggers it, why it happens, what it means or why the rule gets turned off when it happens. Typical MS....

  15. #15
    5 Star Lounger ibe98765's Avatar
    Join Date
    Aug 2001
    Location
    Bay Area, California, USA
    Posts
    968
    Thanks
    19
    Thanked 4 Times in 4 Posts

    Re: Rules logic (OL2002 SP2)

    "When the error message comes up, are you logged onto your machine with Administrator rights? HTH"

    Yup. I'm always on as admin in admin mode.

    btw: Is there a quote function somewhere around here that I am missing?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •