Fossil SCM

Add a note to the email-listid setting help text and editor entry that this value is required for unsubscribe links to work. In /secaudit0, emit a warning if notifications are enabled but email-listid is empty. This is in response to [forum post 1245b69c](forum:1245b69cfa09c26e).

stephan 2025-11-03 20:39 trunk
Commit 015101838341ce1f50b9d4a785312085ee5db5cf3f2d687925ee8b03a46a147a
+4 -1
--- src/alerts.c
+++ src/alerts.c
@@ -363,11 +363,12 @@
363363
364364
entry_attribute("List-ID", 40, "email-listid",
365365
"elistid", "", 0);
366366
@ <p>
367367
@ If this is not an empty string, then it becomes the argument to
368
- @ a "List-ID:" header on all out-bound notification emails.
368
+ @ a "List-ID:" header on all out-bound notification emails. A list ID
369
+ @ is required for the generation of unsubscribe links in notifications.
369370
@ (Property: "email-listid")</p>
370371
@ <hr>
371372
372373
entry_attribute("Repository Nickname", 16, "email-subname",
373374
"enn", "", 0);
@@ -1144,10 +1145,12 @@
11441145
*/
11451146
/*
11461147
** SETTING: email-listid width=40
11471148
** If this setting is not an empty string, then it becomes the argument to
11481149
** a "List-ID:" header that is added to all out-bound notification emails.
1150
+** A list ID is required for the generation of unsubscribe links in
1151
+** notifications.
11491152
*/
11501153
/*
11511154
** SETTING: email-send-relayhost width=40 sensitive default=127.0.0.1
11521155
** This is the hostname and TCP port to which output email messages
11531156
** are sent when email-send-method is "relay". There should be an
11541157
--- src/alerts.c
+++ src/alerts.c
@@ -363,11 +363,12 @@
363
364 entry_attribute("List-ID", 40, "email-listid",
365 "elistid", "", 0);
366 @ <p>
367 @ If this is not an empty string, then it becomes the argument to
368 @ a "List-ID:" header on all out-bound notification emails.
 
369 @ (Property: "email-listid")</p>
370 @ <hr>
371
372 entry_attribute("Repository Nickname", 16, "email-subname",
373 "enn", "", 0);
@@ -1144,10 +1145,12 @@
1144 */
1145 /*
1146 ** SETTING: email-listid width=40
1147 ** If this setting is not an empty string, then it becomes the argument to
1148 ** a "List-ID:" header that is added to all out-bound notification emails.
 
 
1149 */
1150 /*
1151 ** SETTING: email-send-relayhost width=40 sensitive default=127.0.0.1
1152 ** This is the hostname and TCP port to which output email messages
1153 ** are sent when email-send-method is "relay". There should be an
1154
--- src/alerts.c
+++ src/alerts.c
@@ -363,11 +363,12 @@
363
364 entry_attribute("List-ID", 40, "email-listid",
365 "elistid", "", 0);
366 @ <p>
367 @ If this is not an empty string, then it becomes the argument to
368 @ a "List-ID:" header on all out-bound notification emails. A list ID
369 @ is required for the generation of unsubscribe links in notifications.
370 @ (Property: "email-listid")</p>
371 @ <hr>
372
373 entry_attribute("Repository Nickname", 16, "email-subname",
374 "enn", "", 0);
@@ -1144,10 +1145,12 @@
1145 */
1146 /*
1147 ** SETTING: email-listid width=40
1148 ** If this setting is not an empty string, then it becomes the argument to
1149 ** a "List-ID:" header that is added to all out-bound notification emails.
1150 ** A list ID is required for the generation of unsubscribe links in
1151 ** notifications.
1152 */
1153 /*
1154 ** SETTING: email-send-relayhost width=40 sensitive default=127.0.0.1
1155 ** This is the hostname and TCP port to which output email messages
1156 ** are sent when email-send-method is "relay". There should be an
1157
--- src/security_audit.c
+++ src/security_audit.c
@@ -677,11 +677,17 @@
677677
@ </ol>
678678
}
679679
fossil_free(azCSP);
680680
681681
if( alert_enabled() ){
682
+ char * zListId = db_get("email-listid", 0);
682683
@ <li><p> Email alert configuration summary:
684
+ if( !zListId || !zListId[0] ){
685
+ @ <br><strong>WARNING:</strong> <code>email-listid</code> is not set,
686
+ @ so notifications will not include unsubscribe links.
687
+ }
688
+ fossil_free(zListId);
683689
@ <table class="label-value">
684690
stats_for_email();
685691
@ </table>
686692
}else{
687693
@ <li><p> Email alerts are disabled
688694
--- src/security_audit.c
+++ src/security_audit.c
@@ -677,11 +677,17 @@
677 @ </ol>
678 }
679 fossil_free(azCSP);
680
681 if( alert_enabled() ){
 
682 @ <li><p> Email alert configuration summary:
 
 
 
 
 
683 @ <table class="label-value">
684 stats_for_email();
685 @ </table>
686 }else{
687 @ <li><p> Email alerts are disabled
688
--- src/security_audit.c
+++ src/security_audit.c
@@ -677,11 +677,17 @@
677 @ </ol>
678 }
679 fossil_free(azCSP);
680
681 if( alert_enabled() ){
682 char * zListId = db_get("email-listid", 0);
683 @ <li><p> Email alert configuration summary:
684 if( !zListId || !zListId[0] ){
685 @ <br><strong>WARNING:</strong> <code>email-listid</code> is not set,
686 @ so notifications will not include unsubscribe links.
687 }
688 fossil_free(zListId);
689 @ <table class="label-value">
690 stats_for_email();
691 @ </table>
692 }else{
693 @ <li><p> Email alerts are disabled
694

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button