ctucx.git: nixfiles

ctucx' nixfiles

commit 574de6fee7894d569fa11874ddc02f44e1146f23
parent b6a285b5237e6b94ed1f762867fc1b508ae5f842
Author: Leah (ctucx) <git@ctu.cx>
Date: Sun, 3 Dec 2023 18:02:29 +0100

machines/trabbi/mail: update sieve filters
2 files changed, 32 insertions(+), 13 deletions(-)
M
machines/trabbi/mail/default.nix
|
2
+-
M
machines/trabbi/mail/rules-leah.sieve
|
43
+++++++++++++++++++++++++++++++------------
diff --git a/machines/trabbi/mail/default.nix b/machines/trabbi/mail/default.nix
@@ -170,7 +170,7 @@ in {
         hashedPasswordFile = config.age.secrets.mail-password-zugnetwork.path;      	
         aliases = [
           "@zug.network"
-    	  ];
+        ];
       };
     };
   };
diff --git a/machines/trabbi/mail/rules-leah.sieve b/machines/trabbi/mail/rules-leah.sieve
@@ -18,47 +18,66 @@ if address :is "to" "le0nth3in@gmail.com" {
   addheader :last "Subject" "[OLD GMAIL] ${subject}";
 }
 
+if header :contains "From" [
+  "newsletter@email.mtstofferie.de",
+  "ikea@hej.news.email.ikea.de",
+  "newsletter@crazyhorsecraft.com",
+  "inside@cowboy.com",
+  "News@InsideApple.Apple.com",
+  "no-reply@newsletter.ab-in-die-box.de",
+  "info@join.netflix.com",
+  "marketing.support@porkbun.com"
+] {
+  fileinto :create "INBOX.Newsletters";
+  stop;
+}
+
 if header :contains "subject" [ "Fahrgastrechteanträge", "Fahrgastrechteantrag" ] {
   fileinto :create "Archive.FGR${year}";
   stop;
 }
 
 if header :contains "From" [ "@amazon.de" ] {
-  fileinto "INBOX.Amazon"; 
+  fileinto :create "INBOX.Amazon";
   stop;
 }
 
-if header :contains "From" [ "@apple.com", "@email.apple.com" ] {
-  fileinto "INBOX.Apple"; 
+if header :contains "From" [ "@apple.com", "@email.apple.com", "@id.apple.com" ] {
+  fileinto :create "INBOX.Apple";
   stop;
 }
 
-if header :contains "From" [ "@bahn.de", "@mailing.bahn.de" ] {
-  fileinto "INBOX.Bahn"; 
+if header :contains "From" [ "@bahn.de", "@mailing.bahn.de", "@mail.bahncard.bahn.de" ] {
+  fileinto :create "INBOX.Bahn";
   stop;
 }
 
 if header :contains "From" [ "@bunq.com", "@hello.bunq.com" ] {
-  fileinto "INBOX.Bunq"; 
+  fileinto :create "INBOX.Bunq";
+  stop;
+}
+
+if header :contains "From" [ "@dhl.de", "@dhl.com" ] {
+  fileinto :create "INBOX.DHL";
   stop;
 }
 
-if header :contains "From" [ "@dhl.de" ] {
-  fileinto "INBOX.DHL"; 
+if header :contains "From" [ "@duolingo.com" ] {
+  fileinto :create "INBOX.Duolingo";
   stop;
 }
 
 if header :contains "From" [ "@ebay.de", "@ebay.com" ] {
-  fileinto "INBOX.eBay"; 
+  fileinto :create "INBOX.eBay";
   stop;
 }
 
 if header :contains "From" [ "@google.com", "@accounts.google.com" ] {
-  fileinto "INBOX.Google"; 
+  fileinto :create "INBOX.Google";
   stop;
 }
 
-if header :contains "From" [ "@paypal.com", "@emails.paypal.com" ] {
-  fileinto "INBOX.PayPal"; 
+if header :contains "From" [ "@paypal.de", "@paypal.com", "@emails.paypal.com" ] {
+  fileinto :create "INBOX.PayPal";
   stop;
 }