Autoreply messages containing non-ASCII characters are now properly quoted-printable encoded.
---- Changes since 1.400 ----
Filters that deliver to mbox-format folders now have locking enabled.
+Creation of filters that match headers is now less error-prone, due to a new menu for selecting if it should match the start, end or any part of the header.
&ui_textbox("condlevel", $filter->{'condlevel'}, 4), undef, \@tds);
# Check some header
-@headers = ( "From", "To", "Subject", "Cc", "Reply-To" );
+@headers = ( "From", "To", "Subject", "Cc", "Reply-To", "List-Id" );
$common = &indexoflc($filter->{'condheader'}, @headers) >= 0;
+if ($filter->{'condvalue'} =~ /^\.\*(.*)\$$/) {
+ # Ends with
+ $condvalue = $1;
+ $condmode = 2;
+ }
+elsif ($filter->{'condvalue'} =~ /^\.\*(.*)\.\*$/ ||
+ $filter->{'condvalue'} =~ /^\.\*(.*)$/) {
+ # Contains
+ $condvalue = $1;
+ $condmode = 1;
+ }
+elsif ($filter->{'condvalue'} =~ /^(.*)\.\*$/ ||
+ $filter->{'condvalue'} =~ /^(.*)$/) {
+ # Starts with
+ $condvalue = $1;
+ $condmode = 0;
+ }
print &ui_table_row(
&ui_oneradio("cmode", 4, $text{'edit_cmode4'}, $cmode == 4),
- &text('edit_cheader',
+ &text('edit_cheader2',
&ui_select("condmenu", $cmode != 4 ? "From" :
$common ? $filter->{'condheader'} : "",
[ (map { [ $_ ] } @headers),
&ui_textbox("condheader",
$common ? "" : $filter->{'condheader'}, 20,
$cmode != 4 || $common),
- &ui_textbox("condvalue",
- $filter->{'condvalue'}, 40)),
+ &ui_select("condmode", $condmode,
+ [ [ 0, $text{'edit_modestart'} ],
+ [ 1, $text{'edit_modecont'} ],
+ [ 2, $text{'edit_modeend'} ] ]),
+ &ui_textbox("condvalue", $condvalue, 40)),
undef, \@tds);
# Smaller
$cond = &text('index_clevel', $f->{'condlevel'});
}
elsif ($f->{'condheader'}) {
- $cond = &text('index_cheader',
- "<tt>".&html_escape($f->{'condheader'})."</tt>",
- "<tt>".&html_escape($f->{'condvalue'})."</tt>");
+ if ($f->{'condvalue'} =~ /^\.\*(.*)\$$/) {
+ $cond = &text('index_cheader2',
+ "<tt>".&html_escape($f->{'condheader'})."</tt>",
+ "<tt>".&html_escape($1)."</tt>");
+ }
+ elsif ($f->{'condvalue'} =~ /^\.\*(.*)\.\*$/ ||
+ $f->{'condvalue'} =~ /^\.\*(.*)$/) {
+ $cond = &text('index_cheader1',
+ "<tt>".&html_escape($f->{'condheader'})."</tt>",
+ "<tt>".&html_escape($1)."</tt>");
+ }
+ elsif ($f->{'condvalue'} =~ /^(.*)\.\*$/ ||
+ $f->{'condvalue'} =~ /^(.*)$/) {
+ $cond = &text('index_cheader0',
+ "<tt>".&html_escape($f->{'condheader'})."</tt>",
+ "<tt>".&html_escape($1)."</tt>");
+ }
}
elsif ($f->{'condtype'} eq '<' || $f->{'condtype'} eq '>') {
$cond = &text('index_csize'.$f->{'condtype'},
edit_header1=Condició del filtre
edit_cmode0=Tot el correu
edit_cmode4=Basat en la capçalera
-edit_cheader=La capçalera $1$2 ha de coincidir $3
edit_cmode3=El correu és més petit de
edit_cmode2=El correu és més gran de
edit_cmode5=Correu classificat com a spam
edit_amode6=Odeslat automatickou odpovìï
edit_amode7=Ulo¾it nové jméno adresáøe
edit_cbody=Aplikovat na tìlo zprávy
-edit_cheader=Hlavièka $1$2 se musí shodnout s $3
edit_cmode0=V¹echny emaily
edit_cmode1=Na základì regulérního výrazu
edit_cmode2=Email vìt¹í ne¾
edit_amode6=Sende automatische Antwort
edit_amode7=Speichere in neuem Ordner mit dem Namen
edit_cbody=Anwenden auf Nachrichten Body
-edit_cheader=Header $1$2 muss mit $3 übereinstimmen
edit_cmode0=Alle E-Mail
edit_cmode1=Basierend auf regulärem Ausdruck
edit_cmode2=E-Mail grösser als
edit_header1=ÓõíèÞêç ãéá ößëôñï
edit_cmode0=¼ëá ôá email
edit_cmode4=ÂÜóç ôçò åðéêåöáëßäáò
-edit_cheader=Ç åðéêåöáëßäá $1$2 èá ðñÝðåé íá ôáéñéÜæåé ìå $3
edit_cmode3=Ôï ìÝãåèïò ôïõ email åßíáé ìéêñüôåñï áðü
edit_cmode2=Ôï ìÝãåèïò ôïõ email åßíáé ìåãáëýôåñï áðü
edit_cmode5=ÊáôÜôáîç email ùò spam
index_addfwd=Quick forwarding setup.
index_cspam=Email is spam
index_clevel=Spam score is at least $1
-index_cheader=Header $1 matches $2
+index_cheader0=Header $1 must start with $2
+index_cheader1=Header $1 must contain $2
+index_cheader2=Header $1 must end with $2
+edit_modestart=starts with
+edit_modecont=contains
+edit_modeend=ends with
index_cre=Headers match $1
index_cre2=Body matches $1
index_calways=Always
edit_header1=Condition for filter
edit_cmode0=All email
edit_cmode4=Based on header
-edit_cheader=Header $1$2 must match $3
+edit_cheader2=Header $1$2 $3 $4
edit_cmode3=Email smaller than
edit_cmode2=Email larger than
edit_cmode5=Email classified as spam
edit_header1=Suodattimen ehto
edit_cmode0=Kaikki sähköpostit
edit_cmode4=Täsmäävä otsake
-edit_cheader=Otsakkeen $1$2 täytyy täsmätä $3
edit_cmode3=Sähköposti pienempi kuin
edit_cmode2=Sähköposti suurempi kuin
edit_cmode5=Sähköposti luokiteltu roskapostiksi
edit_amode6=Stuur automatisch antwoord
edit_amode7=Opslaan naar nieuw folder genaamd
edit_cbody=Toevoegen aan berichten body
-edit_cheader=Header $1$2 moet overeenkomen met $3
edit_cmode0=Alle email
edit_cmode1=Gebaseerd op regulaire expressies
edit_cmode2=Email groter dan
$filter->{'condheader'} = $in{'condmenu'} || $in{'condheader'};
$filter->{'condheader'} =~ /^[a-zA-Z0-9\-]+$/ ||
&error($text{'save_econdheader'});
- $filter->{'condvalue'} = $in{'condvalue'};
+ if ($in{'condmode'} == 0) {
+ $filter->{'condvalue'} = $in{'condvalue'};
+ }
+ elsif ($in{'condmode'} == 1) {
+ $filter->{'condvalue'} = ".*".$in{'condvalue'}.".*";
+ }
+ else {
+ $filter->{'condvalue'} = ".*".$in{'condvalue'}."\$";
+ }
}
elsif ($in{'cmode'} == 3) {
# Smaller than some size