diff --git a/mail/mailscanner/Makefile b/mail/mailscanner/Makefile index 42a61c355586..9e5fb0b23e4c 100644 --- a/mail/mailscanner/Makefile +++ b/mail/mailscanner/Makefile @@ -3,7 +3,7 @@ PORTNAME= MailScanner PORTVERSION= 5.1.2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail MASTER_SITES= https://s3.amazonaws.com/msv5/release/ DISTNAME= ${PORTNAME}-${PORTVERSION}-${PATCHLEVEL}.nix diff --git a/mail/mailscanner/files/pkg-install.in b/mail/mailscanner/files/pkg-install.in index 84af0bef5d19..63fa31e171c2 100644 --- a/mail/mailscanner/files/pkg-install.in +++ b/mail/mailscanner/files/pkg-install.in @@ -103,10 +103,16 @@ initial_config() case $2 in POST-INSTALL) - [ "x${WITHOUT_SPAMASSASSIN_SYMLINK}" = "xno" ] \ - && [ ! -r ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf ] \ - && ${LN} -s ${PKG_PREFIX}/etc/MailScanner/spam.assassin.prefs.conf \ - ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf + if [ "${WITHOUT_SPAMASSASSIN_SYMLINK}" = "no" ] && \ + [ ! -r ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf ]; then + if [ -r ${PKG_PREFIX}/etc/MailScanner/spam.assassin.prefs.conf ]; then + ${LN} -s ${PKG_PREFIX}/etc/MailScanner/spam.assassin.prefs.conf \ + ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf + else + ${LN} -s ${PKG_PREFIX}/etc/MailScanner/spamassassin.conf \ + ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf + fi + fi upgrade_lang_conf [ -f ${PKG_PREFIX}/etc/MailScanner/MailScanner.conf ] \ && upgrade_mailscanner_conf diff --git a/mail/mailscanner/pkg-plist b/mail/mailscanner/pkg-plist index 624a568d5a43..956cdd852044 100644 --- a/mail/mailscanner/pkg-plist +++ b/mail/mailscanner/pkg-plist @@ -551,3 +551,4 @@ lib/MailScanner/systemd/ms-milter lib/MailScanner/systemd/ms-systemd lib/MailScanner/wrapper/sophos-autoupdate lib/MailScanner/wrapper/sophos-wrapper +@postunexec [ -L %D/etc/mail/spamassassin/mailscanner.cf ] && rm %D/etc/mail/spamassassin/mailscanner.cf || true