Great Circle Associates Majordomo-Workers
(February 1997)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: subject_prefix without subjects...
From: Jason L Tibbitts III <tibbs @ hpc . uh . edu>
Date: 02 Feb 1997 16:15:41 -0600
To: majordomo-workers @ greatcircle . com, "Edward S. Marshall" <emarshal @ common . net>
In-reply-to: "Edward S. Marshall"'s message of Sun, 2 Feb 1997 15:36:18 -0600 (CST)
References: <Pine.LNX.3.93.970202153316.26784F-100000@prime.common.net>

>>>>> "ESM" == Edward S Marshall <emarshal@common.net> writes:

ESM> I've noticed that with 1.94.1, if a message is sent to a list with a
ESM> subject_prefix defined (i.e. "[$LIST]: " or some such), if no subject
ESM> line is provided by the sender, this rule doesn't take effect, i.e. no
ESM> subject line is manufactured for the message.

Yep.

ESM> Is this intended behavior?

I'm of the opinion that Majordomo shouldn't be adding a subject if one
isn't already there, but that isn't the gospel.

ESM> The reason I ask is that it would be useful to be able to have it
ESM> manufacture a subject such as "[$LIST]: <no subject>" or some such, so
ESM> that users who process their mail upon receipt by subject can do so
ESM> reliably.

Users shouldn't be processing their mail based upon its subject.  That just
isn't a very robust way of doing it.

In any case, try this (mostly untested) over 1.94.1:

--- resend.orig	Sun Feb  2 16:02:33 1997
+++ resend	Sun Feb  2 16:14:23 1997
@@ -722,6 +722,10 @@
 
 	# prepend subject prefix
 	#
+	if (/^subject:/i) {
+	    $seen_subject = 1;
+	}
+
 	if ( (/^subject:\s*/i) 
 	    && ($config_opts{$opt_l,"subject_prefix"} ne '')) {
 
@@ -766,6 +770,11 @@
 
     print STDERR "$0: parse_header: adding header fields\n"
 	    if $DEBUG;
+
+    if (!$seen_subject && ($config_opts{$opt_l,"subject_prefix"} ne '')) {
+        local($foo) = &config'substitute_values($config_opts{$opt_l,"subject_prefix"}, $opt_l);#';
+        print OUT "Subject: $foo (none)\n";
+    }
 
     # add new header fields
     print OUT "Sender: $sender\n";


 - J<


Follow-Ups:
References:
Indexed By Date Previous: Re: User unknown shouldn't be getting through
From: Brock Rozen <brozen@webdreams.com>
Next: Re: User unknown shouldn't be getting through
From: Jason L Tibbitts III <tibbs@hpc.uh.edu>
Indexed By Thread Previous: subject_prefix without subjects...
From: "Edward S. Marshall" <emarshal@common.net>
Next: Re: subject_prefix without subjects...
From: Leo Bicknell <bicknell@ufp.org>

Google
 
Search Internet Search www.greatcircle.com