Skip to content

Instantly share code, notes, and snippets.

@shawnyeager
Created July 8, 2021 09:14
Show Gist options
  • Save shawnyeager/320013942d6ff9ffeeebb29e3509dd79 to your computer and use it in GitHub Desktop.
Save shawnyeager/320013942d6ff9ffeeebb29e3509dd79 to your computer and use it in GitHub Desktop.
Bulk mail sieve filter for ProtonMail
require ["fileinto", "imap4flags", "envelope"];
if address :is :localpart ["from", "all"] [
"do-not-reply",
"do_not_reply",
"donotreply",
"newsletter",
"no-reply",
"noreply",
"notification",
"notifications"
]
{
fileinto "The Feed";
}
if header :contains ["received"] [
"mailgun",
"sendgrid",
"ghost.io"
]
{
fileinto "The Feed";
}
elsif
header :contains [
"Feedback-ID",
"List-Id",
"List-Unsubscribe",
"X-Campaign",
"X-campaignid",
"X-Feedback-ID",
"X-mail_abuse_inquiries",
"X-maillist-guid",
"X-maillist-id",
"X-MC-User",
"X-Feedback-ID",
"X-rpcampaign",
"X-Unsubscribe-Web"
] [""]
{
fileinto "The Feed";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment