Some security options added to mail-related servers..

svn path=/nixpkgs/trunk/; revision=12222
This commit is contained in:
Michael Raskin 2008-06-30 21:11:07 +00:00
parent 5df5717181
commit cd9f816c08
3 changed files with 25 additions and 6 deletions

View File

@ -1,7 +1,13 @@
{stdenv, fetchurl}:
{stdenv, fetchurl
, openssl
, pam
}:
stdenv.mkDerivation {
name = "dovecot-1.0.3";
buildInputs = [openssl pam];
src = fetchurl {
url = http://dovecot.org/releases/1.0/dovecot-1.0.3.tar.gz;
sha256 = "14b3sbvj9xpm5mjwfavwrcwmzfdgian51ncspl8j83cd8j01jdjz";

View File

@ -1,4 +1,7 @@
{stdenv, fetchurl, db4, glibc}:
{stdenv, fetchurl, db4, glibc
, openssl
, cyrus_sasl
}:
assert stdenv.isLinux;
@ -11,10 +14,18 @@ stdenv.mkDerivation {
installTargets = ["non-interactive-package"];
installFlags = [" install_root=$out "];
preInstall = "sed -e '/^PATH=/d' -i postfix-install";
preInstall = "
sed -e '/^PATH=/d' -i postfix-install
";
postInstall = ''
ensureDir $out
mv ut/$out/* $out/
mkdir $out/share/postfix/conf
cp conf/* $out/share/postfix/conf
sed -e 's@PATH=.*@PATH=${stdenv.coreutils}/bin:${stdenv.findutils}/bin:${stdenv.gnused}/bin:${stdenv.gnugrep}/bin:$out/sbin@' -i $out/share/postfix/conf/post-install
sed -e '2aPATH=${stdenv.coreutils}/bin:${stdenv.findutils}/bin:${stdenv.gnused}/bin:${stdenv.gnugrep}/bin:$out/sbin' -i $out/share/postfix/conf/postfix-script
chmod a+x $out/share/postfix/conf/{postfix-script,post-install}
'';
preBuild = ''
@ -28,9 +39,11 @@ stdenv.mkDerivation {
export manpage_directory=$out/share/man
export sample_directory=$out/share/postfix/doc/samples
export readme_directory=$out/share/postfix/doc
make makefiles CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DHAS_DB -I${cyrus_sasl}/include/sasl' AUXLIBS='-lssl -lcrypto -lsasl2 -ldb'
'';
buildinputs = [db4];
buildinputs = [db4 openssl cyrus_sasl];
patches = [./postfix-2.2.9-db.patch ./postfix-2.2.9-lib.patch];
inherit glibc;
}

View File

@ -4375,7 +4375,7 @@ let pkgs = rec {
};
dovecot = import ../servers/mail/dovecot {
inherit fetchurl stdenv ;
inherit fetchurl stdenv openssl pam;
};
ejabberd = import ../servers/xmpp/ejabberd {
@ -4411,7 +4411,7 @@ let pkgs = rec {
};
postfix = import ../servers/mail/postfix {
inherit fetchurl stdenv db4;
inherit fetchurl stdenv db4 openssl cyrus_sasl;
glibc = stdenv.glibc;
};