Filtering Facebook mails
I wanted to set up my mail filters so that social media spam goes into a separate mailbox, but important messages such as "someone logged in using your account details" stay in my inbox, where I'm more likely to notice them.
I noticed that Facebook sends mail with a particular header which can apparently be used for this purpose:
X-Facebook-Notify: nf_status_story; mailid=54ac91629f4fcG49b65c9bG54ac95fbff7ceG313
nf_status_story corresponds to the "John Smith updated his status" message type. There are other types, which I am collecting together in the following Sieve filter:
if header :matches "x-facebook-notify" ["nf_comment_story; *", "nf_share_story; *", "nf_status_story; *", "stale_notifications; *"] { fileinto "social media"; stop; }