Commit a6a3ca24 authored by sikeda's avatar sikeda
Browse files

[svn] Retrieving recent modifications from sympa-6.1-branch.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@10215 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent 5811da54
......@@ -26,7 +26,8 @@ SUBDIRS = src wwsympa soap web_tt2 mail_tt2 doc po po-wwsympa
EXTRA_DIST = important_changes.pl \
sympa.spec.in \
sympa.spec \
README.charset
README.charset \
etc_README
CLEANFILES = previous_sympa_version
install-data-hook: installdir installconfig nextstep importantchanges
......@@ -77,6 +78,24 @@ installconfig: installdir
chown $(USER) data_structure.version || /bin/true; \
chgrp $(GROUP) data_structure.version || /bin/true; \
fi
@for dir in create_list_templates families \
global_task_models list_task_models scenari search_filters \
mail_tt2 web_tt2; do \
if [ ! -d $(DESTDIR)$(sysconfdir)/$$dir ] ; then \
echo "Creating $(DESTDIR)$(sysconfdir)/$$dir"; \
install -d -m 755 $(DESTDIR)$(sysconfdir)/$$dir; \
fi; \
chown $(USER) $(DESTDIR)$(sysconfdir)/$$dir || /bin/true; \
chgrp $(GROUP) $(DESTDIR)$(sysconfdir)/$$dir || /bin/true; \
done
@if [ ! -e $(DESTDIR)$(sysconfdir)/README ]; then \
echo "Creating $(DESTDIR)$(sysconfdir)/README"; \
$(SED) \
-e 's|--sysconfdir--|$(sysconfdir)|' \
-e 's|--defaultdir--|$(defaultdir)|' \
etc_README > $(DESTDIR)$(sysconfdir)/README; \
chmod 444 $(DESTDIR)$(sysconfdir)/README; \
fi
nextstep:
@echo ""
......
The default configuration files, templates, authorization scenarios and so
on are located in the --defaultdir--/ hierarchy and are overwritten when
upgrading Sympa.
You can customize or extend the default configuration in the
--sysconfdir--/ hierarchy. Customization for a virtual host are located in
the --sysconfdir--/my_virtual_robot/ hierarchy.
ar
br
bg
ca
cs
de
el
......
......@@ -4602,6 +4602,17 @@ msgstr ""
"l'enllaç de la pàgina principal <a href=\"%1/sendpasswd\">Primer inici de "
"sessió?</a>. Rebreu una contrasenya nova en el correu electrònic."
#. (path_cgi)
#: web_tt2/help_faquser.tt2:15
msgid ""
"<strong>You have no password</strong>. To be given a password, follow the <a "
"href=\"%1/firstpasswd\">First login?</a> link from the homepage. You will "
"receive your new password by email."
msgstr ""
"<strong>No teniu contrasenya</strong>. Per aconseguir la contrasenya, seguiu "
"l'enllaç de la pàgina principal <a href=\"%1/firstpasswd\">Primer inici de "
"sessió?</a>. Rebreu una contrasenya nova en el correu electrònic."
#. (path_cgi)
#: web_tt2/help_faquser.tt2:16
msgid ""
......
......@@ -4632,6 +4632,17 @@ msgstr ""
"klicken Sie den Link <a href=\"%1/sendpasswd\">Erste Anmeldung?</a> auf der "
"Homepage. Sie werden per E-Mail ein neues Passwort erhalten."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:15
msgid ""
"<strong>You have no password</strong>. To be given a password, follow the <a "
"href=\"%1/firstpasswd\">First login?</a> link from the homepage. You will "
"receive your new password by email."
msgstr ""
"<strong>Sie haben kein Passwort.</strong> Um ein Passwort zu erhalten, "
"klicken Sie den Link <a href=\"%1/firstpasswd\">Erste Anmeldung?</a> auf der "
"Homepage. Sie werden per E-Mail ein neues Passwort erhalten."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:16
msgid ""
......
......@@ -4478,6 +4478,17 @@ msgstr ""
"href=\"%1/sendpasswd\">First login?</a> link from the homepage. You will "
"receive your new password by email."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:15
msgid ""
"<strong>You have no password</strong>. To be given a password, follow the <a "
"href=\"%1/firstpasswd\">First login?</a> link from the homepage. You will "
"receive your new password by email."
msgstr ""
"<strong>You have no password</strong>. To be given a password, follow the <a "
"href=\"%1/firstpasswd\">First login?</a> link from the homepage. You will "
"receive your new password by email."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:16
msgid ""
......
This diff is collapsed.
......@@ -4619,6 +4619,18 @@ msgstr ""
"the <a href=\"%1/sendpasswd\">¿Primera conexión?</a> de la página inicail. "
"Recibirás un nuevo password por email."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:15
msgid ""
"<strong>You have no password</strong>. To be given a password, follow the <a "
"href=\"%1/firstpasswd\">First login?</a> link from the homepage. You will "
"receive your new password by email."
msgstr ""
"<strong>No tienes password</strong>. Para obtener un password, utiliza el "
"enlace <strong>You have no password</strong>. To be given a password, follow "
"the <a href=\"%1/firstpasswd\">¿Primera conexión?</a> de la página inicail. "
"Recibirás un nuevo password por email."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:16
msgid ""
......
......@@ -4698,6 +4698,17 @@ msgstr ""
"mot de passe, suivez le lien <a href=\"%1/sendpasswd\">Première connexion</"
"a> depuis la page d'accueil. Vous recevrez ce mot de passe par e-mail."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:15
msgid ""
"<strong>You have no password</strong>. To be given a password, follow the <a "
"href=\"%1/firstpasswd\">First login?</a> link from the homepage. You will "
"receive your new password by email."
msgstr ""
"<strong>Vous n'avez pas de mot de passe</strong>. Pour vous faire allouer un "
"mot de passe, suivez le lien <a href=\"%1/firstpasswd\">Première connexion</"
"a> depuis la page d'accueil. Vous recevrez ce mot de passe par e-mail."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:16
msgid ""
......
......@@ -4254,6 +4254,19 @@ msgstr ""
"melynek segítségével már be tud jelentkezni és jelszót tud magának "
"beállítani."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:15
msgid ""
"<strong>You have no password</strong>. To be given a password, follow the <a "
"href=\"%1/firstpasswd\">First login?</a> link from the homepage. You will "
"receive your new password by email."
msgstr ""
"<strong>Önnek még nincs jelszava</strong>. Jelszóhoz úgy juthat, ha az "
"induló oldalon az <a href=\"%1/firstpasswd\">Ez az első bejelentkezése?</a> "
"szövegre kattint. Ezt követően, ha beírja az email címét, kap egy levelet, "
"melynek segítségével már be tud jelentkezni és jelszót tud magának "
"beállítani."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:16
msgid ""
......
This diff is collapsed.
......@@ -4931,6 +4931,17 @@ msgstr ""
"<a href=\"%1/sendpasswd\">まだログインしたことがない</a>のリンクを選びます。"
"パスワードが電子メールで届きます。"
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:15
msgid ""
"<strong>You have no password</strong>. To be given a password, follow the <a "
"href=\"%1/firstpasswd\">First login?</a> link from the homepage. You will "
"receive your new password by email."
msgstr ""
"<strong>パスワードがまだない</strong>。パスワードをもらうには、ホームページの"
"<a href=\"%1/firstpasswd\">まだログインしたことがない</a>のリンクを選びます。"
"パスワードが電子メールで届きます。"
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:16
msgid ""
......
......@@ -4510,6 +4510,17 @@ msgstr ""
"sendpasswd\">Pierwsze logowanie</a>, który znajdziesz na stronie domowej. "
"Nowe hasło otrzymasz w wiadomości email."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:15
msgid ""
"<strong>You have no password</strong>. To be given a password, follow the <a "
"href=\"%1/firstpasswd\">First login?</a> link from the homepage. You will "
"receive your new password by email."
msgstr ""
"<strong>Nie masz hasła</strong>. Aby otrzymać hasło, użyj linku <a href=\"%1/"
"firstpasswd\">Pierwsze logowanie</a>, który znajdziesz na stronie domowej. "
"Nowe hasło otrzymasz w wiadomości email."
#. (path_cgi)
#: ../web_tt2/help_faquser.tt2:16
msgid ""
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
The default configuration files, templates and authorization scenarios
are located in the --ETCBINDIR-- hierachy and are overwritten when
upgrading Sympa.
You can customize or extend the default configuration in the
--ETCDIR-- hierarchy. Customization for a virtual host are located in
the --ETCDIR--/my_virtual_robot/ hierarchy.
......@@ -34,50 +34,6 @@ my $serial_number = 0; # incremented on each archived mail
## RCS identification.
## copie a message in $dir using a unique file name based on liSTNAME
sub outgoing {
my($dir,$list_id,$msg) = @_;
&Log::do_log ('debug2',"outgoing for list $list_id to directory $dir");
return 1 if ($dir eq '/dev/null');
## ignoring message with a no-archive flag
if (ref($msg) &&
($Conf::Conf{'ignore_x_no_archive_header_feature'} ne 'on') &&
(($msg->head->get('X-no-archive') =~ /yes/i) || ($msg->head->get('Restrict') =~ /no\-external\-archive/i))) {
&Log::do_log('info',"Do not archive message with no-archive flag for list $list_id");
return 1;
}
## Create the archive directory if needed
unless (-d $dir) {
mkdir ($dir, 0775);
chmod 0774, $dir;
&Log::do_log('info',"creating $dir");
}
my @now = localtime(time);
# my $prefix= sprintf("%04d-%02d-%02d-%02d-%02d-%02d",1900+$now[5],$now[4]+1,$now[3],$now[2],$now[1],$now[0]);
# my $filename = "$dir"."/"."$prefix-$list_id";
my $filename = sprintf '%s/%s.%d.%d.%d', $dir, $list_id, time, $$, $serial_number;
$serial_number = ($serial_number+1)%100000;
unless ( open(OUT, "> $filename")) {
&Log::do_log('info',"error unable open outgoing dir $dir for list $list_id");
return undef;
}
&Log::do_log('debug',"put message in $filename");
if (ref ($msg)) {
$msg->print(\*OUT);
}else {
print OUT $msg;
}
close (OUT);
}
## Does the real job : stores the message given as an argument into
## the indicated directory.
......@@ -289,31 +245,81 @@ sub load_html_message {
return \%metadata;
}
sub clean_archived_message{
my $params = shift;
&do_log('debug',"Cleaning HTML parts of a message input %s , output %s ",$params->{'input'},$params->{'output'});
my $input = $params->{'input'};
my $output = $params->{'output'};
sub clean_archive_directory {
Log::do_log('debug2', '(%s, %s)', @_);
my $robot = shift;
my $dir_to_rebuild = shift;
my $arc_root = Conf::get_robot_conf('*', 'arc_path'); #FIXME: robot?
my $answer;
$answer->{'dir_to_rebuild'} = $arc_root . '/' . $dir_to_rebuild;
$answer->{'cleaned_dir'} = $Conf::Conf{'tmpdir'} . '/' . $dir_to_rebuild;
unless (
my $number_of_copies = &tools::copy_dir(
$answer->{'dir_to_rebuild'},
$answer->{'cleaned_dir'}
)
) {
&Log::do_log(
'err',
"Unable to create a temporary directory where to store files for HTML escaping (%s). Cancelling.",
$number_of_copies
);
return undef;
}
if (opendir ARCDIR, $answer->{'cleaned_dir'}) {
my $files_left_uncleaned = 0;
foreach my $file (readdir(ARCDIR)) {
next if ($file =~ /^\./);
$files_left_uncleaned++
unless Archive::clean_archived_message($robot, $file, $file);
}
closedir DIR;
if ($files_left_uncleaned) {
&Log::do_log('err',
"HTML cleaning failed for %s files in the directory %s.",
$files_left_uncleaned, $answer->{'dir_to_rebuild'});
}
$answer->{'dir_to_rebuild'} = $answer->{'cleaned_dir'};
} else {
&Log::do_log(
'err',
'Unable to open directory %s: %s',
$answer->{'dir_to_rebuild'}, $!
);
&tools::del_dir($answer->{'cleaned_dir'});
return undef;
}
return $answer;
}
sub clean_archived_message{
Log::do_log('debug2', '(%s, %s, %s)', @_);
my $robot = shift;
my $input = shift;
my $output = shift;
my $msg;
unless ($msg = Message->new($input, 1)) {
Log::do_log('err', 'Unable to create a Message object with file %s',
$input);
return undef;
}
if (my $msg = new Message({'file'=>$input})){
if($msg->clean_html()){
if(open TMP, ">$output") {
print TMP $msg->{'msg'}->as_string;
close TMP;
}else{
&do_log('err','Unable to create a tmp file to write clean HTML to file %s',$output);
return undef;
}
}else{
&do_log('err','HTML cleaning in file %s failed.',$output);
return undef;
}
}else{
&do_log('err','Unable to create a Message object with file %s',$input);
exit;
return undef;
if ($msg->clean_html($robot)) {
if (open TMP, ">$output") {
print TMP $msg->{'msg'}->as_string;
close TMP;
return 1;
} else {
Log::do_log('err',
'Unable to create a tmp file to write clean HTML to file %s',
$output);
return undef;
}
} else {
Log::do_log('err', 'HTML cleaning in file %s failed.', $output);
return undef;
}
}
......
......@@ -3638,12 +3638,7 @@ sub distribute_msg {
}
## Archives
my $msgtostore = $message->{'msg'};
if (($message->{'smime_crypted'} eq 'smime_crypted') &&
($self->{admin}{archive_crypted_msg} eq 'original')) {
$msgtostore = $message->{'orig_msg'};
}
$self->archive_msg($msgtostore);
$self->archive_msg($message);
## Change the reply-to header if necessary.
if ($self->{'admin'}{'reply_to_header'}) {
......@@ -3723,7 +3718,7 @@ sub distribute_msg {
## store msg in digest if list accept digest mode (encrypted message can't be included in digest)
if (($self->is_digest()) and ($message->{'smime_crypted'} ne 'smime_crypted')) {
$self->archive_msg_digest($msgtostore);
$self->store_digest($message);
}
## Synchronize list members, required if list uses include sources
......@@ -4743,49 +4738,6 @@ sub send_to_editor {
return undef;
}
}
# Old code 5.4 and before to be removed in 5.5
# if ($encrypt eq 'smime_crypted') {
#
# ## Send a different crypted message to each moderator
# foreach my $recipient (@rcpt) {
#
# # create a one time ticket that will be used as un md5 URL credential
# $param->{'one_time_ticket'} = &Auth::create_one_time_ticket($in{'email'},$robot,'modindex/'.$name,$ip)
#
# ## $msg->body_as_string respecte-t-il le Base64 ??
# my $cryptedmsg = &tools::smime_encrypt($msg->head, $msg->body_as_string, $recipient); #
# unless ($cryptedmsg) {
# &Log::do_log('notice', 'Failed encrypted message for moderator');
# # xxxx send a generic error message : X509 cert missing
# return undef;
# }
#
# my $crypted_file = $Conf::Conf{'tmpdir'}.'/'.$self->get_list_id().'.moderate.'.$$;
# unless (open CRYPTED, ">$crypted_file") {
# &Log::do_log('notice', 'Could not create file %s', $crypted_file);
# return undef;
# }
# print CRYPTED $cryptedmsg;
# close CRYPTED;
#
#
# $param->{'msg_path'} = $crypted_file;
#
# &tt2::allow_absolute_path();
# unless ($self->send_file('moderate', $recipient, $self->{'domain'}, $param)) {
# &Log::do_log('notice',"Unable to send template 'moderate' to $recipient");
# return undef;
# }
# }
# }else{
# $param->{'msg_path'} = $file;
#
# &tt2::allow_absolute_path();
# unless ($self->send_file('moderate', \@rcpt, $self->{'domain'}, $param)) {
# &Log::do_log('notice',"Unable to send template 'moderate' to $self->{'name'} editors");
# return undef;
# }
# }
return $modkey;
}
......@@ -6658,8 +6610,9 @@ sub get_first_list_member {
}
$lock->set_timeout(10*60);
&Log::do_log('debug2', 'List::get_first_list_member(%s,%s,%d,%d)', $self->{'name'},$sortby, $offset, $rows);
Log::do_log('debug2', '(%s, %s, %s, %s)',
$self->{'name'}, $sortby, $offset, $rows);
## Get an Shared lock
unless ($lock->lock('read')) {
return undef;
......@@ -6825,7 +6778,8 @@ sub get_first_list_admin {
$sql_regexp = $data->{'sql_regexp'};
my $fh;
&Log::do_log('debug2', '(%s,%s,%s,%d,%d)', $self->{'name'},$role, $sortby, $offset, $rows);
Log::do_log('debug2', '(%s, %s, %s, %s, %s)',
$self->{'name'}, $role, $sortby, $offset, $rows);
my $lock = new Lock ($self->{'dir'}.'/include_admin_user');
unless (defined $lock) {
......@@ -8154,22 +8108,67 @@ sub archive_ls {
}
## Archive
sub archive_msg {
my($self, $msg ) = @_;
&Log::do_log('debug2', 'List::archive_msg for %s',$self->{'name'});
my $is_archived = $self->is_archived();
Archive::store_last($self, $msg) if ($is_archived);
our $serial_number = 0; # incremented on each archived mail
Archive::outgoing("$Conf::Conf{'queueoutgoing'}",$self->get_list_id(),$msg)
if ($self->is_web_archived());
}
sub archive_msg {
my($self, $message) = @_;
Log::do_log('debug2', 'List::archive_msg for %s',$self->{'name'});
if ($self->is_archived()) {
my $msg = $message->{'msg'};
if (($message->{'smime_crypted'} eq 'smime_crypted') &&
($self->{admin}{archive_crypted_msg} eq 'original')) {
$msg = $message->{'orig_msg'};
}
sub archive_msg_digest {
my($self, $msg) = @_;
&Log::do_log('debug2', 'List::archive_msg_digest');
Archive::store_last($self, $msg);
## copie a message in outgoing spool using a unique file name based on
## listname
## ignoring message with a no-archive flag
if ( ref($msg)
&& ($Conf::Conf{'ignore_x_no_archive_header_feature'} ne 'on')
&& ( ($msg->head->get('X-no-archive') =~ /yes/i)
|| ($msg->head->get('Restrict') =~ /no\-external\-archive/i))
) {
Log::do_log('info',
"Do not archive message with no-archive flag for list %s",
$self->get_list_id);
return 1;
}
## Create the archive directory if needed
my $queue = $Conf::Conf{'queueoutgoing'};
unless (-d $queue) {
mkdir($queue, 0775);
chmod 0774, $queue;
Log::do_log('info', "creating $queue");
}
$self->store_digest( $msg) if ($self->{'name'});
my @now = localtime(time);
# my $prefix = sprintf("%04d-%02d-%02d-%02d-%02d-%02d",
# 1900+$now[5],$now[4]+1,$now[3],$now[2],$now[1],$now[0]);
# my $filename = "$queue"."/"."$prefix-$list_id";
my $filename = sprintf '%s/%s.%d.%d.%d',
$queue, $self->get_list_id, time, $$, $serial_number;
$serial_number = ($serial_number + 1) % 100000;
unless (open(OUT, "> $filename")) {
Log::do_log('info',
"error unable open outgoing dir %s for list %s",
$queue, $self->get_list_id);
return undef;
}
Log::do_log('debug', "put message in $filename");
if (ref($msg)) {
$msg->print(\*OUT);
} else {
print OUT $msg;
}
close(OUT);
}
}
## Is the list moderated?
......@@ -9387,7 +9386,8 @@ sub _load_list_members_from_include {
my $name = $self->{'name'};
my $admin = $self->{'admin'};
my $dir = $self->{'dir'};
&Log::do_log('debug2', 'List::_load_users_include for list %s',$name);
Log::do_log('debug2', '(%s)', $name);
my (%users, $depend_on, $ref);
my $total = 0;
my @errors;
......@@ -10601,7 +10601,8 @@ sub _save_stats_file {
return undef;
}
&Log::do_log('debug2', 'List::_save_stats_file(%s, %d, %d, %d)', $file, $total,$last_sync,$last_sync_admin_user );
Log::do_log('debug2', '(%s, %s, %s, %s)',
$file, $total, $last_sync, $last_sync_admin_user);
my $untainted_filename = sprintf ("%s",$file);
open(L, "> $untainted_filename") || return undef;
printf L "%d %.0f %.0f %.0f %d %d %d\n", @{$stats}, $total, $last_sync, $last_sync_admin_user;
......@@ -10648,7 +10649,7 @@ sub _compare_addresses {
## Does the real job : stores the message given as an argument into
## the digest of the list.
sub store_digest {
my($self,$msg) = @_;
my($self, $message) = @_;
&Log::do_log('debug3', 'List::store_digest');
my($filename, $newfile);
......@@ -10680,6 +10681,8 @@ sub store_digest {
# send the date of the next digest to the users
}
my $msg = $message->{'msg'};
#$msg->head->delete('Received') if ($msg->head->get('received'));
$msg->print(\*OUT);
printf OUT "\n%s\n\n", &tools::get_separator();
......
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