Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

fastmail sieve script for blackberry gmail app sync -- not quite there...

require ["envelope", "imapflags", "fileinto", "reject", "notify", "vacation", "regex", "relational", "comparator-i;ascii-numeric", "body", "copy"];

#NOTIFICATION: important mail is received into fastmail; notify push exchange account
if anyof(
header :contains ["to","cc","resent-to","X-Delivered-to","X-Remote-Delivered-To"] "alias@myfastmail.com",
header :contains ["to","cc","resent-to","X-Delivered-to","X-Remote-Delivered-To"] "gmailAccount@gmail.com",
header :contains ["to","cc","resent-to","X-Delivered-to","X-Remote-Delivered-To"] "anotheraddress@fastmail.fm"
)
{
notify :method "mailto" :options ["workExchangeAccount@madeUp.com]","from","orig"] :message "$from$";
#stop; this continues for the forwarding rules and does NOT stop at this point
}
#Forwarding
#this test prevents the forward from the alias (i.e. [gmail account]@gmail.com) from being delivered twice since its in an otherwise forwarded pattern
if header :contains ["to","cc","resent-to","X-Delivered-to","X-Remote-Delivered-To"] "alias@myfastmail.com"
{
stop;
}
if anyof(
header :contains ["to","cc","resent-to","X-Delivered-to","X-Remote-Delivered-To"] "alias@myfastmail.com",
#header :contains ["to","cc","resent-to","X-Delivered-to","X-Remote-Delivered-To"] "gmailAccount@gmail.com",
#above email is already at gmailAccount@gmail.com
header :contains ["to","cc","resent-to","X-Delivered-to","X-Remote-Delivered-To"] "anotheraddress@fastmail.fm"
)
{
#forwarding rule on gmail account is to forward all mail except for that received from fastmail forwarding address below
redirect "gmailAccount+Handheld@gmail.com";
keep;
stop;
}

You need to create an account or log in to post comments to this site.


Click here to browse all 6646 code snippets