EmailDiscussions.com  

Go Back   EmailDiscussions.com > Email Service Provider-specific Forums > FastMail Forum
Register FAQ Members List Calendar Today's Posts
Stay in touch wirelessly

FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc.

Reply
 
Thread Tools
Old 1 Oct 2004, 12:11 AM   #1
jolycu
Member
 
Join Date: Feb 2002
Posts: 80
Define rules question

When defining a rule to reject an email, does capitalization count? For instance, if I define a rule to look in the subject for "Mail," would that automatically reject "mail" and "email" too? What if a word in the suject contained "Mail" such as "Mailman," would that be rejected by the reject rule for "Mail?" I'm trying to set up some rules to reject (silently, of course) all these undeliverable mail notices I've been getting from being JoeJobbed.
Thanks
Jolycu
jolycu is offline   Reply With Quote

Old 1 Oct 2004, 04:38 AM   #2
Daniel S
Guest
 
Posts: n/a
No, yes, yes.

By default, the matches are case-insensitive and match any substring (i.e. not "full words only" match).

Both can be changed by using the Look In: Advanced option (by writing custom tests).

A case-sensitive full-words match for "Mail" in the "Subject" header is:

Code:
header :comparator "i;octet" :regex ["Subject"] ["[^[:alpha:]]Mail[^[:alpha:]]"]
"[^[:alpha:]]" means a non-alphabetic character.
  Reply With Quote
Old 1 Oct 2004, 09:34 AM   #3
jolycu
Member
 
Join Date: Feb 2002
Posts: 80
Thanks Daniel S. If I copy your rule into the Look In-Advanced section, would that work, or do I need to add anything to it? I'm not sure I understand about the alpha business. Thanks again for taking the time to help me out.
Jolycu
jolycu is offline   Reply With Quote
Old 1 Oct 2004, 06:43 PM   #4
Daniel S
Guest
 
Posts: n/a
Just copy it to the "For text matching" section after setting "Look In" to "Advanced". You don't need to add anything else in the textbox.

[^[:alpha:]] matches one non-alphabetic character (a space, for example). The 'e' in "email" is not a non-alphabetic character, so the rule won't match it; the space (and start-of-string) are a non-alphabetic characters, so the string "Mail " would be matched.

In general, if the string "Mail" is part of a longer word (e.g., "Mailman") it would either be followed or preceded by an alphabetic character ('m'). By matching non-alpha before and after the string, I make sure it is not part of a longer word.

edit:

An easier way to match full words is to use the word boundary character, '\b':

Code:
header :comparator "i;octet" :regex "Subject" "\\bMail\\b"
  Reply With Quote
Old 6 Oct 2004, 11:29 PM   #5
jolycu
Member
 
Join Date: Feb 2002
Posts: 80
Thanks Daniel S. I'll give it a shot.
jolycu is offline   Reply With Quote
Reply



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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +9. The time now is 04:49 AM.

 

Copyright EmailDiscussions.com 1998-2022. All Rights Reserved. Privacy Policy