Skip to Content.
Sympa Menu

en - List.pm changes for my problem

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: John Douglass <address@concealed>
  • To: sympa-users <address@concealed>
  • Subject: List.pm changes for my problem
  • Date: Wed, 09 Oct 2002 16:15:26 -0400

To solve my problems of customizing the headers for this freaky list, I changed "List.pm" so that if any headers exist, it doesn't add any that I already
added manually

Changed: Lines of List.pm starting at line 1887: Checks the headers in the event you meant to overwrite them in the configs. It appears to work...it's just adding a test to see if the header already exists, if so, then it skips adding it.

## Add RFC 2369 header fields
foreach my $field (@{$Conf{'rfc2369_header_fields'}}) {
+ if ($field eq 'help' && !$hdr->get('List-Help')) {
$hdr->add('List-Help', sprintf ('<mailto:%s@%s?subject=help>', &Conf::get_robot_conf($robot, 'email'), &Conf::get_robot_
conf($robot, 'host')));
+ }elsif ($field eq 'unsubscribe' && !$hdr->get('List-Unsubscribe')) {
$hdr->add('List-Unsubscribe', sprintf ('<mailto:%s@%s?subject=unsubscribe%%20%s>', &Conf::get_robot_conf($robot, 'email'
), &Conf::get_robot_conf($robot, 'host'), $self->{'name'}));
+ }elsif ($field eq 'subscribe' && !$hdr->get('List-Subscribe')) {
$hdr->add('List-Subscribe', sprintf ('<mailto:%s@%s?subject=subscribe%%20%s>', &Conf::get_robot_conf($robot, 'email'), &
Conf::get_robot_conf($robot, 'host'), $self->{'name'}));
+ }elsif ($field eq 'post' && !$hdr->get('List-Post')) {
$hdr->add('List-Post', sprintf ('<mailto:%s@%s>', $self->{'name'}, $self->{'admin'}{'host'}));
+ }elsif ($field eq 'owner' && !$hdr->get('List-Owner')) {
$hdr->add('List-Owner', sprintf ('<mailto:%s-request@%s>', $self->{'name'}, $self->{'admin'}{'host'}));
+ }elsif ($field eq 'archive' && !$hdr->get('List-Archive')) {
if (&Conf::get_robot_conf($robot, 'wwsympa_url') and $self->is_web_archived()) {
$hdr->add('List-Archive', sprintf ('<%s/arc/%s>', Conf::get_robot_conf($robot, 'wwsympa_url'), $self->{'name'}));
}
}



  • List.pm changes for my problem, John Douglass, 10/09/2002

Archive powered by MHonArc 2.6.19+.

Top of Page