Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 25, 2008, 05:33:10 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Email filter process order  (Read 395 times)
Pogle
Newbie
*
Offline Offline

Posts: 5


« on: April 23, 2008, 01:56:23 PM »

Hi  Help
I'm having to rely on email filtering to protect me from a serious spam problem (3000 undeliverable notifications since yesterday).

I haven't found any detailed information on how the filtering works.

I'd like to set up a group of filters that starts with a list of 'to' addresses that should be delivered normally followed by catchall to discard everything else.
This would require the filters to be processed in order. Is this the case? And if so, does it run from top to bottom? Unfortunately there's no obvious way to sort the filter entries. It seems to go by 'filter' first and then alphabetically, but even so it might just be possible.

Any help appreciated.

(PS. also out of curiosity, on the Email filter page, what does the example "|/home/user/email.pl" achieve?)
Logged
Pogle
Newbie
*
Offline Offline

Posts: 5


« Reply #1 on: April 25, 2008, 05:43:46 AM »

OK! I've finally found a way to do what I need  Happy Happy Joy Joy , namely, discard mail to all but certain addresses WHEN and only when the domain name is included in the To field. (The when condition is to continue to receive BCC mails which don't have your address in). You might want to use this when you have specified a catchall default address for your domain but only want to receive mail for certain addresses without the hassle of creating accounts for them all.

And it's all done with one filter rather than the sequence I originally anticipated.

It requires going quite deep into regular expressions with 'negative lookbehind'.

Basically the syntax I'm using is:
Code:
(?<!address1|address2|address3)[@]domain\.com
This matches everything except mail WITHOUT domain.com (probably BCC) and address1@domain.com, address2@domain.com and address3@domain.com.

If you're unfamiliar with RegEx, you need to put a backslash before '.' because otherwise it will be interpreted as a wildcard so if you're, say,  .co.uk. it's \.co\.uk. OK?

Note that as it stands, this will allow through not only 'address1' but also 'xxxxaddress1' and 'yyyyaddress1', etc. This suits me but you might want to try to narrow it down still further.

On the filter page, Select Filter 'To' that 'matches regex' and put in your expression. Then select discard for the destination.
I suggest testing it with a forwarding address as destination first so you don't lose anything. If you use a forwarding address in the same domain make sure you add it to the list of allowed addresses.

This expression makes it relatively easy to add addresses as needed.

Maybe someone will find this useful. I know I do. I've collected 6,190 spams in less than three days.
« Last Edit: April 26, 2008, 05:58:33 AM by Pogle » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM