anchor.diff:        ${stdenv.lib.optionalString enableAuthDovecot ''
           s:^# \(AUTH_DOVECOT\)=.*:\1=yes:
         ''}
  +      ${stdenv.lib.optionalString enablePAM ''
  +        s:^# \(SUPPORT_PAM\)=.*:\1=yes:
  +        s:^\(EXTRALIBS_EXIM\)=\(.*\):\1=\2 -lpam:
  +        s:^# \(EXTRALIBS_EXIM\)=.*:\1=-lpam:
  +      ''}
         #/^\s*#.*/d
         #/^\s*$/d
       ' < src/EDITME > Local/Makefile
  
positive.code:   buildInputs = [ coreutils db openssl perl pcre ]
      ++ stdenv.lib.optional enableLDAP openldap
      ++ stdenv.lib.optionals enableMySQL [ mysql zlib ]
      ++ stdenv.lib.optional enableAuthDovecot dovecot;
  
    preBuild = ''
      ${stdenv.lib.optionalString enableMySQL "PKG_CONFIG_PATH=$PKG_CONFIG_PATH:${mysql}/share/mysql/pkgconfig/"}
  
negative.code: , enableLDAP ? false, openldap
  , enableMySQL ? false, mysql, zlib
  , enableAuthDovecot ? false, dovecot
  , enablePAM ? false, pam
  }:
  
  stdenv.mkDerivation rec {
  