summaryrefslogtreecommitdiff
path: root/home/mail
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-01-19 03:09:10 -0600
committerAlejandro Soto <alejandro@34project.org>2023-01-19 03:09:10 -0600
commit67b12424f1c73c11cf8c8ad951d1b91c88802abb (patch)
treecaa2cba8eabca5deb30364c8799f30315c4186e4 /home/mail
parent06ac78d36a437429524a93e02564746326859789 (diff)
home/mail: update sieve script
Diffstat (limited to 'home/mail')
-rw-r--r--home/mail/.gitignore1
-rw-r--r--home/mail/dovecot.sieve84
2 files changed, 73 insertions, 12 deletions
diff --git a/home/mail/.gitignore b/home/mail/.gitignore
new file mode 100644
index 0000000..1d9a3a0
--- /dev/null
+++ b/home/mail/.gitignore
@@ -0,0 +1 @@
+*.svbin
diff --git a/home/mail/dovecot.sieve b/home/mail/dovecot.sieve
index 861a118..a0db18f 100644
--- a/home/mail/dovecot.sieve
+++ b/home/mail/dovecot.sieve
@@ -11,23 +11,24 @@
require ["fileinto", "mailbox"];
if anyof(
- address :is "from" ["mailer-daemon@34project.org"],
+ address :is "from" [
+ "mailer-daemon@34project.org",
+ "expiry@letsencrypt.org"
+ ],
+
address :is :localpart "to" ["abuse", "security", "postmaster", "hostmaster", "sysadmin"]
) {
fileinto :create "admin";
-} elsif address :is "from" "notifications@github.com" {
+} elsif address :is "from" ["notifications@github.com", "noreply@github.com"] {
fileinto :create "github";
-} elsif address :is "from" [
- "lwn@lwn.net",
- "info@fsf.org"
- ]
-{
+} elsif address :is "from" [ "lwn@lwn.net", "info@fsf.org"] {
fileinto :create "news";
} elsif anyof(
address :is "from" [
"factura@factura.tigo.cr",
"factura_electronica@claro.cr",
- "bcrtarjestcta@bancobcr.com"
+ "bcrtarjestcta@bancobcr.com",
+ "mensajero@bancobcr.com"
],
allof(
@@ -36,18 +37,77 @@ if anyof(
),
allof(
+ address :is "from" "support@ovh.ca",
+ header :contains "Subject" ["Invoice available", "[INVOICE"]
+ ),
+
+ allof(
address :is "from" [
"support-renew@gandi.net",
"support-es@gandi.net",
- "support-es@support.gandi.net"
+ "support-en@support.gandi.net"
],
header :contains "Subject" ["Automatic crediting", "Factura", "domain name renewed"]
- )
+ ),
+
+ header :is "From" "Recibos de Uber <noreply@uber.com>",
+ address :matches "from" "cobros*@tigo.co.cr"
) {
fileinto :create "bills";
+# Esta es otra sección de .admin, existe para darle precedencia a recibos de OVH en .bills
+} elsif address :is :domain "from" "ovh.ca" {
+ fileinto :create "admin";
} elsif address :is :domain ["from", "to"] ["estudiantec.cr", "itcr.ac.cr", "tec.ac.cr"] {
- fileinto :create "tec";
-} elsif address :is :domain "from" ["turing.com", "paypal.com"] {
+ if allof(
+ address :matches :localpart "from" "tecdigital*",
+ # A veces han destruido la codificación de la tilde
+ header :matches "Subject" "Notificaci*n de Documentos"
+ ) {
+ fileinto :create "tec.docs";
+ } elsif anyof(
+ address :is :localpart "from" "lcortes",
+
+ allof(
+ address :matches :localpart "from" "tecdigital*",
+ header :contains "Subject" [
+ "Estudiantes IDC - ",
+ "Ingenieria En Computadores - ",
+ "[ESTUDIANTES IDC]",
+ "[AREA DE INGENIERIA EN COMPUTADORAS]"
+ ]
+ )
+ ) {
+ fileinto :create "tec.ce";
+ } else {
+ fileinto :create "tec";
+ }
+} elsif anyof(
+ address :is :domain "from" [
+ "turing.com",
+ "turing.bz",
+ "paypal.com",
+ "mail.paypal.com"
+ ],
+
+ address :is "from" [
+ "info@tigo.co.cr",
+ "info@info.tigo.cr",
+ "campaigns@fsf.org",
+ "bcrsistematica@bancobcr.com"
+ ],
+
+ allof(
+ address :is "from" "no-reply@github.com",
+ header :contains "X-Mailer" "Mailchimp Mailer"
+ ),
+
+ allof(
+ address :is "from" "no-reply@accounts.google.com",
+ header :contains "Subject" "Alerta de seguridad"
+ ),
+
+ header :is "From" "The Google Account Team <google-noreply@google.com>"
+) {
fileinto :create "spam";
}