{stdenv, fetchurl, openssl}:
stdenv.mkDerivation {
  name = "msmtp-1.4.21";

  src = fetchurl {
    url = mirror://sourceforge/msmtp/msmtp-1.4.21.tar.bz2;
    sha256 = "1yjgy56n02qs25728psg296amhbdkxq2pv1q3l484f3r9pjrpcrg";
  };

  buildInputs = [ openssl ];

  meta = { 
      description = "a MUA";
      homepage = http://msmtp.sourceforge.net/;
      license = "GPL";
    }; 
}

{ stdenv, fetchurl, openssl, pkgconfig, gnutls, gsasl, libidn }:
stdenv.mkDerivation rec {
  name = "msmtp-1.4.30";

  src = fetchurl {
    url = "mirror://sourceforge/msmtp/${name}.tar.bz2";
    sha256 = "11lq82byx9xyfkf4nrcfjjfv5k8gk3bf8zlw0kml1qrndqlvjlpi";
  };

  buildInputs = [ openssl pkgconfig gnutls gsasl libidn ];

  meta = {
      description = "a MUA";
      homepage = "http://msmtp.sourceforge.net/";
      license = stdenv.lib.licenses.gpl3;
      maintainers = [ stdenv.lib.maintainers.garbas ];
    };
}

Update to 1.4.30, added optional libraries as dependency and point to correct license
msmtp: Update to 1.4.30, added optional libraries as dependency and point to correct license
