Commit 057efe4e authored by david.verdin's avatar david.verdin
Browse files

[svn] Retrieving latest bug fixes from the Sympa 6.0 branch.


git-svn-id: https://subversion.renater.fr/sympa/trunk@6224 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 1a918182
------------------------------------------------------------------------
r6208 | david.verdin | 2009-09-14 17:42:00 +0200 (lun 14 sep 2009) | 3 lignes
Chemins modifiés :
M /branches/sympa-6.0-branch/src/lib/confdef.pm
[bug][#6425][Reported by S. Rijnhart, milieudefensie.nl] The spool directories not often used were automatically deleted because CleanSpool was sometimes called on the spool root directory instead of one the actual spools.This was due to the automatic spool being initialized as the spool root directory. Therefore, the sympa.pl automatic cleaning was called on the root directory and all its too old subdirectories were deleted.
Fixed by giving its right value to this spool (and to the digest spool too, by the way).
------------------------------------------------------------------------
r6207 | david.verdin | 2009-09-14 17:27:13 +0200 (lun 14 sep 2009) | 2 lignes
Chemins modifiés :
M /branches/sympa-6.0-branch/soap/sympasoap.pm
[bug][#6400][Submitted by A. Bendzsak] There was a typo in sympasoap.pm making it use authorization.tt2 instead of authorization_reject.tt2.
------------------------------------------------------------------------
r6202 | david.verdin | 2009-09-14 16:39:36 +0200 (lun 14 sep 2009) | 2 lignes
Chemins modifiés :
M /branches/sympa-6.0-branch/NEWS
M /branches/sympa-6.0-branch/configure.ac
[svn] Preparing version 6.0b.3
------------------------------------------------------------------------
r6201 | david.verdin | 2009-09-14 16:00:52 +0200 (lun 14 sep 2009) | 2 lignes
Chemins modifiés :
M /branches/sympa-6.0-branch/ChangeLog
M /branches/sympa-6.0-branch/configure.ac
[-svn] Preparing version 6.0 stable.
------------------------------------------------------------------------
r6200 | david.verdin | 2009-09-14 11:54:30 +0200 (lun 14 sep 2009) | 2 lignes
Chemins modifiés :
......@@ -104,6 +104,16 @@
- Remove modification of $datadir. Replaced by defaultdir redefinition.
- gives explicit ownership of pid dir to Sympa by adding the "sympa" subdirectory.
soap/sympasoap.pm: [#6400][Submitted by A. Bendzsak] There was a typo in sympasoap.pm making
it use authorization.tt2 instead of authorization_reject.tt2.
src/lib/confdef.pm: [#6425][Reported by S. Rijnhart, milieudefensie.nl] The spool directories
not often used were automatically deleted because CleanSpool was sometimes called on the spool
root directory instead of one the actual spools.This was due to the automatic spool being
initialized as the spool root directory. Therefore, the sympa.pl automatic cleaning was called
on the root directory and all its too old subdirectories were deleted.
Fixed by giving its right value to this spool (and to the digest spool too, by the way).
6.0b.2 31 July 2009
......
This diff is collapsed.
......@@ -54,6 +54,7 @@ MSGFMT_yes = @MSGFMT_015@
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
XGETTEXT = ./xgettext.pl
MSGMERGE = msgmerge
MSGCAT = msgcat
MSGMERGE_UPDATE = @MSGMERGE@ --update
MSGINIT = msginit
MSGCONV = msgconv
......@@ -76,7 +77,7 @@ CATALOGS = @CATALOGS@
# Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES:
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update .po-clean
.po.mo:
@echo "$(MSGFMT) -c -o $@ $<"; \
......@@ -345,6 +346,11 @@ update-po: Makefile
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
$(MAKE) update-gmo
clean-po: Makefile
$(MAKE) $(DOMAIN).pot-update
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
$(MAKE) update-gmo
# General rule for creating PO files.
.nop.po-create:
......@@ -355,6 +361,25 @@ update-po: Makefile
# General rule for updating PO files.
.nop.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
$(MSGCAT) --use-first -o $$tmpdir/$$lang.new.po $$tmpdir/$$lang.new.po $$lang.po; \
fi; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
.nop.po-clean:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \
......
This diff is collapsed.
......@@ -1402,7 +1402,7 @@ sub get_reason_string {
my $string;
my $tt2_include_path = &tools::make_tt2_include_path($robot,'mail_tt2','','');
unless (&tt2::parse_tt2($data,'authorization.tt2' ,\$string, $tt2_include_path)) {
unless (&tt2::parse_tt2($data,'authorization_reject.tt2' ,\$string, $tt2_include_path)) {
my $error = &tt2::get_error();
&List::send_notify_to_listmaster('web_tt2_error', $robot, [$error]);
&do_log('info', "get_reason_string : error parsing");
......
......@@ -177,5 +177,5 @@ list_aliases.tt2: Makefile list_aliases.tt2.in
install-data-hook:
cd $(DESTDIR)$(defaultdir)/scenari; \
for file in $(DEFAULT_SCENARIOS); do \
$(LN_S) -f $$file `echo $$file | $(SED) -e 's/\.[^.]\+$$/.default/'`; \
$(LN_S) -f $$file `echo $$file | $(SED) -e 's/\.[^.]*$$/.default/'`; \
done
<dl><dt>[%|loc%]Public discussion mailing list[%END%]</dt><dd>
[%|loc%]Public discussion mailing list[%END%]
<ul><li>[%|loc%]public archives[%END%]</li>
<li>[%|loc%]only subscribers can post[%END%]</li>
</ul></dd></dl>
<dl><dt>[%|loc%]Hotline mailing list[%END%]</dt><dd>
[%|loc%]Hotline mailing list[%END%]
<ul>
<li>[%|loc%]everyone can post[%END%]</li>
<li>[%|loc%]private archives[%END%]</li>
......
<dl><dt>[%|loc%]Mailing list configuration to be used for a news letter providing both text plain and HTML formats[%END%]</dt><dd>
[%|loc%]Mailing list configuration to be used for a news letter providing both text plain and HTML formats[%END%]
<ul>
<li>[%|loc%]public and moderated list[%END%]</li>
<li>[%|loc%]subscribers emails are protected[%END%]</li>
......
<dl><dt>[%|loc%]Mailing list configuration to be used for a news letter[%END%]</dt><dd>
[%|loc%]Mailing list configuration to be used for a news letter[%END%]
<ul>
<li>[%|loc%]public and moderated list[%END%]</li>
<li>[%|loc%]subscribers emails are protected[%END%]</li>
......
<dl><dt>[%|loc%]Private working group setup[%END%]</dt><dd>
[%|loc%]Private working group setup[%END%]
<ul>
<li>[%|loc%]only subscribers can post[%END%]</li>
<li>[%|loc%]private archives[%END%]</li>
......
<dl><dt>[%|loc%]Web forum ML[%END%]</dt><dd>
[%|loc%]Web forum ML[%END%]
[%|loc%]Messages can either be read via email (subscription) or
via the web (web archives)[%END%]
</dd></dl>
......@@ -392,9 +392,10 @@ sub store {
my $priority_packet = $data{'priority_packet'};
my $delivery_date = $data{'delivery_date'};
my $verp = $data{'verp'};
$verp=0 unless($verp);
my $merge = $data{'merge'};
my $dkim = $data{'dkim'};
&do_log('debug', 'Bulk::store(<msg>,<rcpts>,from = %s,robot = %s,listname= %s,priority_message = %s, priority_packet = %s,delivery_date= %s,verp = %s, merge = %s, dkim: d= %s i=%s)',$from,$robot,$listname,$priority_message,$priority_packet,$delivery_date,$verp,$merge,$dkim->{'d'},$dkim->{'i'});
$dbh = &List::db_get_handler();
......@@ -449,7 +450,7 @@ sub store {
}
}
my $current_date = time;
my $current_date = int(time);
# second : create each receipient packet in bulkmailer_table
my $type = ref $rcpts;
......@@ -464,7 +465,7 @@ sub store {
my $priority_for_packet;
my $packet_rank = 0; # Initialize counter used to check wether we are copying the last packet.
foreach my $packet (@{$rcpts}) {
if($packet_rank == $#{$rcpts} && !$verp){
if($packet_rank == $#{$rcpts}){
$priority_for_packet = $priority_packet+1;
}else{
$priority_for_packet = $priority_packet;
......
......@@ -3324,14 +3324,35 @@ sub send_msg {
}
#save the message before modifying it
my $saved_msg = $message->{'msg'}->dup;
my $nbr_smtp;
my $nbr_verp;
my $smtp_count = {
'nbr_smtp' => 0,
'nbr_verp' => 0,
};
my $tags_to_use = {
'tag_first_noverp' => 1,
'tag_last_noverp' => 1,
'tag_first_verp' => 1,
'tag_last_verp' => 1,
};
# prepare verp parameter
my $verp_rate = $self->{'admin'}{'verp_rate'};
my $xsequence = $self->{'stats'}->[0] ;
# Define messages can be tagged as first or last according to the verp rate.
if($verp_rate eq '100%'){
$tags_to_use->{'tag_first_noverp'} = 0;
$tags_to_use->{'tag_last_noverp'} = 0;
}
elsif($verp_rate eq '0%'){
$tags_to_use->{'tag_first_verp'} = 0;
$tags_to_use->{'tag_last_verp'} = 0;
}
else{
$tags_to_use->{'tag_first_verp'} = 0;
$tags_to_use->{'tag_last_noverp'} = 0;
}
my $dkim_parameters ;
# prepare dkim parameters
if ($apply_dkim_signature eq 'on') {
......@@ -3538,36 +3559,45 @@ sub send_msg {
$url_msg = $new_msg;
}
my $new_message = new Message($url_msg);
return undef unless(&send_message_to_option(
{
'message' => $new_message,
'verp_rate' => $verp_rate,
'xsequence' => $xsequence,
'tabrcpt' => \@tabrcpt_url,
'tabrcpt_verp' => \@tabrcpt_url_verp,
'tags_to_use' => $tags_to_use,
'smtp_count' => $smtp_count,
}
)
);
}
return $smtp_count{'nbr_smtp'};
}
my @verp_tabrcpt_url = &extract_verp_rcpt($verp_rate, $xsequence,\@tabrcpt_url, \@tabrcpt_url_verp);
my $result = &mail::mail_message('message'=>$new_message,
'rcpt'=>\@tabrcpt_url,
'list'=>$self ,
'verp' => 'off',
'dkim_parameters'=>$dkim_parameters);
unless (defined $result) {
&do_log('err',"List::send_msg, could not send message to distribute from $from (verp desabled)");
return undef;
}
$nbr_smtp += $result;
$result = &mail::mail_message('message'=>$new_message,
'rcpt'=>\@verp_tabrcpt_url,
'list'=>$self ,
'verp' => 'on',
'dkim_parameters'=>$dkim_parameters);
unless (defined $result) {
&do_log('err',"List::send_msg, could not send message to distribute from $from (verp enabled)");
return undef;
}
$nbr_smtp += $result;
$nbr_verp += $result;
# Factorizing the calls necessary to send a message to a said reception mode users group.
# Return undef if it fails or 1 if it works.
sub send_message_to_option{
my $param = shift;
my @verp_tabrcpt = &extract_verp_rcpt($param->{'verp_rate'}, $param->{'xsequence'},$param->{'tabrcpt'},$param->{'tabrcpt_verp'}) ;
my $result = &mail::mail_message($param->{'message'}, $self , {'enable' => 'off'}, $param->{'tabrcpt'});
unless (defined $result) {
&do_log('err',"List::send_msg, could not send message to distribute from $from (verp desabled)");
return undef;
}
return $nbr_smtp;
$param->{'smtp_count'}->{'nbr_smtp'} += $result;
$result = &mail::mail_message($param->{'message'}, $self , {'enable' => 'on'}, @verp_tabrcpt);
unless (defined $result) {
&do_log('err',"List::send_msg, could not send message to distribute from $from (verp enabled)");
return undef;
}
$param->{'smtp_count'}->{'nbr_smtp'} += $result;
$param->{'smtp_count'}->{'nbr_verp'} += $result;
return 1;
}
######################### SERVICE MESSAGES ##########################################
......
......@@ -851,6 +851,9 @@ sub verify {
}
my $regexp = $1;
# Nothing can match an empty regexp.
return -1 * $negation if ($regexp =~ /^$/);
if ($regexp =~ /\[host\]/) {
my $reghost = &Conf::get_robot_conf($robot, 'host');
$reghost =~ s/\./\\./g ;
......
......@@ -143,13 +143,13 @@ our @params = (
},
{
name => 'queueautomatic',
default => Sympa::Constants::SPOOLDIR . '/',
default => Sympa::Constants::SPOOLDIR . '/automatic',
query => 'Automatic list creation spool',
file => 'sympa.conf'
},
{
name => 'queuedigest',
default => Sympa::Constants::SPOOLDIR . '/moderation',
default => Sympa::Constants::SPOOLDIR . '/digest',
query => '',
file => 'sympa.conf'
},
......
......@@ -1480,7 +1480,7 @@ sub DoFile {
## Too many reports sent => message skipped !!
if ($loop_info{$sender}{'count'} >= &Conf::get_robot_conf($robot, 'loop_command_max')) {
&do_log('notice', 'Ignoring message which would cause a loop, %d messages sent to %s', $loop_info{$sender}{'count'}, $sender);
&do_log('notice', 'Ignoring message which would cause a loop, %d messages received from %s', $loop_info{$sender}{'count'}, $sender);
return undef;
}
......
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment