summaryrefslogtreecommitdiff
path: root/virtual/miller-mailserver
diff options
context:
space:
mode:
Diffstat (limited to 'virtual/miller-mailserver')
-rw-r--r--virtual/miller-mailserver/Manifest4
-rw-r--r--virtual/miller-mailserver/files/sa-learn4
-rw-r--r--virtual/miller-mailserver/files/sa-update14
-rw-r--r--virtual/miller-mailserver/miller-mailserver-1.1.ebuild (renamed from virtual/miller-mailserver/miller-mailserver-1.ebuild)2
4 files changed, 17 insertions, 7 deletions
diff --git a/virtual/miller-mailserver/Manifest b/virtual/miller-mailserver/Manifest
index 069490e..59f85e7 100644
--- a/virtual/miller-mailserver/Manifest
+++ b/virtual/miller-mailserver/Manifest
@@ -1,2 +1,2 @@
-AUX sa-learn 81 SHA256 6a51cd3e7704df0a960e1051d08d2db582e73ad0222a92c0d2bc8d89963d3aec SHA512 47e192b340a944c41c96be38b6b80ec24f1de32d07a23ace0e1f8a3cb9deb81a03d420cd16377935237ce2f72ab6d4f7bc5cd07f8ec90feb8143b0586aa87621 WHIRLPOOL 2201293a076cceeff7efc93c4dcb9b55b8265a0f7df28dd009e81b283038e320361d2138671cdb42214f517c32a65d12cbd06dac386631b67073a1e63c5de79d
-EBUILD miller-mailserver-1.ebuild 382 SHA256 1e78b9f26658fce9adfe85dd2c58aa0dd0dac1e8e2149268443773db6175f3e0 SHA512 1f435d532604d975d5d88290c9535c16f45d2c318cc4afec52acc320dddc502f1eb93285c7e7110c3e0e3cc2296e282d6b525657e6eec57937f295a0d73a3594 WHIRLPOOL f5327cf276e7ccb4ba7d2a834b5931b31fd177d55c86613cd1b47f171d0e430949c4766c6cd80defe4747ccda83611ff52fcd239dcf078c5c34a76123ad6884d
+AUX sa-update 506 SHA256 785cbd0a0c649c2641401b2decc3c654b0bd650cdcd60b5bbe35f265fc03b58e SHA512 68e70a9740f3921072454ffaa0bf712443c7d33047fd28f597b20146dd82472f853a2b763171b5b67e5c239b4054b67057365b36fe6aa37a29fe14422e0fe832 WHIRLPOOL 4ff714544e5890a29c70edea6cfbeeb6ca978d66884e21d5b79aaebafb704b34c9bdb8f07455228d9ac44dbae27ccfd1efef1c0d286eae160881514787a8fe97
+EBUILD miller-mailserver-1.1.ebuild 384 SHA256 2008e149e69578aeb678c7812cdcfcec5fc8d9da335aca253770c983e1f3ad30 SHA512 aeff96eee24c78cda23059212b112537ce70aad4ee67b39c20bee051c6e300bd1e687f5602d1e7615668c57ba6a589551018599be99f5c3db04ae927684bc575 WHIRLPOOL 8e82dc1d082384e54d8e0e5a217eb4bf242edf0add558933d2de4c3392f147cd840d589ee98b1515a8a758b873ab66365c3b4ad5f9334e7abb17dec5d26a2324
diff --git a/virtual/miller-mailserver/files/sa-learn b/virtual/miller-mailserver/files/sa-learn
deleted file mode 100644
index db6561f..0000000
--- a/virtual/miller-mailserver/files/sa-learn
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-sa-learn --spam /mnt/home/*/.maildir/.Junk/{cur,new}/* > /dev/null
-
diff --git a/virtual/miller-mailserver/files/sa-update b/virtual/miller-mailserver/files/sa-update
new file mode 100644
index 0000000..f020ece
--- /dev/null
+++ b/virtual/miller-mailserver/files/sa-update
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# Junk is moved to trash after a week; assume I've sorted stuff after 4 days
+find /home/*/.maildir/.Trash/cur -type f -mtime -4 | xargs sa-learn --ham > /dev/null
+find /home/*/.maildir/.Junk/cur -type f -mtime -4 | xargs sa-learn --spam > /dev/null
+
+sa-update --allowplugins --gpgkey D1C035168C1EBC08464946DA258CDB3ABDE9DC10 --channel updates.spamassassin.org
+sa-compile
+
+chown nobody:mail -R /var/lib/spamassassin
+chmod ug+r -R /var/lib/spamassassin
+
+systemctl restart spamassassin.service
+
diff --git a/virtual/miller-mailserver/miller-mailserver-1.ebuild b/virtual/miller-mailserver/miller-mailserver-1.1.ebuild
index e6f6f0d..1636741 100644
--- a/virtual/miller-mailserver/miller-mailserver-1.ebuild
+++ b/virtual/miller-mailserver/miller-mailserver-1.1.ebuild
@@ -15,5 +15,5 @@ RDEPEND="
src_install() {
exeinto /etc/cron.daily
- newexe "${FILESDIR}"/sa-learn sa-learn
+ newexe "${FILESDIR}"/sa-update sa-update
}