Unverified Commit 74852a61 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #1159 from ikedas/web_url_in_instruction by ikedas

Use web URL in instruction if web interface is available
parents 9bfbff7b 27d836af
[%# certif_warning.tt2 ~%]
Subject: [%"near expiration of your certificate"|loc|qencode%]
[%|loc(expiration_date)%]Your authentication certificate will expire on %1.[%END%]
......@@ -8,6 +9,6 @@ Subject: [%"near expiration of your certificate"|loc|qencode%]
[%|loc(conf.email,domain)%]To receive them again, renew your certificate with your certification authority
and send a signed message to %1@%2
or
click: [%END%][% | mailtourl({subject => 'WHICH'}) ~%]
[% conf.email %]@[% domain %]
[%~ END %]
click: [%END%][% "${conf.email}@${domain}" | mailtourl({subject => 'WHICH'}) %]
[%# end certif_warning.tt2 ~%]
......@@ -116,13 +116,15 @@ You are not allowed to send this message for the following reason:[%END%]
[% ELSE -%]
[%|loc%]The following address is not a known mailing list:[%END%]
[% recipient %]
[% recipient %]
[%|loc%]To find out the correct list name, ask for this server's lists directory:[%END%]
[% | mailtourl({subject => 'WHICH'}) ~%]
[% conf.email %]@[% domain %]
[%~ END %]
[% IF conf.wwsympa_url -%]
[% 'my' | url_abs %]
[%- ELSE -%]
[% "${conf.email}@${domain}" | mailtourl({subject => 'WHICH'}) %]
[%- END %]
[%|loc(conf.listmaster_email,domain)%]For further information, please contact %1@%2[%END%]
......@@ -158,3 +160,5 @@ X-Sympa-Attach: yes
[% END -%]
--[% boundary %]--
[%# end delivery_status_notification.tt2 ~%]
[%# expire_deletion.tt2 ~%]
From: [% fromlist %]
Subject: [%"Removed from %1"|loc(list.name)|qencode%]
......@@ -6,6 +7,10 @@ Subject: [%"Removed from %1"|loc(list.name)|qencode%]
because you didn't confirm your subscription.[%END%]
[%|loc%]You can subscribe again:[%END%]
[% | mailtourl({subject => "sub ${list.name}"}) ~%]
[%conf.email%]@[%domain%]
[%~ END %]
[% IF conf.wwsympa_url -%]
[% 'subscribe' | url_abs([list.name]) %]
[%- ELSE -%]
[% "${conf.email}@${domain}" | mailtourl({subject => "sub ${list.name}"}) %]
[%- END %]
[%# end expire_deletion.tt2 ~%]
......@@ -2,16 +2,20 @@
Subject: [%"resubscription to %1"|loc(list.name)|qencode%]
[%|loc(list.name,domain,user.email)%]You have been subscriber of list %1@%2 with email %3 for 1 year or more.[%END%]
[% "${conf.email}@${domain}" | mailtourl({subject => "sub ${list.name}"}) %]
[% IF conf.wwsympa_url -%]
[% 'subscribe' | url_abs([list.name]) %]
[%|loc%]Everything about this list: [%END ~%]
[% 'info' | url_abs([list.name]) %]
[%|loc%]Unsubscription:[%END%] [%""~%]
[% 'signoff' | url_abs([list.name]) %]
[% 'signoff' | url_abs([list.name],{email => user.email}) %]
[% ELSE -%]
[% "${conf.email}@${domain}" | mailtourl({subject => "sub ${list.name}"}) %]
[%|loc%]Information about this list: [%END ~%]
[% "${conf.email}@${domain}" | mailtourl({subject => "info ${list.name}"}) %]
[%|loc%]Unsubscription:[%END%] [%""~%]
[% "${conf.email}@${domain}" | mailtourl({subject => "sig ${list.name} ${user.email}"}) %]
[% END -%]
[%# end expire_warning1.tt2 ~%]
......@@ -3,16 +3,20 @@ From: [% fromlist %]
Subject: [%"resubscription to %1"|loc(list.name)|qencode%]
[%|loc(list.name,domain,user.email)%]You have been subscriber of list %1@%2 with email %3 for 1 year or more.[%END%]
[% "${conf.email}@${domain}" | mailtourl({subject => "sub ${list.name}"}) %]
[% IF conf.wwsympa_url -%]
[% 'subscribe' | url_abs([list.name]) %]
[%|loc%]Everything about this list: [%END ~%]
[% 'info' | url_abs([list.name]) %]
[%|loc%]Unsubscription:[%END%] [%""~%]
[% 'signoff' | url_abs([list.name]) %]
[% 'signoff' | url_abs([list.name],{email => user.email}) %]
[% ELSE -%]
[% "${conf.email}@${domain}" | mailtourl({subject => "sub ${list.name}"}) %]
[%|loc%]Information about this list: [%END ~%]
[% "${conf.email}@${domain}" | mailtourl({subject => "info ${list.name}"}) %]
[%|loc%]Unsubscription:[%END%] [%""~%]
[% "${conf.email}@${domain}" | mailtourl({subject => "sig ${list.name} ${user.email}"}) %]
[% END -%]
[%# end expire_warning2.tt2 ~%]
[%# global_remind.tt2 ~%]
Subject: [%"Subscription summary"|loc|qencode%]
X-Sympa-NoWrap: yes
......@@ -10,8 +11,12 @@ X-Sympa-NoWrap: yes
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[% FOREACH l = lists -%]
[% l %] [% | mailtourl({subject => "sig ${l} ${user.email}"}) ~%]
[% conf.email %]@[% domain %]
[%~ END %]
[% IF conf.wwsympa_url -%]
[% l %] [% 'signoff' | url_abs([l],{email => user.email}) %]
[%- ELSE -%]
[% l %] [% "${conf.email}@${domain}" | mailtourl({subject => "sig ${l} ${user.email}"}) %]
[%- END %]
[% END -%]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[%# end global_remind.tt2 ~%]
[%# list_unknown.tt2 ~%]
To: [% to %]
Subject: [%"List unknown"|loc|qencode%]
Content-Type: multipart/report; report-type=delivery-status;
......@@ -10,13 +11,15 @@ Content-Description: Notification
[%|loc%]The following address is not a known mailing list:[%END%]
[% list %]
[% list %]
[%|loc%]To find out the correct list name, ask for this server's lists directory:[%END%]
[% | mailtourl({subject => 'WHICH'}) ~%]
[% conf.email %]@[% domain %]
[%~ END %]
[% IF conf.wwsympa_url -%]
[% 'my' | url_abs %]
[%- ELSE -%]
[% "${conf.email}@${domain}" | mailtourl({subject => 'WHICH'}) %]
[%- END %]
[%|loc(conf.listmaster_email,domain)%]For further information, please contact %1@%2[%END%]
......@@ -38,3 +41,5 @@ Content-Type: text/rfc822-headers
[% header %]
--[% boundary %]--
[%# end list_unknown.tt2 ~%]
......@@ -142,3 +142,5 @@ Subject: [%"List %1 / %2"|loc(list.name,type)|qencode%]
[% param0 %]
[% END %]
[%# end listowner_notification.tt2 ~%]
......@@ -26,20 +26,18 @@ Content-Disposition: inline
[% ELSE -%]
[% IF method == 'md5' && ! request_topic -%]
[%|loc(list.name)%]To distribute the attached message in list %1:[%END%]
<[% | mailtourl({subject => "DISTRIBUTE ${list.name} ${modkey}"}) ~%]
[% conf.email %]@[% domain %]
[%~ END %]>
[% "${conf.email}@${domain}" | mailtourl({subject => "DISTRIBUTE ${list.name} ${modkey}"}) %]
[%|loc(conf.email,domain)%]Or send a message to %1@%2 with the following subject:[%END%]
DISTRIBUTE [% list.name %] [% modkey %]
[%|loc%]To reject it (it will be removed):[%END%]
<[% | mailtourl({subject => "REJECT ${list.name} ${modkey}"}) ~%]
[% conf.email %]@[% domain %]
[%~ END %]>
[% "${conf.email}@${domain}" | mailtourl({subject => "REJECT ${list.name} ${modkey}"}) %]
[%|loc(conf.email,domain)%]Or send a message to %1@%2 with the following subject:[%END%]
REJECT [% list.name %] [% modkey %]
[%END%]
[%|loc%]The messages moderating documentation:[%END%] <[% 'help' | url_abs(['admin-moderate.html']) %]>
[%|loc%]The messages moderating documentation:[%END%] [% 'help' | url_abs(['admin-moderate.html']) %]
[%- END%]
[%- END%]
[% IF spam_status != 'spam' -%]
......@@ -53,3 +51,5 @@ X-Sympa-Attach: yes
--[% boundary %]--
[%- END %]
[%# end moderate.tt2 ~%]
[%# removed.tt2 ~%]
From: [% fromlist %]
Subject: [%"Removed from %1"|loc(list.name)|qencode%]
[%|loc(user.email,list.name,domain)%]Your email address (%1) has been removed from list %2@%3[%END%]
[%|loc%]You can subscribe again:[%END%]
[% | mailtourl({subject => "sub ${list.name}"}) ~%]
[% conf.email %]@[% domain %]
[%~ END %]
[% IF conf.wwsympa_url -%]
[% 'subscribe' | url_abs([list.name]) %]
[%- ELSE -%]
[% "${conf.email}@${domain}" | mailtourl({subject => "sub ${list.name}"}) %]
[%- END %]
[%# end removed.tt2 ~%]
......@@ -17,9 +17,7 @@ Content-Disposition: inline
[% 'request_topic' | url_abs([list.name,authkey]) %]
[%- ELSE -%][%|loc(list.name)%]To distribute the attached message in list %1, click on the URL:[%END%]
[% | mailtourl({subject => "CONFIRM ${authkey}"}) ~%]
[% conf.email %]@[% domain %]
[%~ END %]
[% "${conf.email}@${domain}" | mailtourl({subject => "CONFIRM ${authkey}"}) %]
[%|loc(conf.email,domain)%]Or send a message to %1@%2 with the following subject:[% END %]
CONFIRM [% authkey %]
......@@ -34,3 +32,5 @@ X-Sympa-Attach: yes
[%# Message is attached here. #%]
--[% boundary %]--
[%# end send_auth.tt2 ~%]
......@@ -5896,46 +5896,41 @@ sub add_list_header {
my %options = @_;
my $robot = $self->{'domain'};
my $wwsympa_url = Conf::get_robot_conf($robot, 'wwsympa_url');
if ($field eq 'id') {
$message->add_header('List-Id',
sprintf('<%s.%s>', $self->{'name'}, $self->{'domain'}));
} elsif ($field eq 'help') {
$message->add_header(
'List-Help',
sprintf(
'<%s>',
Sympa::Tools::Text::mailtourl(
Sympa::get_address($self, 'sympa'),
query => {subject => 'help'}
)
my @urls = (
($wwsympa_url ? (Sympa::get_url($robot, 'help')) : ()),
Sympa::Tools::Text::mailtourl(
Sympa::get_address($self, 'sympa'),
query => {subject => 'HELP'}
)
);
$message->add_header('List-Help',
join ', ', map { sprintf '<%s>', $_ } @urls);
} elsif ($field eq 'unsubscribe') {
$message->add_header(
'List-Unsubscribe',
sprintf(
'<%s>',
Sympa::Tools::Text::mailtourl(
Sympa::get_address($self, 'sympa'),
query => {
subject => sprintf('unsubscribe %s', $self->{'name'})
}
)
my @urls = (
($wwsympa_url ? (Sympa::get_url($self, 'signoff')) : ()),
Sympa::Tools::Text::mailtourl(
Sympa::get_address($self, 'sympa'),
query => {subject => sprintf('SIG %s', $self->{'name'})}
)
);
$message->add_header('List-Unsubscribe',
join ', ', map { sprintf '<%s>', $_ } @urls);
} elsif ($field eq 'subscribe') {
$message->add_header(
'List-Subscribe',
sprintf(
'<%s>',
Sympa::Tools::Text::mailtourl(
Sympa::get_address($self, 'sympa'),
query =>
{subject => sprintf('subscribe %s', $self->{'name'})}
)
my @urls = (
($wwsympa_url ? (Sympa::get_url($self, 'subscribe')) : ()),
Sympa::Tools::Text::mailtourl(
Sympa::get_address($self, 'sympa'),
query => {subject => sprintf('SUB %s', $self->{'name'})}
)
);
$message->add_header('List-Subscribe',
join ', ', map { sprintf '<%s>', $_ } @urls);
} elsif ($field eq 'post') {
$message->add_header(
'List-Post',
......@@ -5953,16 +5948,14 @@ sub add_list_header {
)
);
} elsif ($field eq 'archive') {
if (Conf::get_robot_conf($robot, 'wwsympa_url')
and $self->is_web_archived()) {
if ($wwsympa_url and $self->is_web_archived()) {
$message->add_header('List-Archive',
sprintf('<%s>', Sympa::get_url($self, 'arc')));
} else {
return 0;
}
} elsif ($field eq 'archived_at') {
if (Conf::get_robot_conf($robot, 'wwsympa_url')
and $self->is_web_archived()) {
if ($wwsympa_url and $self->is_web_archived()) {
# Use possiblly anonymized Message-Id: field instead of
# {message_id} attribute.
my $message_id = Sympa::Tools::Text::canonic_message_id(
......
Markdown is supported
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