From bd9d7f937ff9b451de5d7e319d69c7aaabb487d4 Mon Sep 17 00:00:00 2001 From: xkcdstickfigure <97917457+xkcdstickfigure@users.noreply.github.com> Date: Fri, 30 Jun 2023 16:07:36 +0100 Subject: [PATCH 1/3] fix comment --- emailwiz.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emailwiz.sh b/emailwiz.sh index 01ff194..2e24c57 100644 --- a/emailwiz.sh +++ b/emailwiz.sh @@ -73,7 +73,7 @@ postconf -e 'smtp_tls_security_level = may' # TLS required for authentication. postconf -e 'smtpd_tls_auth_only = yes' -# Exclude obsolete, insecure and obsolete encryption protocols. +# Exclude insecure and obsolete encryption protocols. postconf -e 'smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1' postconf -e 'smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1' postconf -e 'smtpd_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1' From 3474cb609db473466294f7a1c3f036b34f6d58be Mon Sep 17 00:00:00 2001 From: Andrew Yu Date: Sun, 2 Jul 2023 13:23:48 +0000 Subject: [PATCH 2/3] Make it work with Debian 12: spamassassin -> spamd This commits checks for /etc/default/spamassassin. If it exists, it's passed through sed to modify the CRON variable as usual, and spamassassin.service is enabled and restarted. If /etc/default/spamassassin does not exist, but /etc/default/spamd exists, we modify /etc/default/spamd instead, and restart and enable spamd.service. This has to be done because Debian 12 introduced this breaking change: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020859 Apologies for my previous commit which introduced a new "README" file specifically for my fork of the repository. I've modified my patch to remove it, please accept this version of the patch instead. Signed-off-by: Andrew Yu --- emailwiz.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/emailwiz.sh b/emailwiz.sh index 2e24c57..1c56f52 100644 --- a/emailwiz.sh +++ b/emailwiz.sh @@ -318,9 +318,23 @@ enabled = true enabled = true" > /etc/fail2ban/jail.d/emailwiz.local # Enable SpamAssassin update cronjob. -sed -i "s|^CRON=0|CRON=1|" /etc/default/spamassassin - -for x in spamassassin opendkim dovecot postfix fail2ban; do +if [ -f /etc/default/spamassassin ] +then + sed -i "s|^CRON=0|CRON=1|" /etc/default/spamassassin + printf "Restarting spamassassin..." + service spamassassin restart && printf " ...done\\n" + systemctl enable spamassassin +elif [ -f /etc/default/spamd ] +then + sed -i "s|^CRON=0|CRON=1|" /etc/default/spamd + printf "Restarting spamd..." + service spamd restart && printf " ...done\\n" + systemctl enable spamd +else + printf "!!! Neither /etc/default/spamassassin or /etc/default/spamd exists, this is unexpected and needs to be investigated" +fi + +for x in opendkim dovecot postfix fail2ban; do printf "Restarting %s..." "$x" service "$x" restart && printf " ...done\\n" systemctl enable "$x" From 354a1c80cb2ab53ea5eeef19b8c238f5812d9be2 Mon Sep 17 00:00:00 2001 From: Med Anis Jbara <74317212+medanisjbara@users.noreply.github.com> Date: Tue, 11 Jul 2023 10:40:32 +0100 Subject: [PATCH 3/3] adding pop3 specific settings --- emailwiz.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/emailwiz.sh b/emailwiz.sh index 2e24c57..ebc8e6b 100644 --- a/emailwiz.sh +++ b/emailwiz.sh @@ -17,7 +17,7 @@ umask 0022 -apt-get install -y postfix postfix-pcre dovecot-imapd dovecot-sieve opendkim opendkim-tools spamassassin spamc net-tools fail2ban +apt-get install -y postfix postfix-pcre dovecot-imapd dovecot-pop3d dovecot-sieve opendkim opendkim-tools spamassassin spamc net-tools fail2ban domain="$(cat /etc/mailname)" subdom=${MAIL_SUBDOM:-mail} maildomain="$subdom.$domain" @@ -164,7 +164,7 @@ ssl_dh =