Regular Expression Help |
Post Reply ![]() |
Author | |
fischer ![]() Newbie ![]() Joined: 05 August 2005 Status: Offline Points: 12 |
![]() ![]() ![]() ![]() ![]() 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? |
|
![]() |
|
fischer ![]() Newbie ![]() Joined: 05 August 2005 Status: Offline Points: 12 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.203 seconds.