Spam Filter ISP Support Forum

  New Posts New Posts RSS Feed - Regular Expression Help
  FAQ FAQ  Forum Search   Register Register  Login Login

Regular Expression Help

 Post Reply Post Reply
Author
fischer View Drop Down
Newbie
Newbie


Joined: 05 August 2005
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote fischer Quote  Post ReplyReply Direct Link To This Post Topic: Regular Expression Help
    Posted: 25 September 2005 at 10:52pm

I'm trying add an entry to the blocked to addresses blacklist that will block everything sent to a particular domain except if it is one of three valid addresses.

Lets say that the addresses are test1@test.com, test2@test.com, and test3@test.com. How do I configure a regular expression to block everything to @test.com except for that which is sent to the above addresses. Incidentally, I don't want to add these addresses to the white list of unprocessed addresses, as I'd still like the other spam checks to apply to these three addresses.

Also, does anyone have a filter application order that tells what order the spam checks are applied in? Are all the remaining checks ignored if a match is found?

Back to Top
fischer View Drop Down
Newbie
Newbie


Joined: 05 August 2005
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote fischer Quote  Post ReplyReply Direct Link To This Post Posted: 06 October 2005 at 1:02am

I figured out a workable solution. Since the domains I want to do this for only have a couple of addresses, I was able to configure a RegEx to block all mail going to addresses that started with something other than the first letter of the legitimate email accounts. In the example scenario above, all the addresses start with a 't', so I would tell spamfilter to reject messages that have to addresses that match this:

(^[abcdefghijklmnopqrsuvwxyz].*@test.com)

Explanation: the () are necessary for the black list to interpret it as a RegEx

the ^ designates look at the beginning of the line

the [abc..] (notice the 't' is not there) matches one and only one of any of those characters

the .* matches anything after the first character, regardless of character or length

the @test.com matches "@test.com" (actually it would also match @testacom, @testbcom, @testccom, etc, but that's not really a concern. If I only wanted it to match "@test.com" I would put in @test\.com so the Spam Filter would know that the . is actually a period and not a placeholder for any character.)



Edited by fischer
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.141 seconds.