Mailfilter syntax question - one or more sets

This is a discussion on Mailfilter syntax question - one or more sets within the Courier-Imap forums, part of the Mail Servers and Related category; Hello, I am trying to block some spam using maildropfilter (the ..mailfilter file, not sure which version, sorry). Each spam ...


Go Back   Usenet Forums > Mail Servers and Related > Courier-Imap

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-07-2005
cjg.groups@gmail.com
 
Posts: n/a
Default Mailfilter syntax question - one or more sets

Hello, I am trying to block some spam using maildropfilter (the
..mailfilter file, not sure which version, sorry). Each spam header has
a fingerprint such as:

(port=3480 helo=[wrestling])

The port numbers and helo text changes, so I'd like to filter for one
or more alphanumeric character, but can't get the syntax right. I've
tried these two conditionals:

if (/\(port=[:alpha:]* helo=\[[:alpha:]*\]\)/)

if (/\(port=[:alpha:*] helo=\[[:alpha:*]\]\)/)

For now, I'll try .* and hope it knows to stop counting "one or more of
any character" when it sees 'helo=['. Will it?
if (/\(port=.* helo=\[.*\]\)/)

Thanks in advance for your help.

Reply With Quote
  #2 (permalink)  
Old 09-15-2005
cjg.groups@gmail.com
 
Posts: n/a
Default Re: Mailfilter syntax question - one or more sets

I'm still trying this. Now I'm trying to filter against random words
within an EHLO, such as:
(EHLO katwalk)

Again, requires one or more of any letter. But how is that coded? My
attempt is:
if (/\(EHLO ([:alpha:])+\))/)

I'll have to receive junk from that specific spammer before I'll know
it worked. Can anyone confirm?

Reply With Quote
  #3 (permalink)  
Old 09-22-2005
cjg.groups@gmail.com
 
Posts: n/a
Default Re: Mailfilter syntax question - one or more sets

Yes, I've confirmed that one or more of a set of characters is coded:

([:alpha:])+

:alpha: may be replaced with :alnum:, :digit:, :lower:, :space:, etc
+ may be replaced with ? (0 or 1 from the set), * (0 or more from the
set), etc.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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



All times are GMT +1. The time now is 03:49 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0