Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sympa 6.2.74 no longer seems to support LISTNAME-request aliases to contact the list owners #1927

Open
dpc22 opened this issue Jan 22, 2025 · 10 comments
Labels

Comments

@dpc22
Copy link
Contributor

dpc22 commented Jan 22, 2025

Version

6.2.74

Installation method

My own rpm, derived from the "official" rpm for RHEL 9.

Expected behavior

Email sent to LISTNAME-request should be sent to the owners of a given list.

That is the address advertised on the list info landing page, for example:

https://lists.cam.ac.uk/sympa/info/test-dpc22

"Contact owners" is mailto:[email protected]

and this is repeated on https://www.sympa.community/manual/customize/basics-addresses.html

"list [email protected]

The address to contact the list owners. Messages sent to this address will be forwarded to the people designated as list owners according to list configuration."

Actual behavior

Attempts to email [email protected] generate a bounce message with:

Final-Recipient: rfc822; [[email protected]](mailto:[email protected])
Action: failed
Status: 5.1.1
Remote-MTA: dns; lists.cam.ac.uk
Diagnostic-Code: X-Sympa; List does not exist

The sympa logs tell me:

"Jan 22 18:22:27 lists-1 sympa_msg[6028]: err main::#246 > Sympa::Spindle::spin#83 > Sympa::Spindle::ProcessIncoming::_twist#246 List test-dpc22-request does not exist"

Additional information

We upgraded from Sympa 6.2.72 to Sympa 6.2.74 this morning. LISTNAME-request was working before the upgrade.

The Exim configuration has not been changed. That still believes that LISTNAME-request is a valid email address if a LISTNAME is a list on the system:

SYMPA_EXPL   = /var/lib/sympa/list_data
SYMPA_DSEARCH = ${lookup {$local_part} dsearch {SYMPA_EXPL}}

sympa_queue:
  driver = accept
  local_parts = SYMPA_DSEARCH
  local_part_suffix_optional
  local_part_suffix = -request : -editor : -subscribe : -unsubscribe
  retry_use_local_part
  transport = sympa_queue

Sympa itself is the component which is rejecting the address with:

"Jan 22 18:22:27 lists-1 sympa_msg[6028]: err main::#246 > Sympa::Spindle::spin#83 > Sympa::Spindle::ProcessIncoming::_twist#246 List test-dpc22-request does not exist"

@dpc22 dpc22 added the bug label Jan 22, 2025
@dpc22 dpc22 changed the title Sympa 6.2.74 no longer seems to support LISTNAME-request Sympa 6.2.74 no longer seems to support LISTNAME-request aliases to contact the list owners Jan 22, 2025
@dpc22
Copy link
Contributor Author

dpc22 commented Jan 22, 2025

We do use:

return_path_suffix     -bounces

I don't see how that would be relevant, but it seems sensible to mention.

@dpc22
Copy link
Contributor Author

dpc22 commented Jan 22, 2025

Seems to be a duplicate of #1922, but using Exim rather than Postfix.

The Exim configuration hasn't changed, and it is definitely sending messages to Sympa using the Exim sympa_queue transport:

/usr/libexec/sympa/queue ${local_part_data}${local_part_suffix}@lists.cam.ac.uk

which in this case will expand to:

/usr/libexec/sympa/queue [email protected]

"-request" will be stripped off as ${local_part_suffix} by the Exim router, and glued back on by the transport.

@dpc22
Copy link
Contributor Author

dpc22 commented Jan 22, 2025

The following sends a message to my test list:

$ echo -e "From: [email protected]\nSubject: Test Message\nMessage-ID: foo" | /usr/libexec/sympa/queue [email protected]

While the following (-request version of the same list):

$ echo -e "From: [email protected]\nSubject: Test Message\nMessage-ID: foo" | /usr/libexec/sympa/queue [email protected]

generates:

"Jan 22 19:37:38 lists-2 sympa_msg[2224]: err main::#246 > Sympa::Spindle::spin#83 > Sympa::Spindle::ProcessIncoming::_twist#246 List test-dpc22-request does not exist"

@dpc22
Copy link
Contributor Author

dpc22 commented Jan 23, 2025

I downgraded my test server to 6.2.72. With "log_level 9" I see:

Jan 23 08:27:49 lists-2 sympa_msg[1324586]: debug2 Sympa::Message::check_smime_signature(Sympa::Message <[email protected]/shelved:arc_cv=pass>)
Jan 23 08:27:49 lists-2 sympa_msg[1324586]: debug2 Sympa::Message::smime_decrypt(Sympa::Message <[email protected]/shelved:arc_cv=pass>)
Jan 23 08:27:49 lists-2 sympa_msg[1324586]: debug2 Sympa::Message::check_virus_infection(Sympa::Message <[email protected]/shelved:arc_cv=pass>, ...)
Jan 23 08:27:49 lists-2 sympa_msg[1324586]: debug Sympa::Message::check_virus_infection() Sympa not configured to scan virus in message
Jan 23 08:27:49 lists-2 sympa_msg[1324586]: info Sympa::Spindle::DoForward::_twist() Processing Sympa::Message <[email protected]/shelved:arc_cv=pass>; [email protected]; [email protected]

compared to:

Jan 23 08:18:36 lists-2 sympa_msg[1280929]: debug2 Sympa::Message::check_smime_signature(Sympa::Message <[email protected]/shelved:arc_cv=pass>)
Jan 23 08:18:36 lists-2 sympa_msg[1280929]: debug2 Sympa::Message::smime_decrypt(Sympa::Message <[email protected]/shelved:arc_cv=pass>)
Jan 23 08:18:36 lists-2 sympa_msg[1280929]: err main::#246 > Sympa::Spindle::spin#83 > Sympa::Spindle::ProcessIncoming::_twist#246 List test-dpc22-request does not exist

so it looks like the messages are just not being directed to Sympa::Spindle::DoForward::_twist() at all.

It gets as far as Sympa::Message::smime_decrypt() but doesn't reach Sympa::Message::check_virus_infection()

@dpc22
Copy link
Contributor Author

dpc22 commented Jan 23, 2025

[email protected] is also broken in 6.2.74. (However people are still receiving moderation information generated internally within Sympa)

@dpc22
Copy link
Contributor Author

dpc22 commented Jan 23, 2025

The problem is something to do with /usr/share/sympa/lib/Sympa/Spool.pm : split_listname():

    my $return_path_suffix =
        Conf::get_robot_conf($robot_id, 'return_path_suffix');
    my $regexp = join(
        '|',
        map { quotemeta $_ }
            grep { $_ and length $_ }
            split(
            /[\s,]+/, Conf::get_robot_conf($robot_id, 'list_check_suffixes')
            )
    );

"$return_path_suffix" is a string. "$regexp" is an array, and that obviously isn't going to work as a regexp.

@dpc22
Copy link
Contributor Author

dpc22 commented Jan 23, 2025

    my $out = Dumper(Conf::get_robot_conf($robot_id, 'list_check_suffixes'));
    $log->syslog('info', "HELLO: $out");
    $log->syslog('info', "HELLO: $regexp");

reports that Conf::get_robot_conf($robot_id, 'list_check_suffixes') is:

Jan 23 09:12:55 lists-2 task_manager[1354207]: info Sympa::Spool::split_listname() HELLO: $VAR1 = [#012          'request',#012          'owner',#012          'editor',#012          'unsubscribe',#012          'subscribe'#012        ];

and that gets turned into:

Jan 23 09:12:55 lists-2 task_manager[1354207]: info Sympa::Spool::split_listname() HELLO: ARRAY\(0x55ab3324d2d0\)

@dpc22
Copy link
Contributor Author

dpc22 commented Jan 23, 2025

sympa-6.2.74/src/lib/Conf.pm has

    # Accepted list suffixes.
    $param->{'config_hash'}{'list_check_suffixes'} = [
        grep {length} split /[,\s]+/,
        ($param->{'config_hash'}{'list_check_suffixes'} // '')
    ];

If I remove that clause, my debug syslog clause in Spool.pm : split_listname() reports a more sensible value for "$regexp":

Jan 23 09:26:03 lists-2 sympa_msg[1361810]: info Sympa::Spool::split_listname() HELLO: $VAR1 = 'request,owner,editor,unsubscribe,subscribe,managers,moderators,bounces';
Jan 23 09:26:03 lists-2 sympa_msg[1361810]: info Sympa::Spool::split_listname() HELLO: request|owner|editor|unsubscribe|subscribe|managers|moderators|bounces

However all of the Sympa processes immediately throw SIGTERM, so there was obviously some reason for this change.

@dpc22
Copy link
Contributor Author

dpc22 commented Jan 23, 2025

The obvious workaround is to manually set $regexp in/usr/share/sympa/lib/Sympa/Spool.pm : split_listname(), replacing the broken value. I can confirm that works on a test system.

--- /usr/share/sympa/lib/Sympa/Spool.pm-	2024-09-22 10:29:44.000000000 +0100
+++ /usr/share/sympa/lib/Sympa/Spool.pm	2025-01-23 10:17:45.572739827 +0000
@@ -340,6 +340,7 @@
             /[\s,]+/, Conf::get_robot_conf($robot_id, 'list_check_suffixes')
             )
     );
+    $regexp = 'request|owner|editor|unsubscribe|subscribe';

     if (    $mailbox eq 'sympa'
         and $robot_id eq $Conf::Conf{'domain'}) {    # compat.

@dpc22
Copy link
Contributor Author

dpc22 commented Jan 23, 2025

The attached also seems to work, and I suspect is a more "correct" solution.

my $sfxs = Conf::get_robot_conf($robot_id, 'list_check_suffixes') // [];
my $regexp = join('|', map { quotemeta $_ } @$sfxs);

$sfxs was stolen from /usr/share/sympa/lib/Sympa/Aliases.pm

sympa_spool.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant