From a929614f94d11a4f397e72e74f38b3212c24cdee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 23 Jun 2019 21:04:55 +0200 Subject: Configure mail (dovecot, postfix, spam checks) --- pkgs/dovecot/plugins/deleted_to_trash/default.nix | 21 +++++++++++++++++++++ .../deleted_to_trash/dovecot-deleted_to_trash.json | 15 +++++++++++++++ .../dovecot/plugins/deleted_to_trash/fix_mbox.patch | 12 ++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 pkgs/dovecot/plugins/deleted_to_trash/default.nix create mode 100644 pkgs/dovecot/plugins/deleted_to_trash/dovecot-deleted_to_trash.json create mode 100644 pkgs/dovecot/plugins/deleted_to_trash/fix_mbox.patch (limited to 'pkgs/dovecot/plugins/deleted_to_trash') diff --git a/pkgs/dovecot/plugins/deleted_to_trash/default.nix b/pkgs/dovecot/plugins/deleted_to_trash/default.nix new file mode 100644 index 0000000..db1afb5 --- /dev/null +++ b/pkgs/dovecot/plugins/deleted_to_trash/default.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, dovecot, mylibs, fetchpatch }: + +stdenv.mkDerivation (mylibs.fetchedGithub ./dovecot-deleted_to_trash.json // rec { + buildInputs = [ dovecot ]; + patches = [ + (fetchpatch { + name = "fix-dovecot-2.3.diff"; + url = "https://github.com/lexbrugman/dovecot_deleted_to_trash/commit/c52a3799a96104a603ade33404ef6aa1db647b2f.diff"; + sha256 = "0pld3rdcjp9df2qxbp807k6v4f48lyk0xy5q508ypa57d559y6dq"; + }) + ./fix_mbox.patch + ]; + preConfigure = '' + substituteInPlace Makefile --replace \ + "/usr/include/dovecot" \ + "${dovecot}/include/dovecot" + substituteInPlace Makefile --replace \ + "/usr/lib/dovecot/modules" \ + "$out/lib/dovecot" + ''; +}) diff --git a/pkgs/dovecot/plugins/deleted_to_trash/dovecot-deleted_to_trash.json b/pkgs/dovecot/plugins/deleted_to_trash/dovecot-deleted_to_trash.json new file mode 100644 index 0000000..2987a02 --- /dev/null +++ b/pkgs/dovecot/plugins/deleted_to_trash/dovecot-deleted_to_trash.json @@ -0,0 +1,15 @@ +{ + "tag": "81b0754-master", + "meta": { + "name": "dovecot-deleted_to_trash", + "url": "https://github.com/lexbrugman/dovecot_deleted_to_trash", + "branch": "master" + }, + "github": { + "owner": "lexbrugman", + "repo": "dovecot_deleted_to_trash", + "rev": "81b07549accfc36467bf8527a53c295c7a02dbb9", + "sha256": "1b3k31g898s4fa0a9l4kvjsdyds772waaay84sjdxv09jw6mqs0f", + "fetchSubmodules": true + } +} diff --git a/pkgs/dovecot/plugins/deleted_to_trash/fix_mbox.patch b/pkgs/dovecot/plugins/deleted_to_trash/fix_mbox.patch new file mode 100644 index 0000000..0060fb4 --- /dev/null +++ b/pkgs/dovecot/plugins/deleted_to_trash/fix_mbox.patch @@ -0,0 +1,12 @@ +diff --git a/src/deleted-to-trash-plugin.c b/src/deleted-to-trash-plugin.c +index bb4cc78..66bad53 100644 +--- a/src/deleted-to-trash-plugin.c ++++ b/src/deleted-to-trash-plugin.c +@@ -82,6 +82,7 @@ static struct mailbox *mailbox_open_or_create(struct mailbox_list *list, const c + *error_r = mail_storage_get_last_error(mailbox_get_storage(box), &error); + if (error != MAIL_ERROR_NOTFOUND) + { ++ i_error("%s", *error_r); + mailbox_free(&box); + return NULL; + } -- cgit v1.2.3