summary refs log tree commit diff
diff options
context:
space:
mode:
authorpacien <pacien.trangirard@pacien.net>2022-04-03 17:45:43 +0200
committerpacien <pacien.trangirard@pacien.net>2022-04-17 20:42:10 +0200
commit0492ef0e855a21c13beec61054d0b2eee648a1a0 (patch)
tree553b92c7899a50583a4f5b272ff0acb0a8f65e45
parent538ea8934cf61da43a4f323b0084d0fb894b687f (diff)
downloadnixpkgs-0492ef0e855a21c13beec61054d0b2eee648a1a0.tar
nixpkgs-0492ef0e855a21c13beec61054d0b2eee648a1a0.tar.gz
nixpkgs-0492ef0e855a21c13beec61054d0b2eee648a1a0.tar.bz2
nixpkgs-0492ef0e855a21c13beec61054d0b2eee648a1a0.tar.lz
nixpkgs-0492ef0e855a21c13beec61054d0b2eee648a1a0.tar.xz
nixpkgs-0492ef0e855a21c13beec61054d0b2eee648a1a0.tar.zst
nixpkgs-0492ef0e855a21c13beec61054d0b2eee648a1a0.zip
ssmtp: drop unmaintained program
The ssmtp program is not maintained. It is recommended to switch to a
more supported equivalent such as msmtp.

GitHub: see https://github.com/NixOS/nixpkgs/issues/105710
-rw-r--r--pkgs/tools/networking/ssmtp/default.nix45
-rw-r--r--pkgs/tools/networking/ssmtp/ssmtp_support_AuthPassFile_parameter.patch69
-rw-r--r--pkgs/top-level/aliases.nix1
-rw-r--r--pkgs/top-level/all-packages.nix2
4 files changed, 1 insertions, 116 deletions
diff --git a/pkgs/tools/networking/ssmtp/default.nix b/pkgs/tools/networking/ssmtp/default.nix
deleted file mode 100644
index ec309a4a2ce..00000000000
--- a/pkgs/tools/networking/ssmtp/default.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{ lib, stdenv, fetchurl, tlsSupport ? true, openssl }:
-
-stdenv.mkDerivation rec {
-  pname = "ssmtp";
-  version = "2.64";
-
-  src = fetchurl {
-    url = "mirror://debian/pool/main/s/ssmtp/ssmtp_${version}.orig.tar.bz2";
-    sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2";
-  };
-
-  # A request has been made to merge this patch into ssmtp.
-  # See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858781
-  patches = [ ./ssmtp_support_AuthPassFile_parameter.patch ];
-
-  configureFlags = [
-    "--sysconfdir=/etc"
-    (lib.enableFeature tlsSupport "ssl")
-  ];
-
-  postConfigure = ''
-    # Don't run the script that interactively generates a config file.
-    # Also don't install the broken, cyclic symlink /lib/sendmail.
-    sed -e '/INSTALLED_CONFIGURATION_FILE/d' \
-        -e 's|/lib/sendmail|$(TMPDIR)/sendmail|' \
-        -i Makefile
-    substituteInPlace Makefile \
-      --replace '$(INSTALL) -s' '$(INSTALL) -s --strip-program $(STRIP)'
-  '';
-
-  installFlags = [ "etcdir=$(out)/etc" ];
-
-  installTargets = [ "install" "install-sendmail" ];
-
-  buildInputs = lib.optional tlsSupport openssl;
-
-  NIX_LDFLAGS = lib.optionalString tlsSupport "-lcrypto";
-
-  meta = with lib; {
-    description = "simple MTA to deliver mail from a computer to a mail hub";
-    platforms = platforms.linux;
-    license = licenses.gpl2;
-    maintainers = with maintainers; [ basvandijk ];
-  };
-}
diff --git a/pkgs/tools/networking/ssmtp/ssmtp_support_AuthPassFile_parameter.patch b/pkgs/tools/networking/ssmtp/ssmtp_support_AuthPassFile_parameter.patch
deleted file mode 100644
index 371c0f6de2b..00000000000
--- a/pkgs/tools/networking/ssmtp/ssmtp_support_AuthPassFile_parameter.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-diff -Naurb a/ssmtp.c b/ssmtp.c
---- a/ssmtp.c	2009-11-23 10:55:11.000000000 +0100
-+++ b/ssmtp.c	2017-03-25 03:00:26.508283016 +0100
-@@ -57,6 +57,7 @@
- char arpadate[ARPADATE_LENGTH];
- char *auth_user = (char)NULL;
- char *auth_pass = (char)NULL;
-+char *auth_passfile = (char)NULL;
- char *auth_method = (char)NULL;		/* Mechanism for SMTP authentication */
- char *mail_domain = (char)NULL;
- char *from = (char)NULL;		/* Use this as the From: address */
-@@ -1053,6 +1054,15 @@
- 					log_event(LOG_INFO, "Set AuthPass=\"%s\"\n", auth_pass);
- 				}
- 			}
-+			else if(strcasecmp(p, "AuthPassFile") == 0 && !auth_passfile) {
-+				if((auth_passfile = strdup(q)) == (char *)NULL) {
-+					die("parse_config() -- strdup() failed");
-+				}
-+
-+				if(log_level > 0) {
-+					log_event(LOG_INFO, "Set AuthPassFile=\"%s\"\n", auth_passfile);
-+				}
-+			}
- 			else if(strcasecmp(p, "AuthMethod") == 0 && !auth_method) {
- 				if((auth_method = strdup(q)) == (char *)NULL) {
- 					die("parse_config() -- strdup() failed");
-@@ -1415,6 +1425,8 @@
- 	struct passwd *pw;
- 	int i, sock;
- 	uid_t uid;
-+	FILE *fp;
-+	char pass_buf[BUF_SZ+1];
- 	bool_t minus_v_save, leadingdot, linestart = True;
- 	int timeout = 0;
- 	int bufsize = sizeof(b)-1;
-@@ -1433,6 +1445,17 @@
- 		log_event(LOG_INFO, "%s not found", config_file);
- 	}
- 
-+	if(auth_passfile != (char *)NULL) {
-+		if((fp = fopen(auth_passfile, "r")) == (FILE *)NULL) {
-+			  die("Could not open the AuthPassFile %s", auth_passfile);
-+		}
-+		if (fgets(pass_buf, BUF_SZ, fp) == NULL) {
-+			die("Error while reading a line from the AuthPassFile %s, or it is empty", auth_passfile);
-+		}
-+		fclose(fp);
-+		auth_pass = strdup(pass_buf);
-+	}
-+
- 	if((p = strtok(pw->pw_gecos, ";,"))) {
- 		if((gecos = strdup(p)) == (char *)NULL) {
- 			die("ssmtp() -- strdup() failed");
-diff -Naurb a/ssmtp.conf.5 b/ssmtp.conf.5
---- a/ssmtp.conf.5	2008-02-29 03:50:15.000000000 +0100
-+++ b/ssmtp.conf.5	2017-03-25 01:45:52.890165426 +0100
-@@ -61,6 +61,11 @@
- .Pp
- .It Cm AuthPass
- The password to use for SMTP AUTH.
-+It is recommended to use AuthPassFile which also takes precedence over AuthPass.
-+.Pp
-+.It Cm AuthPassFile
-+A file that should contain the password to use for SMTP AUTH.
-+This takes precedence over AuthPass.
- .Pp
- .It Cm AuthMethod
- The authorization method to use.
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index d90bb0cc199..edd0bbcf2b0 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -1203,6 +1203,7 @@ mapAliases ({
   sqliteInteractive = throw "'sqliteInteractive' has been renamed to/replaced by 'sqlite-interactive'"; # Converted to throw 2022-02-22
   squid4 = squid;  # added 2019-08-22
   sshfsFuse = throw "'sshfsFuse' has been renamed to/replaced by 'sshfs-fuse'"; # Converted to throw 2022-02-22
+  ssmtp = throw "'ssmtp' has been removed due to the software being unmaintained. 'msmtp' can be used as a replacement"; # Added 2022-04-17
   stanchion = throw "Stanchion was part of riak-cs which is not maintained anymore"; # added 2020-10-14
   steam-run-native = steam-run; # added 2022-02-21
   stumpwm-git = throw "stumpwm-git has been broken for a long time and lispPackages.stumpwm follows Quicklisp that is close to git version"; # Added 2021-05-09
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 6d928019932..a084c485eac 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -10219,8 +10219,6 @@ with pkgs;
 
   sshoogr = callPackage ../tools/networking/sshoogr { };
 
-  ssmtp = callPackage ../tools/networking/ssmtp { };
-
   ssocr = callPackage ../applications/misc/ssocr { };
 
   ssss = callPackage ../tools/security/ssss { };