Skip to content

Commit

Permalink
Merge pull request #1717 from ikedas/issue-1716 by ikedas
Browse files Browse the repository at this point in the history
DKIM: i= tag may not match in some auto-generated messages (#1716)
  • Loading branch information
ikedas committed Aug 25, 2024
2 parents ef6bcb0 + fb9077e commit 03254d5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/lib/Sympa/Tools/DKIM.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011 Comite Reseau des Universites
# Copyright (c) 2011, 2012, 2013, 2014, 2015, 2016, 2017 GIP RENATER
# Copyright 2018, 2020, 2021, 2022 The Sympa Community. See the
# Copyright 2018, 2020, 2021, 2022, 2023 The Sympa Community. See the
# AUTHORS.md # file at the top-level directory of this distribution and at
# <https://github.com/sympa-community/sympa.git>.
#
Expand Down Expand Up @@ -59,11 +59,10 @@ sub get_dkim_parameters {
|| $list->{'admin'}{'arc_parameters'}{'signer_domain'}
|| $list->{'domain'}
),
# "i=" tag is -request address by default.
# See RFC 4871 (page 21).
# "i=" tag is "@domain" by default. See RFC 6376, pp.22f.
i => (
$list->{'admin'}{'dkim_parameters'}{'signer_identity'}
|| Sympa::get_address($list, 'owner')
|| sprintf('@%s', $list->{'domain'})
),
s => (
$list->{'admin'}{'dkim_parameters'}{'selector'}
Expand All @@ -84,7 +83,10 @@ sub get_dkim_parameters {
|| $robot_id
),
# This is NOT derived by list config
i => Conf::get_robot_conf($robot_id, 'dkim_signer_identity'),
i => (
Conf::get_robot_conf($robot_id, 'dkim_signer_identity')
|| sprintf('@%s', $robot_id)
),
s => (
Conf::get_robot_conf($robot_id, 'dkim_parameters.selector')
|| Conf::get_robot_conf(
Expand Down

0 comments on commit 03254d5

Please sign in to comment.