This commit is contained in:
Shelvacu
2024-12-13 00:20:20 -08:00
committed by Shelvacu on fw
parent 2ada1fb5cd
commit 3c8e7fbbc0
2 changed files with 14 additions and 10 deletions

View File

@@ -95,16 +95,20 @@ let
require ["fileinto", "mailbox", "imap4flags"];
if header :is "Delivered-To" "shelvacu@liam.dis8.net" {
if anyof(
allof(
header :is "X-Envelope-To" "amznbsns@shelvacu.com",
header :contains "Subject" "Your Amazon.com order has shipped"
),
allof(
header :is "X-Envelope-To" "bandcamp@shelvacu.com",
header :contains "Subject" "just announced a listening party on Bandcamp"
)
if allof(
header :is "X-Envelope-To" "amznbsns@shelvacu.com",
header :contains "Subject" "Your Amazon.com order has shipped"
) {
addflag "auto-amazon-ignore";
}
if allof(
header :is "X-Envelope-To" "bandcamp@shelvacu.com",
header :matches "Subject" ["* just announced a listening party on Bandcamp", "New items from *", "Starting in *"]
) {
addflag "auto-bandcamp-ignore";
}
if hasflag ["auto-amazon-ignore", "auto-bandcamp-ignore"] {
addflag "\\Seen";
addflag "auto-marked-read";
}

View File

@@ -227,7 +227,7 @@ in
checks = """
--mailfrom asshole-spammer@example.com --rcptto whatever@shelvacu.com --header "List-unsubscribe: whatver" --username shelvacu --expect-flag spamish --imap-dir "com.shelvacu.#spamish"
--mailfrom shipment-tracking@amazon.com --rcptto amznbsns@shelvacu.com --subject "Your Amazon.com order has shipped (#123-1234)" --username shelvacu --imap-dir com.shelvacu --expect-flag \\\\Seen --expect-flag auto-marked-read
--mailfrom shipment-tracking@amazon.com --rcptto amznbsns@shelvacu.com --subject "Your Amazon.com order has shipped (#123-1234)" --username shelvacu --imap-dir com.shelvacu --expect-flag \\\\Seen --expect-flag auto-marked-read --expect-flag auto-amazon-ignore
--rcptto shelvacu@shelvacu.com --username shelvacu --smtp-starttls