diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/mail')
13 files changed, 141 insertions, 193 deletions
diff --git a/nixpkgs/pkgs/servers/mail/dovecot/default.nix b/nixpkgs/pkgs/servers/mail/dovecot/default.nix index 69c1a85760bc..e3afd1f98798 100644 --- a/nixpkgs/pkgs/servers/mail/dovecot/default.nix +++ b/nixpkgs/pkgs/servers/mail/dovecot/default.nix @@ -9,7 +9,7 @@ }: stdenv.mkDerivation rec { - name = "dovecot-2.3.7.1"; + name = "dovecot-2.3.7.2"; nativeBuildInputs = [ perl pkgconfig ]; buildInputs = @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://dovecot.org/releases/2.3/${name}.tar.gz"; - sha256 = "1hq333vj4px4xa9djl8c1v3c8rac98v2mrb9vx1wisg6frpiv9f5"; + sha256 = "0q0jgcv3ni2znkgyhc966ffphj1wk73y76wssh0yciqafs2f0v36"; }; enableParallelBuilding = true; @@ -83,7 +83,7 @@ stdenv.mkDerivation rec { meta = { homepage = https://dovecot.org/; description = "Open source IMAP and POP3 email server written with security primarily in mind"; - maintainers = with stdenv.lib.maintainers; [ peti rickynils fpletz ]; + maintainers = with stdenv.lib.maintainers; [ peti rickynils fpletz globin ]; platforms = stdenv.lib.platforms.unix; }; passthru.tests = { diff --git a/nixpkgs/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix b/nixpkgs/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix index 30c6f2f44dd5..dce0b9174092 100644 --- a/nixpkgs/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix +++ b/nixpkgs/pkgs/servers/mail/dovecot/plugins/pigeonhole/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "dovecot-pigeonhole-${version}"; - version = "0.5.7.1"; + version = "0.5.7.2"; src = fetchurl { url = "https://pigeonhole.dovecot.org/releases/2.3/dovecot-2.3-pigeonhole-${version}.tar.gz"; - sha256 = "0a10mam68pmdh3fw8fnv5jff6xj1k770hvadym2c39vm3x6b4w1j"; + sha256 = "1c0ijjmdskxydmvfk8ixxgg8ndnxx1smvycbp7jjd895a9f0r7fm"; }; buildInputs = [ dovecot openssl ]; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { homepage = http://pigeonhole.dovecot.org/; description = "A sieve plugin for the Dovecot IMAP server"; license = licenses.lgpl21; - maintainers = [ maintainers.rickynils ]; + maintainers = with maintainers; [ rickynils globin ]; platforms = platforms.unix; }; } diff --git a/nixpkgs/pkgs/servers/mail/exim/default.nix b/nixpkgs/pkgs/servers/mail/exim/default.nix index a537a4c6d00c..25a94cd27bfa 100644 --- a/nixpkgs/pkgs/servers/mail/exim/default.nix +++ b/nixpkgs/pkgs/servers/mail/exim/default.nix @@ -3,6 +3,7 @@ , enableMySQL ? false, mysql, zlib , enableAuthDovecot ? false, dovecot , enablePAM ? false, pam +, enableSPF ? true, libspf2 }: stdenv.mkDerivation rec { @@ -18,7 +19,8 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional enableLDAP openldap ++ stdenv.lib.optionals enableMySQL [ mysql.connector-c zlib ] ++ stdenv.lib.optional enableAuthDovecot dovecot - ++ stdenv.lib.optional enablePAM pam; + ++ stdenv.lib.optional enablePAM pam + ++ stdenv.lib.optional enableSPF libspf2; preBuild = '' sed ' @@ -64,6 +66,10 @@ stdenv.mkDerivation rec { s:^\(EXTRALIBS_EXIM\)=\(.*\):\1=\2 -lpam: s:^# \(EXTRALIBS_EXIM\)=.*:\1=-lpam: ''} + ${stdenv.lib.optionalString enableSPF '' + s:^# \(SUPPORT_SPF\)=.*:\1=yes: + s:^# \(LDFLAGS += -lspf2\):\1: + ''} #/^\s*#.*/d #/^\s*$/d ' < src/EDITME > Local/Makefile diff --git a/nixpkgs/pkgs/servers/mail/mailman/0001-Find-external-tools-via-PATH-rather-than-hard-coding.patch b/nixpkgs/pkgs/servers/mail/mailman/0001-Find-external-tools-via-PATH-rather-than-hard-coding.patch new file mode 100644 index 000000000000..b8a5476c0559 --- /dev/null +++ b/nixpkgs/pkgs/servers/mail/mailman/0001-Find-external-tools-via-PATH-rather-than-hard-coding.patch @@ -0,0 +1,51 @@ +From 47469af384a6d4a0877c76d3c52013b40ab61f04 Mon Sep 17 00:00:00 2001 +From: Peter Simons <simons@cryp.to> +Date: Mon, 26 Aug 2019 16:10:04 +0200 +Subject: [PATCH] Find external tools via $PATH rather than hard-coding + /usr/bin. + +--- + src/mailman/config/mhonarc.cfg | 2 +- + src/mailman/config/postfix.cfg | 2 +- + src/mailman/config/schema.cfg | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/mailman/config/mhonarc.cfg b/src/mailman/config/mhonarc.cfg +index b00f93aea..096e9521b 100644 +--- a/src/mailman/config/mhonarc.cfg ++++ b/src/mailman/config/mhonarc.cfg +@@ -24,4 +24,4 @@ base_url: http://$hostname/archives/$fqdn_listname + + # If the archiver works by calling a command on the local machine, this is the + # command to call. +-command: /usr/bin/mhonarc -outdir /path/to/archive/$listname -add ++command: mhonarc -outdir /path/to/archive/$listname -add +diff --git a/src/mailman/config/postfix.cfg b/src/mailman/config/postfix.cfg +index cddda220a..934c9a977 100644 +--- a/src/mailman/config/postfix.cfg ++++ b/src/mailman/config/postfix.cfg +@@ -5,7 +5,7 @@ + # db file, from the associated plain text files. The file being updated will + # be appended to this string (with a separating space), so it must be + # appropriate for os.system(). +-postmap_command: /usr/sbin/postmap ++postmap_command: postmap + + # This variable describes the type of transport maps that will be generated by + # mailman to be used with postfix for LMTP transport. By default, it is set to +diff --git a/src/mailman/config/schema.cfg b/src/mailman/config/schema.cfg +index fa06ccced..406999e13 100644 +--- a/src/mailman/config/schema.cfg ++++ b/src/mailman/config/schema.cfg +@@ -65,7 +65,7 @@ filtered_messages_are_preservable: no + # where the substitution variable $filename is filled in by Mailman, and + # contains the path to the temporary file that the command should read from. + # The command should print the converted text to stdout. +-html_to_plain_text_command: /usr/bin/lynx -dump $filename ++html_to_plain_text_command: lynx -dump $filename + + # Specify what characters are allowed in list names. Characters outside of + # the class [-_.+=!$*{}~0-9a-z] matched case insensitively are never allowed, +-- +2.22.0 + diff --git a/nixpkgs/pkgs/servers/mail/mailman/core.nix b/nixpkgs/pkgs/servers/mail/mailman/core.nix new file mode 100644 index 000000000000..fcd594270db4 --- /dev/null +++ b/nixpkgs/pkgs/servers/mail/mailman/core.nix @@ -0,0 +1,42 @@ +{ stdenv, buildPythonPackage, fetchPypi, alembic, aiosmtpd, dnspython +, flufl_bounce, flufl_i18n, flufl_lock, lazr_config, lazr_delegates, passlib +, requests, zope_configuration, click, falcon, importlib-resources +, zope_component +}: + +buildPythonPackage rec { + pname = "mailman"; + version = "3.2.2"; + + patches = [ ./0001-Find-external-tools-via-PATH-rather-than-hard-coding.patch ]; + + src = fetchPypi { + inherit pname version; + sha256 = "09s9p5pb8gff6zblwidyq830yfgcvv50p5drdaxj1qpy8w46lvc6"; + }; + + propagatedBuildInputs = [ + alembic aiosmtpd click dnspython falcon flufl_bounce flufl_i18n flufl_lock + importlib-resources lazr_config passlib requests zope_configuration + zope_component + ]; + + # Mailman assumes that those scripts in $out/bin are Python scripts. Wrapping + # them in shell code breaks this assumption. The proper way to use mailman is + # to create a specialized python interpreter: + # + # python37.withPackages (ps: [ps.mailman]) + # + # This gives a properly wrapped 'mailman' command plus an interpreter that + # has all the necessary search paths to execute unwrapped 'master' and + # 'runner' scripts. The setup is a little tricky, but fortunately NixOS is + # about to get a OS module that takes care of those details. + dontWrapPythonPrograms = true; + + meta = { + homepage = https://www.gnu.org/software/mailman/; + description = "Free software for managing electronic mail discussion and newsletter lists"; + license = stdenv.lib.licenses.gpl3Plus; + maintainers = with stdenv.lib.maintainers; [ peti ]; + }; +} diff --git a/nixpkgs/pkgs/servers/mail/mailman/default.nix b/nixpkgs/pkgs/servers/mail/mailman/default.nix deleted file mode 100644 index 91445afa97df..000000000000 --- a/nixpkgs/pkgs/servers/mail/mailman/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ stdenv, fetchurl, python2 }: - -stdenv.mkDerivation rec { - name = "mailman-${version}"; - version = "2.1.29"; - - src = fetchurl { - url = "mirror://gnu/mailman/${name}.tgz"; - sha256 = "0b0dpwf6ap260791c7lg2vpw30llf19hymbf2hja3s016rqp5243"; - }; - - buildInputs = [ python2 python2.pkgs.dnspython ]; - - patches = [ ./fix-var-prefix.patch ]; - - configureFlags = [ - "--without-permcheck" - "--with-cgi-ext=.cgi" - "--with-var-prefix=/var/lib/mailman" - ]; - - installTargets = "doinstall"; # Leave out the 'update' target that's implied by 'install'. - - makeFlags = [ "DIRSETGID=:" ]; - - meta = { - homepage = https://www.gnu.org/software/mailman/; - description = "Free software for managing electronic mail discussion and e-newsletter lists"; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.peti ]; - }; -} diff --git a/nixpkgs/pkgs/servers/mail/mailman/fix-var-prefix.patch b/nixpkgs/pkgs/servers/mail/mailman/fix-var-prefix.patch deleted file mode 100644 index 9bb735ecbed7..000000000000 --- a/nixpkgs/pkgs/servers/mail/mailman/fix-var-prefix.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -ubr mailman-2.1.16-orig/contrib/redhat_fhs.patch mailman-2.1.16/contrib/redhat_fhs.patch ---- mailman-2.1.16-orig/contrib/redhat_fhs.patch 2013-10-21 14:55:48.797631434 +0200 -+++ mailman-2.1.16/contrib/redhat_fhs.patch 2013-10-21 14:56:42.534310378 +0200 -@@ -197,7 +197,7 @@ - + else true; \ - + fi; \ - + done -- chmod o-r $(DESTDIR)$(var_prefix)/archives/private -+ chmod o-r $(prefix)$(var_prefix)/archives/private - @for d in $(ARCH_INDEP_DIRS); \ - do \ - Only in mailman-2.1.5.FHS: Makefile.in~ -diff -ubr mailman-2.1.16-orig/Makefile.in mailman-2.1.16/Makefile.in ---- mailman-2.1.16-orig/Makefile.in 2013-10-21 14:55:48.798631519 +0200 -+++ mailman-2.1.16/Makefile.in 2013-10-21 14:56:42.562313220 +0200 -@@ -87,7 +87,7 @@ - @echo "Creating architecture independent directories..." - @for d in $(VAR_DIRS); \ - do \ -- dir=$(DESTDIR)$(var_prefix)/$$d; \ -+ dir=$(prefix)$(var_prefix)/$$d; \ - if test ! -d $$dir; then \ - echo "Creating directory hierarchy $$dir"; \ - $(srcdir)/mkinstalldirs $$dir; \ -@@ -96,7 +96,7 @@ - else true; \ - fi; \ - done -- chmod o-r $(DESTDIR)$(var_prefix)/archives/private -+ chmod o-r $(prefix)$(var_prefix)/archives/private - @for d in $(ARCH_INDEP_DIRS); \ - do \ - dir=$(DESTDIR)$(prefix)/$$d; \ diff --git a/nixpkgs/pkgs/servers/mail/mailman/postorius.nix b/nixpkgs/pkgs/servers/mail/mailman/postorius.nix new file mode 100644 index 000000000000..871f2ea244dd --- /dev/null +++ b/nixpkgs/pkgs/servers/mail/mailman/postorius.nix @@ -0,0 +1,28 @@ +{ stdenv, buildPythonPackage, fetchPypi, beautifulsoup4, vcrpy, mock +, django-mailman3, mailmanclient +}: + +buildPythonPackage rec { + pname = "postorius"; + version = "1.2.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "1722lnscxfl8wdigf5d80d1qmd5gblr439wa989jxlww0wkjg9fl"; + }; + + buildInputs = [ beautifulsoup4 vcrpy mock ]; + propagatedBuildInputs = [ django-mailman3 ]; + + checkPhase = '' + cd $NIX_BUILD_TOP/$sourceRoot + PYTHONPATH=.:$PYTHONPATH python example_project/manage.py test --settings=test_settings postorius + ''; + + meta = { + homepage = https://www.gnu.org/software/mailman/; + description = "Web-based user interface for managing GNU Mailman"; + license = stdenv.lib.licenses.gpl3; + maintainers = with stdenv.lib.maintainers; [ globin peti ]; + }; +} diff --git a/nixpkgs/pkgs/servers/mail/opensmtpd/default.nix b/nixpkgs/pkgs/servers/mail/opensmtpd/default.nix index cd48ab12e24e..2e1b3a4f7980 100644 --- a/nixpkgs/pkgs/servers/mail/opensmtpd/default.nix +++ b/nixpkgs/pkgs/servers/mail/opensmtpd/default.nix @@ -4,14 +4,14 @@ stdenv.mkDerivation rec { name = "opensmtpd-${version}"; - version = "6.4.1p2"; + version = "6.4.2p1"; nativeBuildInputs = [ autoconf automake libtool bison ]; buildInputs = [ libasr libevent zlib libressl db pam ]; src = fetchurl { url = "https://www.opensmtpd.org/archives/${name}.tar.gz"; - sha256 = "0cppqlx4fk6l8rbim5symh2fm1kzshf421256g596j6c9f9q96xn"; + sha256 = "0pgv080ai7d98l9340jadp9wjiaqj2qvgpqhilcz0kps2mdiawbd"; }; patches = [ diff --git a/nixpkgs/pkgs/servers/mail/postfix/default.nix b/nixpkgs/pkgs/servers/mail/postfix/default.nix index 10d3b397b26b..a4b0b921adb2 100644 --- a/nixpkgs/pkgs/servers/mail/postfix/default.nix +++ b/nixpkgs/pkgs/servers/mail/postfix/default.nix @@ -96,12 +96,12 @@ in stdenv.mkDerivation rec { --prefix PATH ":" ${lib.makeBinPath [ coreutils findutils gnugrep gawk gnused ]} ''; - meta = { + meta = with lib; { homepage = http://www.postfix.org/; description = "A fast, easy to administer, and secure mail server"; - license = with lib.licenses; [ ipl10 epl20 ]; - platforms = lib.platforms.linux; - maintainers = [ lib.maintainers.rickynils ]; + license = with licenses; [ ipl10 epl20 ]; + platforms = platforms.linux; + maintainers = with maintainers; [ rickynils globin ]; }; } diff --git a/nixpkgs/pkgs/servers/mail/rmilter/default.nix b/nixpkgs/pkgs/servers/mail/rmilter/default.nix deleted file mode 100644 index 739270326e5b..000000000000 --- a/nixpkgs/pkgs/servers/mail/rmilter/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, bison, flex, pkgconfig, openssl, pcre -, libmilter, opendkim, libmemcached, glib }: - -let patchedLibmilter = stdenv.lib.overrideDerivation libmilter (_ : { - patches = libmilter.patches ++ [ ./fd-passing-libmilter.patch ]; -}); -in - -stdenv.mkDerivation rec { - name = "rmilter-${version}"; - version = "1.10.0"; - - src = fetchFromGitHub { - owner = "vstakhov"; - repo = "rmilter"; - rev = version; - sha256 = "1gbp6jah88l6xqgflim01ycyp63l733bgir65fxnnrmifj1qzymh"; - }; - - nativeBuildInputs = [ bison cmake flex pkgconfig ]; - buildInputs = [ libmemcached patchedLibmilter openssl pcre opendkim glib ]; - - meta = with stdenv.lib; { - homepage = https://github.com/vstakhov/rmilter; - license = licenses.asl20; - description = '' - Daemon to integrate rspamd and milter compatible MTA, for example - postfix or sendmail - ''; - maintainers = with maintainers; [ avnik fpletz ]; - platforms = with platforms; linux; - }; -} diff --git a/nixpkgs/pkgs/servers/mail/rmilter/fd-passing-libmilter.patch b/nixpkgs/pkgs/servers/mail/rmilter/fd-passing-libmilter.patch deleted file mode 100644 index 3ab61a6fab00..000000000000 --- a/nixpkgs/pkgs/servers/mail/rmilter/fd-passing-libmilter.patch +++ /dev/null @@ -1,80 +0,0 @@ -Description: systemd-like socket activation support for libmilter -Author: Mikhail Gusarov <dottedmag@debian.org -diff --git a/libmilter/docs/smfi_setconn.html b/libmilter/docs/smfi_setconn.html -index 70a510e..013f04e 100644 ---- a/libmilter/docs/smfi_setconn.html -+++ b/libmilter/docs/smfi_setconn.html -@@ -43,6 +43,7 @@ Set the socket through which this filter should communicate with sendmail. - <LI><CODE>{unix|local}:/path/to/file</CODE> -- A named pipe. - <LI><CODE>inet:port@{hostname|ip-address}</CODE> -- An IPV4 socket. - <LI><CODE>inet6:port@{hostname|ip-address}</CODE> -- An IPV6 socket. -+ <LI><CODE>fd:number</CODE> -- Pre-opened file descriptor. - </UL> - </TD></TR> - </TABLE> -diff --git a/libmilter/listener.c b/libmilter/listener.c -index 48c552f..2249a1f 100644 ---- a/libmilter/listener.c -+++ b/libmilter/listener.c -@@ -197,6 +197,11 @@ mi_milteropen(conn, backlog, rmsocket, name) - L_socksize = sizeof addr.sin6; - } - #endif /* NETINET6 */ -+ else if (strcasecmp(p, "fd") == 0) -+ { -+ addr.sa.sa_family = AF_UNSPEC; -+ L_socksize = sizeof (_SOCK_ADDR); -+ } - else - { - smi_log(SMI_LOG_ERR, "%s: unknown socket type %s", -@@ -443,7 +448,21 @@ mi_milteropen(conn, backlog, rmsocket, name) - } - #endif /* NETINET || NETINET6 */ - -- sock = socket(addr.sa.sa_family, SOCK_STREAM, 0); -+ if (addr.sa.sa_family == AF_UNSPEC) -+ { -+ char *end; -+ sock = strtol(colon, &end, 10); -+ if (*end != '\0' || sock < 0) -+ { -+ smi_log(SMI_LOG_ERR, "%s: expected positive integer as fd, got %s", name, colon); -+ return INVALID_SOCKET; -+ } -+ } -+ else -+ { -+ sock = socket(addr.sa.sa_family, SOCK_STREAM, 0); -+ } -+ - if (!ValidSocket(sock)) - { - smi_log(SMI_LOG_ERR, -@@ -466,6 +485,7 @@ mi_milteropen(conn, backlog, rmsocket, name) - #if NETUNIX - addr.sa.sa_family != AF_UNIX && - #endif /* NETUNIX */ -+ addr.sa.sa_family != AF_UNSPEC && - setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *) &sockopt, - sizeof(sockopt)) == -1) - { -@@ -511,7 +531,8 @@ mi_milteropen(conn, backlog, rmsocket, name) - } - #endif /* NETUNIX */ - -- if (bind(sock, &addr.sa, L_socksize) < 0) -+ if (addr.sa.sa_family != AF_UNSPEC && -+ bind(sock, &addr.sa, L_socksize) < 0) - { - smi_log(SMI_LOG_ERR, - "%s: Unable to bind to port %s: %s", -@@ -817,7 +838,7 @@ mi_listener(conn, dbg, smfi, timeout, backlog) - # ifdef BSD4_4_SOCKADDR - cliaddr.sa.sa_len == 0 || - # endif /* BSD4_4_SOCKADDR */ -- cliaddr.sa.sa_family != L_family)) -+ (L_family != AF_UNSPEC && cliaddr.sa.sa_family != L_family))) - { - (void) closesocket(connfd); - connfd = INVALID_SOCKET; diff --git a/nixpkgs/pkgs/servers/mail/rspamd/default.nix b/nixpkgs/pkgs/servers/mail/rspamd/default.nix index 25e7807659df..67a647b236b4 100644 --- a/nixpkgs/pkgs/servers/mail/rspamd/default.nix +++ b/nixpkgs/pkgs/servers/mail/rspamd/default.nix @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { homepage = https://rspamd.com; license = licenses.asl20; description = "Advanced spam filtering system"; - maintainers = with maintainers; [ avnik fpletz ]; + maintainers = with maintainers; [ avnik fpletz globin ]; platforms = with platforms; linux; }; } |