From 9270d397a52f70ecec3c2ff17dd085983135c439 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 20:22:15 +0100 Subject: [PATCH] fix re-adding duplicated configuration blocks in post script [release 2.12.2-2mamba;Sat Jan 28 2023] --- amavisd-new.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/amavisd-new.spec b/amavisd-new.spec index 5af36a6..68c1e18 100644 --- a/amavisd-new.spec +++ b/amavisd-new.spec @@ -3,7 +3,7 @@ Name: amavisd-new Version: 2.12.2 -Release: 1mamba +Release: 2mamba Summary: An interface between mailer (MTA) and content checkers: virus scanners, and/or SpamAssassin Group: System/Servers Vendor: openmamba @@ -80,9 +80,6 @@ install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/amavisd.service %systemd_postun_with_restart amavisd %pre -if [ $1 -gt 1 ]; then - /sbin/chkconfig --del amavisd 2>/dev/null -fi if [ $1 -ge 1 ]; then /usr/sbin/groupadd vscan -g %{vscan_gid} 2>/dev/null /usr/sbin/useradd -u %{vscan_uid} -c 'Virus Scan user' -d /var/amavis -g vscan -s /bin/false vscan 2>/dev/null @@ -98,9 +95,9 @@ if [ $1 -ge 1 ]; then sed -i "s|# \$mydomain = .*|\$mydomain = '$DOMAIN';|" %{_sysconfdir}/amavisd.conf postconf -e "strict_rfc821_envelopes = yes" sudo postconf -e "content_filter = smtp-amavis:[127.0.0.1]:10024" - [ "`grep amavisfeed %{_sysconfdir}/postfix/master.cf`" ] || { + grep -q amavisd %{_sysconfdir}/postfix/master.cf || { cat >> %{_sysconfdir}/postfix/master.cf << _EOF -# BEGIN of amavaisd-new configuration +# BEGIN of amavisd-new configuration smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -o smtp_send_xforward_command=yes @@ -132,7 +129,7 @@ _EOF postfix reload } fi -exit 0 +: %preun %systemd_preun amavisd @@ -140,7 +137,7 @@ if [ $1 -eq 0 ]; then /usr/sbin/userdel vscan 2>/dev/null /usr/sbin/groupdel vscan 2>/dev/null fi -exit 0 +: %files %defattr(-,root,root) @@ -152,6 +149,9 @@ exit 0 %doc LICENSE TODO %changelog +* Sat Jan 28 2023 Silvan Calarco 2.12.2-2mamba +- fix re-adding duplicated configuration blocks in post script + * Wed Dec 29 2021 Automatic Build System 2.12.2-1mamba - automatic version update by autodist