[pmg-devel] [PATCH pmg-api 1/2] fix #5972: ruledb: default ruleset: use .example as TLD

Stoiko Ivanov s.ivanov at proxmox.com
Thu Jan 30 13:33:49 CET 2025


following RFC 2606
https://www.rfc-editor.org/rfc/rfc2606.html

reported in our community forum:
https://forum.proxmox.com/threads/.158455/

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 src/PMG/DBTools.pm   | 4 ++--
 src/tests/testdb.txt | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/PMG/DBTools.pm b/src/PMG/DBTools.pm
index 8770d06..1acc0cb 100644
--- a/src/PMG/DBTools.pm
+++ b/src/PMG/DBTools.pm
@@ -644,12 +644,12 @@ sub init_ruledb {
     # WHO Objects
 
      # Blacklist
-    my $obj =  PMG::RuleDB::EMail->new ('nomail at fromthisdomain.com');
+    my $obj =  PMG::RuleDB::EMail->new ('nomail at fromthisdomain.example');
     my $blacklist = $ruledb->create_group_with_obj(
 	$obj, 'Blacklist', 'Global blacklist');
 
     # Whitelist
-    $obj = PMG::RuleDB::EMail->new('mail at fromthisdomain.com');
+    $obj = PMG::RuleDB::EMail->new('mail at fromthisdomain.example');
     my $whitelist = $ruledb->create_group_with_obj($obj, 'Whitelist', 'Global whitelist');
 
     # WHEN Objects
diff --git a/src/tests/testdb.txt b/src/tests/testdb.txt
index 794aa15..2c4f062 100644
--- a/src/tests/testdb.txt
+++ b/src/tests/testdb.txt
@@ -1,6 +1,6 @@
 Found RULE 4: Blacklist
   FOUND FROM GROUP 1: Blacklist
-    OBJECT 1: nomail at fromthisdomain.com
+    OBJECT 1: nomail at fromthisdomain.example
   FOUND ACTION GROUP 17: Block
     OBJECT 30: block message
 Found RULE 2: Block Viruses
@@ -49,7 +49,7 @@ Found RULE 11: Block Multimedia Files
     OBJECT 27: remove matching attachments
 Found RULE 5: Whitelist
   FOUND FROM GROUP 2: Whitelist
-    OBJECT 2: mail at fromthisdomain.com
+    OBJECT 2: mail at fromthisdomain.example
   FOUND ACTION GROUP 16: Accept
     OBJECT 29: accept message
 Found RULE 8: Block Spam (Level 10)
-- 
2.39.5





More information about the pmg-devel mailing list