From 1e001e7f35850f57be0fd213d6a0233aeeef92f4 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Thu, 22 Feb 2024 17:40:44 -0700 Subject: [PATCH] Add config option in rslight.inc.php to separate email_tail from message-id generation. --- Rocksolid_Light/rocksolid/lib/post.inc.php | 6 +++--- Rocksolid_Light/rslight/example.inc.php | 1 + Rocksolid_Light/rslight/rslight.inc.php | 5 +++-- Rocksolid_Light/rslight/scripts/setuphelper.php | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Rocksolid_Light/rocksolid/lib/post.inc.php b/Rocksolid_Light/rocksolid/lib/post.inc.php index ab86785..2426ef1 100644 --- a/Rocksolid_Light/rocksolid/lib/post.inc.php +++ b/Rocksolid_Light/rocksolid/lib/post.inc.php @@ -342,10 +342,10 @@ function generate_msgid($identity) return false; break; case "md5": - if ($CONFIG['email_tail'][0] !== '@') { - $mymsgid = '@' . $CONFIG['email_tail']; + if ($CONFIG['server_path'][0] !== '@') { + $mymsgid = '@' . $CONFIG['server_path']; } else { - $mymsgid = $CONFIG['email_tail']; + $mymsgid = $CONFIG['server_path']; } return '<' . md5($identity) . $mymsgid . '>'; break; diff --git a/Rocksolid_Light/rslight/example.inc.php b/Rocksolid_Light/rslight/example.inc.php index 9a12183..72799ec 100644 --- a/Rocksolid_Light/rslight/example.inc.php +++ b/Rocksolid_Light/rslight/example.inc.php @@ -22,6 +22,7 @@ return [ 'rslight_title' => $CONFIG['rslight_title'], 'title_full' => $CONFIG['title_full'], 'hide_email' => $CONFIG['hide_email'], + 'server_path' => $CONFIG['server_path'], 'email_tail' => $CONFIG['email_tail'], 'readonly' => $CONFIG['readonly'], 'anonuser' => $CONFIG['anonuser'], diff --git a/Rocksolid_Light/rslight/rslight.inc.php b/Rocksolid_Light/rslight/rslight.inc.php index 499d6b9..3f7a125 100644 --- a/Rocksolid_Light/rslight/rslight.inc.php +++ b/Rocksolid_Light/rslight/rslight.inc.php @@ -17,8 +17,9 @@ return [ 'site_shortname' => '', 'rslight_title' => 'New Rocksolid Light Install', 'title_full' => 'rslight', - 'hide_email' => '1', - 'email_tail' => '@example.com', + 'hide_email' => '', + 'server_path' => '@example.com', + 'email_tail' => '@invalid.invalid', 'anonusername' => 'anonymous', 'anonuserpass' => '', 'timezone' => '0', diff --git a/Rocksolid_Light/rslight/scripts/setuphelper.php b/Rocksolid_Light/rslight/scripts/setuphelper.php index 717bb55..b0184e3 100644 --- a/Rocksolid_Light/rslight/scripts/setuphelper.php +++ b/Rocksolid_Light/rslight/scripts/setuphelper.php @@ -27,6 +27,7 @@ return [ 'rslight_title' => 'The tagline at the top of the web page', 'title_full' => 'The site title in the client browser bar', 'hide_email' => 'Truncate email addresses in From header (1=true, blank=false)', +'server_path' => 'What to add to as the domain for Message-ID header (include @)', 'email_tail' => 'What to add to a username if not in the form of an email address (include @)', 'anonusername' => 'The username to use for anonymous posting (auto-created)', 'anonuserpass' => 'The password for the anonymous username',