Skip to Content.
Sympa Menu

en - Re: [sympa-users] Why Sympa sends a list summary to my list eachday?

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Olivier Salaün <address@concealed>
  • To: En azaz Csigas <address@concealed>
  • Cc: address@concealed, address@concealed
  • Subject: Re: [sympa-users] Why Sympa sends a list summary to my list eachday?
  • Date: Mon, 05 Nov 2001 23:36:51 +0100

En azaz Csigas wrote :

> > Each day, I get a list summary (the one with references to the archive)
> > sent to the list, by itself.

This bug (concerning 3.2.1) was reported by S. Tardieu and we have fixed it
in the CVS version :
the same subroutine processes the digest and summary, but no check was
done about the number od recipients ; thereby making Sympa try to send
a summary to 0 subscribers. This system call to the MTA was made with no
parameter.
Sendmail will warn 'Recipient names must be specified' ; it looks like other
MTAs like Postfix
will use the message's 'To:' header field (ie the list address) as a
recipient.

Here is a patch below, that you will probably need to apply manually (based on
CVS version).
Index: src/List.pm
===================================================================
RCS file: /home/sympa/cvsroot/sympa/src/List.pm,v
retrieving revision 1.184
retrieving revision 1.185
diff -c -r1.184 -r1.185
*** src/List.pm 2001/10/31 08:50:53 1.184
--- src/List.pm 2001/10/31 09:48:01 1.185
***************
*** 2045,2103 ****
push @topics, sprintf ' ' x (2 - length($i)) . "%d. %s", $i+1,
$subject;
}

! my $msg = MIME::Entity->build (To => $param->{'to'},
! From => $param->{'from'},
! 'Reply-to' => $param->{'reply'},
! Type => 'multipart/mixed',
! Subject =>
MIME::Words::encode_mimewords(sprintf(Msg(8, 9, "Digest of list
%s"),$listname))
! );
!
! my $charset = sprintf Msg(12, 2, 'us-ascii');
! my $table_of_content = MIME::Entity->build (Type => "text/plain;
charset=$charset",
! Description => sprintf(Msg(8,
13, 'Table of content')),
! Data => \@topics
! );
!
! $msg->add_part($table_of_content);
!
! my $digest = MIME::Entity->build (Type => 'multipart/digest',
! Boundary => '__--__--'
! );
! ## Digest messages
! foreach $mail (@list_of_mail) {
! $mail->tidy_body;
! $mail->remove_sig;

! $digest->attach(Type => 'message/rfc822',
Disposition => 'inline',
! Data => $mail->as_string
);
}
-
- my @now = localtime(time);
- my $footer = sprintf Msg(8, 14, "End of %s Digest"), $listname;
- $footer .= sprintf " - %s\n", POSIX::strftime("%a %b %e %H:%M:%S %Y",
@now);
-
- $digest->attach(Type => 'text/plain',
- Disposition => 'inline',
- Data => $footer
- );
- $msg->add_part($digest);

! ## Add a footer
! my $new_msg = _add_parts($msg, $param->{'name'},
$self->{'admin'}{'footer_type'});
! if (defined $new_msg) {
! $msg = $new_msg;
}
!
! ## Send digest
! &smtp::mailto($msg, $param->{'return_path'}, 'none', '_ALTERED_',
@tabrcpt );
!
! ## Prepare parameters for parsing
! $param->{'subject'} = sprintf Msg(8, 31, 'Summary of list %s'),
$self->{'name'};
!
! $self->send_file('summary', \@tabrcptsummary, $robot, $param);
!
}

## Send a global (not relative to a list) file to a user
--- 2045,2108 ----
push @topics, sprintf ' ' x (2 - length($i)) . "%d. %s", $i+1,
$subject;
}

! ## Prepare Digest
! if (@tabrcpt) {
! my $msg = MIME::Entity->build (To => $param->{'to'},
! From => $param->{'from'},
! 'Reply-to' => $param->{'reply'},
! Type => 'multipart/mixed',
! Subject =>
MIME::Words::encode_mimewords(sprintf(Msg(8, 9, "Digest of list
%s"),$listname))
! );

! my $charset = sprintf Msg(12, 2, 'us-ascii');
! my $table_of_content = MIME::Entity->build (Type =>
"text/plain; charset=$charset",
! Description =>
sprintf(Msg(8, 13, 'Table of content')),
! Data => \@topics
! );
!
! $msg->add_part($table_of_content);
!
! my $digest = MIME::Entity->build (Type => 'multipart/digest',
! Boundary => '__--__--'
! );
! ## Digest messages
! foreach $mail (@list_of_mail) {
! $mail->tidy_body;
! $mail->remove_sig;
!
! $digest->attach(Type => 'message/rfc822',
! Disposition => 'inline',
! Data => $mail->as_string
! );
! }
!
! my @now = localtime(time);
! my $footer = sprintf Msg(8, 14, "End of %s Digest"), $listname;
! $footer .= sprintf " - %s\n", POSIX::strftime("%a %b %e %H:%M:%S %Y",
@now);
!
! $digest->attach(Type => 'text/plain',
Disposition => 'inline',
! Data => $footer
);
+ $msg->add_part($digest);
+
+ ## Add a footer
+ my $new_msg = _add_parts($msg, $param->{'name'},
$self->{'admin'}{'footer_type'});
+ if (defined $new_msg) {
+ $msg = $new_msg;
+ }
+
+ ## Send digest
+ &smtp::mailto($msg, $param->{'return_path'}, 'none', '_ALTERED_',
@tabrcpt );
}

! ## send summary
! if (@tabrcptsummary) {
! $param->{'subject'} = sprintf Msg(8, 31, 'Summary of list %s'),
$self->{'name'};
!
! $self->send_file('summary', \@tabrcptsummary, $robot, $param);
}
! return 1;
}

## Send a global (not relative to a list) file to a user
***************
*** 2164,2169 ****
--- 2169,2181 ----
my $sign_mode;

my $data = $context;
+
+ ## Any recepients
+ if ((ref ($who) && ($#{$who} < 0)) ||
+ (!ref ($who) && ($who eq ''))) {
+ &do_log('debug', 'No recipient for sending %s', $action);
+ return undef;
+ }

## Unless multiple recepients
unless (ref ($who)) {



Archive powered by MHonArc 2.6.19+.

Top of Page