]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/mail/scan_reported_mails
Squash changes containing private information
[perso/Immae/Config/Nix.git] / modules / private / mail / scan_reported_mails
diff --git a/modules/private/mail/scan_reported_mails b/modules/private/mail/scan_reported_mails
deleted file mode 100755 (executable)
index fe9f4d6..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-( flock -n 9 || exit 1
-shopt -s nullglob
-for spool in /var/lib/vhost/.rspamd/*/pending; do
-  rspamd_folder=$(dirname $spool)
-  mail_user=$(basename $rspamd_folder)
-  mv $rspamd_folder/pending $rspamd_folder/processing
-
-  for mtype in ham spam; do
-    if [ -d $rspamd_folder/processing/$mtype ]; then
-      output="$(rspamc -h /run/rspamd/worker-controller.sock -c bayes -d $mail_user learn_$mtype $rspamd_folder/processing/$mtype/*)"
-      echo "[$mtype: $mail_user]" ${output} >> /var/lib/vhost/.rspamd/rspamd.log
-      mkdir -p $rspamd_folder/processed/$mtype
-      cp $rspamd_folder/processing/$mtype/* $rspamd_folder/processed/$mtype/
-    fi
-  done
-
-  rm -rf $rspamd_folder/processing
-done
-) 9>/var/lib/vhost/scan_reported_mails.lock