#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;
}