Skip to Content.
Sympa Menu

en - Re: [sympa-users] RE: Nested Subject "Re:"s in 3.4.2

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Tim Kuehn <address@concealed>
  • To: Jason Wehmhoener <address@concealed>, <address@concealed>
  • Subject: Re: [sympa-users] RE: Nested Subject "Re:"s in 3.4.2
  • Date: Tue, 29 Oct 2002 19:02:29 -0500

At 03:54 PM 2002-10-29 -0800, Jason Wehmhoener wrote:
Hi Tim and sympa-users,
I inquired about this very same thing a few days ago and never recieved a reply from anyone. So, now that you've made this request as well, I decided to take a crack at making a patch, but then quickly realized that I'm rusty on my regexp knowledge.

I'm not certain there's a need for regexp'ing anything - the offending block of code in list.pm follows:

## Add Custom Subject
if ($admin->{'custom_subject'}) {
my $subject_field = &MIME::Words::decode_mimewords($msg->head->get('Subject'));

my $tag_regexp = $admin->{'custom_subject'};

if (index($tag_regexp, $subject_field) <= 0)
{
$tag_regexp =~ s/\[\S+\]/\.\+/g;
$subject_field =~ s/^\s*(.*)\s*$/$1/;

## Search previous subject tagging in Subject

$subject_field =~ s/\[$tag_regexp\]//;

## Add subject tag
$msg->head->delete('Subject');
my @parsed_tag;
&parser::parse_tpl({'list' => {'name' => $self->{'name'},
'sequence' => $self->{'stats'}->[0]
}},
[$admin->{'custom_subject'}], \@parsed_tag);


$msg->head->add('Subject', '['.$parsed_tag[0].']'." ".$subject_field);
}

The "index()" function and block of code was my attempt to bypass changing the Subject line if the custom_subject was already there. It didn't work, so I'm kinda at a loss since perl's not something I work with at all.

Now I could be wrong in that this is *not* the place where the custom_subject is inserted, but I haven't seen anything else in the code base which fits better.

I'd certainly be interested in such a patch! Maybe someday I'll get around to doing it myself...

:)

Tim Kuehn




Archive powered by MHonArc 2.6.19+.

Top of Page