From bd1dd78814937fa4453b4133f0ac7a34366d2225 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 2 May 2016 13:38:56 +0100 Subject: Revised SA updating --- virtual/miller-mailserver/Manifest | 4 ++-- virtual/miller-mailserver/files/sa-learn | 4 ---- virtual/miller-mailserver/files/sa-update | 14 ++++++++++++++ .../miller-mailserver/miller-mailserver-1.1.ebuild | 19 +++++++++++++++++++ virtual/miller-mailserver/miller-mailserver-1.ebuild | 19 ------------------- 5 files changed, 35 insertions(+), 25 deletions(-) delete mode 100644 virtual/miller-mailserver/files/sa-learn create mode 100644 virtual/miller-mailserver/files/sa-update create mode 100644 virtual/miller-mailserver/miller-mailserver-1.1.ebuild delete mode 100644 virtual/miller-mailserver/miller-mailserver-1.ebuild (limited to 'virtual') 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.1.ebuild b/virtual/miller-mailserver/miller-mailserver-1.1.ebuild new file mode 100644 index 0000000..1636741 --- /dev/null +++ b/virtual/miller-mailserver/miller-mailserver-1.1.ebuild @@ -0,0 +1,19 @@ +EAPI="2" +DESCRIPTION="Virtual for Miller mail servers" + +SLOT="0" +KEYWORDS="alpha amd64 arm ia64 mips ppc ppc-macos sparc sparc-fbsd x86 x86-fbsd" +IUSE="" + +RDEPEND=" + virtual/miller-base + virtual/cron + || ( net-mail/courier-imap mail-mta/courier ) + mail-mta/exim + mail-filter/spamassassin[berkdb] +" + +src_install() { + exeinto /etc/cron.daily + newexe "${FILESDIR}"/sa-update sa-update +} diff --git a/virtual/miller-mailserver/miller-mailserver-1.ebuild b/virtual/miller-mailserver/miller-mailserver-1.ebuild deleted file mode 100644 index e6f6f0d..0000000 --- a/virtual/miller-mailserver/miller-mailserver-1.ebuild +++ /dev/null @@ -1,19 +0,0 @@ -EAPI="2" -DESCRIPTION="Virtual for Miller mail servers" - -SLOT="0" -KEYWORDS="alpha amd64 arm ia64 mips ppc ppc-macos sparc sparc-fbsd x86 x86-fbsd" -IUSE="" - -RDEPEND=" - virtual/miller-base - virtual/cron - || ( net-mail/courier-imap mail-mta/courier ) - mail-mta/exim - mail-filter/spamassassin[berkdb] -" - -src_install() { - exeinto /etc/cron.daily - newexe "${FILESDIR}"/sa-learn sa-learn -} -- cgit v1.2.3