From b79688e179e3743cf9af9ff0640b48d5fd8e1424 Mon Sep 17 00:00:00 2001 From: Xavier Bachelot Date: Jun 14 2023 10:13:13 +0000 Subject: Workaround DKIM issues on EL7 --- diff --git a/sympa-6.2.72-DKIM_workaround_for_EL7.patch b/sympa-6.2.72-DKIM_workaround_for_EL7.patch new file mode 100644 index 0000000..5bab13f --- /dev/null +++ b/sympa-6.2.72-DKIM_workaround_for_EL7.patch @@ -0,0 +1,82 @@ +From 8e4d671cb49ed740614ac804c5ce7c8f1e154e38 Mon Sep 17 00:00:00 2001 +From: IKEDA Soji +Date: Wed, 14 Jun 2023 07:02:25 +0900 +Subject: [PATCH] Workaround for Issue 1685 + +--- + src/lib/Sympa/List.pm | 18 ------------------ + src/lib/Sympa/Message.pm | 4 ---- + src/lib/Sympa/Spindle/ProcessOutgoing.pm | 9 --------- + 3 files changed, 31 deletions(-) + +diff --git a/src/lib/Sympa/List.pm b/src/lib/Sympa/List.pm +index e862d5b3b..6712183b1 100644 +--- a/src/lib/Sympa/List.pm ++++ b/src/lib/Sympa/List.pm +@@ -5885,24 +5885,6 @@ sub add_list_header { + ); + $message->add_header('List-Help', + join ', ', map { sprintf '<%s>', $_ } @urls); +- } elsif ($field eq 'unsubscribe' and $options{oneclick}) { +- if ($wwsympa_url +- and my $id = $self->oneclick_id($options{oneclick})) { +- my @urls = ( +- Sympa::get_url($self, 'oneclick', paths => [$id]), +- Sympa::Tools::Text::mailtourl( +- Sympa::get_address($self, 'sympa'), +- query => {subject => sprintf('SIG %s', $self->{'name'})} +- ) +- ); +- # Overwrite existing fields to prevent forgery. +- $message->delete_header('List-Unsubscribe-Post'); +- $message->delete_header('List-Unsubscribe'); +- $message->add_header('List-Unsubscribe-Post', +- 'List-Unsubscribe=One-Click'); +- $message->add_header('List-Unsubscribe', +- join ', ', map { sprintf '<%s>', $_ } @urls); +- } + } elsif ($field eq 'unsubscribe') { + my @urls = ( + ($wwsympa_url ? (Sympa::get_url($self, 'signoff')) : ()), +diff --git a/src/lib/Sympa/Message.pm b/src/lib/Sympa/Message.pm +index 9523bb8b4..4378bcffb 100644 +--- a/src/lib/Sympa/Message.pm ++++ b/src/lib/Sympa/Message.pm +@@ -471,8 +471,6 @@ sub dkim_sign { + $log->syslog('err', 'Can\'t create Mail::DKIM::Signer'); + return undef; + } +- # For One-Click Unsubscribe. +- $dkim->extended_headers({'List-Unsubscribe-Post' => '*'}); + + # $new_body will store the body as fed to Mail::DKIM to reuse it + # when returning the message as string. Line terminators must be +@@ -535,8 +533,6 @@ sub arc_seal { + $log->syslog('err', 'Can\'t create Mail::DKIM::ARC::Signer'); + return undef; + } +- # For One-Click Unsubscribe. +- $arc->extended_headers({'List-Unsubscribe-Post' => '*'}); + + # $new_body will store the body as fed to Mail::DKIM to reuse it + # when returning the message as string. Line terminators must be +diff --git a/src/lib/Sympa/Spindle/ProcessOutgoing.pm b/src/lib/Sympa/Spindle/ProcessOutgoing.pm +index c14e6ee7c..1a4a24f5c 100644 +--- a/src/lib/Sympa/Spindle/ProcessOutgoing.pm ++++ b/src/lib/Sympa/Spindle/ProcessOutgoing.pm +@@ -290,15 +290,6 @@ sub _twist { + $return_path = Sympa::get_address($robot, 'owner'); + } + +- # If message is personalized and DKIM signature is available, +- # Add One-Click Unsubscribe header field. +- if ( $new_message->{shelved}{merge} +- and (%arc or $new_message->{shelved}{dkim_sign} and %dkim) +- and grep { 'unsubscribe' eq $_ } +- @{$list->{'admin'}{'rfc2369_header_fields'}}) { +- $list->add_list_header($new_message, 'unsubscribe', +- oneclick => $rcpt); +- } + if ( $new_message->{shelved}{merge} + and $new_message->{shelved}{merge} ne 'footer') { + unless ($new_message->personalize($list, $rcpt)) { diff --git a/sympa.spec b/sympa.spec index 67f604f..323ae24 100644 --- a/sympa.spec +++ b/sympa.spec @@ -83,7 +83,7 @@ Name: sympa Version: 6.2.72 -Release: %{?pre_rel:0.}2%{?pre_rel:.%pre_rel}%{?dist} +Release: %{?pre_rel:0.}3%{?pre_rel:.%pre_rel}%{?dist} Summary: Powerful multilingual List Manager Summary(fr): Gestionnaire de listes électroniques Summary(ja): 高機能で多言語対応のメーリングリスト管理ソフトウェア @@ -106,6 +106,10 @@ Source130: sympa-sysconfig # RPM specific customization of site defaults Patch13: sympa-6.2.57b.1-confdef.patch +# Workaround for https://github.com/sympa-community/sympa/issues/1685 +# https://github.com/sympa-community/sympa/commit/8e4d671.patch +Patch14: sympa-6.2.72-DKIM_workaround_for_EL7.patch + BuildRequires: gcc, make BuildRequires: gettext BuildRequires: systemd @@ -224,6 +228,7 @@ Requires: perl(FCGI) %if 0%{?el7} Requires: perl(HTML::FormatText) Requires: perl(HTML::StripScripts::Parser) +Requires: perl(Mail::AuthenticationResults) %endif # Optional CPAN packages @@ -419,6 +424,7 @@ Sympa documentation for developers. %prep %setup -q -n %{name}-%{version}%{?pre_rel} %patch -P13 -p0 -b .confdef +%{?el7:%patch -P14 -p1 -b .dkim_el7} %build @@ -861,6 +867,9 @@ fi %changelog +* Wed Jun 14 2023 Xavier Bachelot 6.2.72-3 +- Workaround DKIM issues on EL7 + * Thu Jun 01 2023 Xavier Bachelot 6.2.72-2 - Update to 6.2.72 (fixes CVE-2021-4243) - Convert License: to SPDX