aboutsummaryrefslogtreecommitdiff
path: root/systems/eldiron/mail/sieve_scripts
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 01:35:06 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 02:11:48 +0200
commit1a64deeb894dc95e2645a75771732c6cc53a79ad (patch)
tree1b9df4838f894577a09b9b260151756272efeb53 /systems/eldiron/mail/sieve_scripts
parentfa25ffd4583cc362075cd5e1b4130f33306103f0 (diff)
downloadNix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository
Diffstat (limited to 'systems/eldiron/mail/sieve_scripts')
-rw-r--r--systems/eldiron/mail/sieve_scripts/backup.sieve7
-rw-r--r--systems/eldiron/mail/sieve_scripts/report_ham.sieve11
-rw-r--r--systems/eldiron/mail/sieve_scripts/report_spam.sieve3
3 files changed, 21 insertions, 0 deletions
diff --git a/systems/eldiron/mail/sieve_scripts/backup.sieve b/systems/eldiron/mail/sieve_scripts/backup.sieve
new file mode 100644
index 0000000..3014c0a
--- /dev/null
+++ b/systems/eldiron/mail/sieve_scripts/backup.sieve
@@ -0,0 +1,7 @@
1# vim: filetype=sieve
2require ["copy","mailbox","fileinto","regex"];
3if header :is "X-Spam" "Yes" {
4 fileinto :create :copy "Backup/Spam";
5} else {
6 fileinto :create :copy "Backup/Ham";
7}
diff --git a/systems/eldiron/mail/sieve_scripts/report_ham.sieve b/systems/eldiron/mail/sieve_scripts/report_ham.sieve
new file mode 100644
index 0000000..f9b8481
--- /dev/null
+++ b/systems/eldiron/mail/sieve_scripts/report_ham.sieve
@@ -0,0 +1,11 @@
1require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];
2
3if environment :matches "imap.mailbox" "*" {
4 set "mailbox" "${1}";
5}
6
7if string "${mailbox}" "Trash" {
8 stop;
9}
10
11pipe :copy "imapsieve_copy" [ "ham" ];
diff --git a/systems/eldiron/mail/sieve_scripts/report_spam.sieve b/systems/eldiron/mail/sieve_scripts/report_spam.sieve
new file mode 100644
index 0000000..9a1f794
--- /dev/null
+++ b/systems/eldiron/mail/sieve_scripts/report_spam.sieve
@@ -0,0 +1,3 @@
1require ["vnd.dovecot.pipe", "copy", "imapsieve" ];
2
3pipe :copy "imapsieve_copy" [ "spam" ];