https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8188
Bug ID: 8188
Summary: dns_block_rule does not accept underscore in domain
Product: Spamassassin
Version: 4.0.0
Hardware: PC
OS: Linux
Status: NEW
Severity: minor
Priority: P2
Component: Libraries
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: Undefined
Configuration validation (lint) fails if the domain name contains underscore
character in dns_block_rule setting - for example:
dns_block_rule PROVIDER_BLOCKED _myuniquekey.service.provider.com
This patch adds underscore to the list of allowed characters:
--- /usr/share/perl5/Mail/SpamAssassin/Conf.pm.old 2023-09-24
12:17:56.804596750 +0200
+++ /usr/share/perl5/Mail/SpamAssassin/Conf.pm 2023-09-24 12:18:06.140635207
+0200
@@ -2077,7 +2077,7 @@
my $rule = $1;
foreach my $domain (split(/\s+/, lc($2))) {
$domain =~ s/^\.//; $domain =~ s/\.\z//; # strip dots
- if ($domain !~ /^[a-z0-9.-]+$/) {
+ if ($domain !~ /^[a-z0-9.-_]+$/) {
return $INVALID_VALUE;
}
# will end up in filename, do not allow / etc in above regex!
(Underscore should be an acceptable character in filename on every relevant
operating system I know of.)
--
You are receiving this mail because:
You are the assignee for the bug.