The Four Word Film Review Fourum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Return to my fwfr
Frequently Asked Questions Click for advanced search
 All Forums
 Off-Topic
 General
 Does anyone speak Perl? Please!

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert Email Insert CodeInsert QuoteInsert List
   
Message:

Smilies
Angry [:(!] Approve [^] Big Smile [:D] Black Eye [B)]
Blush [:I] Clown [:o)] Cool [8D] Dead [xx(]
Disapprove [V] Duh [7] Eight Ball [8] Evil [}:)]
Gulp [12] Hog [13] Kisses [:X] LOL [15]
Moon [1] Nerd [18] Question [?] Sad [:(]
Shock [:O] Shy [8)] Skull [20] Sleepy [|)]
Smile [:)] Tongue [:P] Wink [;)] Yawn [29]

   -  HTML is OFF | Forum Code is ON
 
   

T O P I C    R E V I E W
BaftaBaby Posted - 10/29/2010 : 12:17:13
Hi

I'm updating my mail server spam filter to BoxTrapper, which seems much more user-friendly than Spam Assassin.

It asks for white/black lists to be in standard Perl formula and gives this example:
quote:
The list should contain one entry per line. Entries should be in the format of a perl regular expression.
For example: [email protected] would be john\@domain\.com and all addresses at domain.com would be .+\@domain\.com




My question is, suppose either the eMail preface (before the @ sign), and/or the domain id (.com, .net, etc) ALSO contain a dot. Would I then preface all the dots with a backslash?

So, if the example they give above were changed to
[email protected]
would my listing be formatted as
john\.doe\@domain\.co\.uk

Your words of wisdom are worth more than Perls to me
Bigtime TIA!

2   L A T E S T    R E P L I E S    (Newest First)
BaftaBaby Posted - 10/29/2010 : 12:45:14
quote:
Originally posted by benj clews

Not to be picky but this isn't the programming language Perl. It's regular expression notation- a commonly-used pattern matching technique used in most programming languages, text editors, operating systems and so on

I have to admit I'm not sure of the differences between Perl's interpretation of regular expressions and standard regular expressions but from this example the two look identical.

The \ is called an escape character and as such says "whatever character follows me should be treated as what it literally is", rather than any special reserved function it may have in a regular expression. For example . by itself would effectively be saying "this can be any letter, number or symbol" (so 'b.n' would match 'ben' or 'bin') but by putting the \ in front of it you are looking to match the . character only (so 'b\.n' would match 'b.n' and nothing else)

In short, yes- you need to put the \ in front of the . (or indeed any full-stops anywhere in the email address) so your spam filter knows to treat it as only a full-stop.



You see -- THIS is why you are benj, the genius -- to give you your full title!

Thanks so much, benj, and here's to my spam-free world

benj clews Posted - 10/29/2010 : 12:29:32
Not to be picky but this isn't the programming language Perl. It's regular expression notation- a commonly-used pattern matching technique used in most programming languages, text editors, operating systems and so on

I have to admit I'm not sure of the differences between Perl's interpretation of regular expressions and standard regular expressions but from this example the two look identical.

The \ is called an escape character and as such says "whatever character follows me should be treated as what it literally is", rather than any special reserved function it may have in a regular expression. For example . by itself would effectively be saying "this can be any letter, number or symbol" (so 'b.n' would match 'ben' or 'bin') but by putting the \ in front of it you are looking to match the . character only (so 'b\.n' would match 'b.n' and nothing else)

In short, yes- you need to put the \ in front of the . (or indeed any full-stops anywhere in the email address) so your spam filter knows to treat it as only a full-stop.

The Four Word Film Review Fourum © 1999-2024 benj clews Go To Top Of Page
Snitz Forums 2000