about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/mail/clamsmtp
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/mail/clamsmtp')
-rw-r--r--nixpkgs/pkgs/servers/mail/clamsmtp/default.nix22
-rw-r--r--nixpkgs/pkgs/servers/mail/clamsmtp/header-order.patch25
2 files changed, 47 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/mail/clamsmtp/default.nix b/nixpkgs/pkgs/servers/mail/clamsmtp/default.nix
new file mode 100644
index 000000000000..7214c08d2427
--- /dev/null
+++ b/nixpkgs/pkgs/servers/mail/clamsmtp/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "clamsmtp-" + version;
+  version = "1.10";
+
+  src = fetchurl {
+    url = "http://thewalter.net/stef/software/clamsmtp/${name}.tar.gz";
+    sha256 = "0apr1pxifw6f1rbbsdrrwzs1dnhybg4hda3qqhqcw7p14r5xnbx5";
+  };
+
+  patches = [ ./header-order.patch ];
+
+  meta = with stdenv.lib; {
+    description = "SMTP filter that allows to check for viruses using the ClamAV
+                   anti-virus software";
+    homepage = http://thewalter.net/stef/software/clamsmtp/;
+    license = licenses.bsd3;
+    maintainers = [ maintainers.ekleog ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/servers/mail/clamsmtp/header-order.patch b/nixpkgs/pkgs/servers/mail/clamsmtp/header-order.patch
new file mode 100644
index 000000000000..102ae0a471dd
--- /dev/null
+++ b/nixpkgs/pkgs/servers/mail/clamsmtp/header-order.patch
@@ -0,0 +1,25 @@
+diff --git a/common/smtppass.c b/common/smtppass.c
+index d9be1ba..4a366f4 100644
+--- a/common/smtppass.c
++++ b/common/smtppass.c
+@@ -60,15 +60,15 @@
+ 
+ #include "usuals.h"
+ 
+-#ifdef LINUX_TRANSPARENT_PROXY
+-#include <linux/netfilter_ipv4.h>
+-#endif
+-
+ #include "compat.h"
+ #include "sock_any.h"
+ #include "stringx.h"
+ #include "sppriv.h"
+ 
++#ifdef LINUX_TRANSPARENT_PROXY
++#include <linux/netfilter_ipv4.h>
++#endif
++
+ /* -----------------------------------------------------------------------
+  *  STRUCTURES
+  */
+