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 7 Nov 2006, 05:09 AM   #1
drchadwick
Senior Member
 
Join Date: Jul 2006
Posts: 179
Rules help

For every mailing list I'm on, I give out a different alias in order to discourage spam. American Airlines gets "americanair@XXX.mail-page.com", and so on. (XXX standing in for my real username, obviously).

I'd like to set up my filters so that messages to certain addresses get filed in certain folders, so I set up a filing filter in the normal (not "advanced") Define rules screen which said:

Code:
Message with any header that contains 
"quad@XXX.mail-page.com","filmlinc@XXX.mail-page.com",
"filmforum@XXX.mail-page.com","Pioneer-Theater@googlegroups.com",
"gkids@XXX.mail-page.com"
It's not working. Messages are still just landing in my Inbox without being filed. Should I be putting an "or" in, instead of the commas? Remove the quotes? (And yes, the headers of the messages in question do contain the addresses I specify.)

if this is more helpful, I went into the advanced screen and copied out some of the code.
(Please note I'd like to set this up in the normal interface, NOT the advanced screen. I'm pasting this in for reference only.)
Code:
if header :contains ["Sender", "X-Sender", "Mailing-List", "X-Apparently-From", 
"X-Version", "X-Sender-IP", "Received", "Return-Path", "Delivered-To", "List-
Post", "Date", "Subject", "To", "Cc", "From", "Reply-to", "X-AntiAbuse", "
Content-Type", "Received", "X-LinkName", "X-Resolved-to", "X-Delivered-to", "X-
Mail-from", "X-Spam-hits"] "\"quad@XXX.mail-page.com\",\"filmlinc@XXX.mail-page
.com\",\"filmforum@XXX.mail-page.com\",\"Pioneer-Theater@googlegroups.com\",\"
gkids@XXX.mail-page.com\"" {
  fileinto "INBOX.lists.film";
drchadwick is offline   Reply With Quote

Old 7 Nov 2006, 05:24 AM   #2
Si1
Cornerstone of the Community
 
Join Date: Apr 2002
Location: UK
Posts: 590
The advanced screen seems to be escaping the " characters with \ characters.

Try taking the " characters out of the normal screen but leave the commas in.
Si1 is offline   Reply With Quote
Old 7 Nov 2006, 05:29 AM   #3
drchadwick
Senior Member
 
Join Date: Jul 2006
Posts: 179
OK, I've changed it so each e-mail address is just separated by a comma.

Next time someone responds to this thread, I'll see if it's working (when the notification e-mail, which is supposed to be filtered, comes in).
drchadwick is offline   Reply With Quote
Old 7 Nov 2006, 05:33 AM   #4
Si1
Cornerstone of the Community
 
Join Date: Apr 2002
Location: UK
Posts: 590
OK, this post should give you a notification to test with.
Si1 is offline   Reply With Quote
Old 7 Nov 2006, 05:44 AM   #5
drchadwick
Senior Member
 
Join Date: Jul 2006
Posts: 179
Thanks -- still no dice.

Why is this so damned complicated? It shouldn't take a computer science degree to file e-mail into folders. It really shouldn't.

Anyway, here's the relevant code, if anyone has any ideas

thanks

Code:
}
}
if header :contains ["Sender", "X-Sender", "Mailing-List", 
"X-Apparently-From", "X-Version", "X-Sender-IP", "Received", 
"Return-Path", "Delivered-To", "List-Post", "Date", "Subject", 
"To", "Cc", "From", "Reply-to", "X-AntiAbuse", "Content-Type", 
"Received", "X-LinkName", "X-Resolved-to", "X-Delivered-to", 
"X-Mail-from", "X-Spam-hits"] 
"quad@XXX.mail-page.com,filmlinc@XXX.mail-page.com,
filmforum@XXX.mail-page.com,Pioneer-Theater@googlegroups.com,
gkids@XXX.mail-page.com" {
  fileinto "INBOX.lists.film";
drchadwick is offline   Reply With Quote
Old 7 Nov 2006, 05:53 AM   #6
Si1
Cornerstone of the Community
 
Join Date: Apr 2002
Location: UK
Posts: 590
It looks like the normal screen is only geared-up for one address per rule.
That would explain the escaping of the " characters.

If you want to use the advanced screen the code should look like this:

if header :contains
["from", "to", "whatever"]
["john@example.com", "jane@example.com"] {
fileinto "INBOX.my-sub-folder";
stop;
}
Si1 is offline   Reply With Quote
Old 7 Nov 2006, 06:08 AM   #7
drchadwick
Senior Member
 
Join Date: Jul 2006
Posts: 179
There's really no way to say:

"look for 'this address' OR 'this address' "

in one rule?
drchadwick is offline   Reply With Quote
Old 8 Nov 2006, 08:48 AM   #8
robmueller
Intergalactic Postmaster
 
Join Date: Oct 2001
Location: Melbourne, Australia
Posts: 6,102

Representative of:
Fastmail.FM
It's not the "advanced" screen that's escaping things there.

You've created a rule 'any header' that 'contains' the text '"quad@XXX.mail-page.com","filmlinc@XXX.mail-page.com",
"filmforum@XXX.mail-page.com","Pioneer-Theater@googlegroups.com",
"gkids@XXX.mail-page.com"'. In this case, it's using the literal text:

"quad@XXX.mail-page.com","filmlinc@XXX.mail-page.com",
"filmforum@XXX.mail-page.com","Pioneer-Theater@googlegroups.com",
"gkids@XXX.mail-page.com"

As the thing to look for. So when it generates the code, it escapes the "'s by putting \ in front of them. You're then obviously looking at the Advanced script which shows you the actual code generated

Since you want to OR some things, you need to use an advanced rule, which directly inserts some script code without escaping.

So what you should do is create an 'Advanced' rule, ignore the "that" part, and for the text put:

header :contains [ "X-Delivered-to" ] [ "quad@XXX.mail-page.com","filmlinc@XXX.mail-page.com",
"filmforum@XXX.mail-page.com","Pioneer-Theater@googlegroups.com",
"gkids@XXX.mail-page.com" ]

If you add that, then Done to leave the screen to rebuild the rules, then look at the actual code generated, you should find:

if header :contains [ "X-Delivered-to" ] [ "quad@XXX.mail-page.com","filmlinc@XXX.mail-page
.com","filmforum@XXX.mail-page.com","Pioneer-Theater@googlegroups.com\",\"
gkids@XXX.mail-page.com" ] {
fileinto "INBOX.lists.film";

Which is what you want.

Rob
robmueller 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 07:48 PM.

 

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