|
FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc. |
|
Thread Tools |
5 Nov 2013, 12:42 AM | #1 |
Senior Member
Join Date: Apr 2006
Location: London, England
Posts: 166
|
Sieve forwarding rules
Hi,
Can anyone help guide me through some issues I'm having using the forwarding rules and Sieve in the advanced popup. I have a few address book groups defined which add a header to inbound email that shows what address group if any that they matched: Code:
X-Spam-known-sender: yes, "Family" The trigger on this rule looks like this: Code:
header :contains "X-Spam-known-sender" "Family" Code:
notify :method "mailto" :options ["me@domain.com","Text","Only"] :message "- / From: $from$ Subject: $subject$ / Mail Alert: from $from$. Subject $subject$" Strangely, I use a similar File into Folders rule for all the miscellaneous email that I want to see but not in my Inbox, that uses the following syntax: Code:
header:contains"X-Spam-known-sender" "Miscellaneous" If anyone can help out I'd be most grateful. Regards Alan |
11 Nov 2013, 08:06 AM | #2 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,917
|
First, remember that the Advanced rules tab only creates Sieve when you log into the beta interface. You can read email and perform other tasks while logged into the normal interface, but if you change any settings screen you may create a new automatic Sieve without your Advanced tweaks. The Advanced custom Sieve rules are not deleted but just disabled, and you can log back into beta and apply your rules to get them activated again.
I just tried this simple Advanced tab beta rule and it worked correctly: Code:
### Start {{{ if header :contains ["X-Spam-known-sender"] "Family" { fileinto "INBOX.test"; stop; } ### }}} I don't understand what is failing for you. If multiple actions are being triggering improperly, you may have your if..elseif blocks not set up properly, or you may need to add stop commands. Or you may have an address in more than one address group, so that several of the address book rules are triggered. Bill |
11 Nov 2013, 08:41 AM | #3 |
Senior Member
Join Date: Apr 2006
Location: London, England
Posts: 166
|
Hello Bill
Thanks for your reply, here's the section that is failing, it is configured via the advanced popup for forwarding rules, I'm not keying anything in: Code:
if header :is "X-Spam-known-sender" "yes, \"Photographic Club\"" { notify :method "mailto" :options ["myaddress@mydomain.com","Text","Only"] :message "- / From: $from$ Subject: $subject$ / Mail Alert: from $from$. Subject $subject$"; stop; } if header :is "X-Spam-known-sender" "yes, \"Friends\"" { notify :method "mailto" :options ["myaddress@mydomain.com","Text","Only"] :message "- / From: $from$ Subject: $subject$ / Mail Alert: from $from$. Subject $subject$"; stop; } if header :is "X-Spam-known-sender" "yes, \"Family\"" { notify :method "mailto" :options ["myaddress@mydomain.com","Text","Only"] :message "- / From: $from$ Subject: $subject$ / Mail Alert: from $from$. Subject $subject$"; stop; } if header :is "X-Spam-known-sender" "yes, \"OmniFocus\"" { notify :method "mailto" :options ["myaccount@sync.omnigroup.com","Text","Only"] :message "/ $subject$ /"; stop; } Thinking about this further it may be a mail loop, the alert comes into my Fastmail In Box which will run through the rules again, it may be that I have a match occurring that I can't see. As it stands I really don't understand why it matches twice other than an issue with the email address or a loop. Regards Alan |
11 Nov 2013, 11:37 AM | #4 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,917
|
Message loops
I have an idea about the cause of your difficulty, Alan.
Code:
if not header :contains "from" "mypersonality@mydomain" { if header :is "X-Spam-known-sender" "yes, \"Photographic Club\"" { notify :method "mailto" :options ["myaddress@mydomain.com","Text","Only"] :message "- / From: $from$ Subject: $subject$ / Mail Alert: from $from$. Subject $subject$"; stop; } if header :is "X-Spam-known-sender" "yes, \"Friends\"" { notify :method "mailto" :options ["myaddress@mydomain.com","Text","Only"] :message "- / From: $from$ Subject: $subject$ / Mail Alert: from $from$. Subject $subject$"; stop; } if header :is "X-Spam-known-sender" "yes, \"Family\"" { notify :method "mailto" :options ["myaddress@mydomain.com","Text","Only"] :message "- / From: $from$ Subject: $subject$ / Mail Alert: from $from$. Subject $subject$"; stop; } if header :is "X-Spam-known-sender" "yes, \"OmniFocus\"" { notify :method "mailto" :options ["myaccount@sync.omnigroup.com","Text","Only"] :message "/ $subject$ /"; stop; } } |
12 Nov 2013, 04:32 PM | #5 |
Senior Member
Join Date: Apr 2006
Location: London, England
Posts: 166
|
Hello Bill,
Well spotted, that was the issue, thanks. I've accidentally created mail loops before and they do have a limiter although it's quite high before it stops the scripts from running. One of the test users in the OmniFocus address group contained my primary address as a second address which was causing it to match a second time. Regards Alan |
Thread Tools | |
|
|