- Applied fixes from trunk up to r5451
parent
bdb649067d
commit
c994e0e7cd
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
|
||||
http://pear.php.net/dtd/tasks-1.0.xsd
|
||||
http://pear.php.net/dtd/package-2.0
|
||||
http://pear.php.net/dtd/package-2.0.xsd">
|
||||
<name>managesieve</name>
|
||||
<channel>pear.roundcube.net</channel>
|
||||
<summary>Sieve filters manager for Roundcube</summary>
|
||||
<description>
|
||||
Adds a possibility to manage Sieve scripts (incoming mail filters).
|
||||
It's clickable interface which operates on text scripts and communicates
|
||||
with server using managesieve protocol. Adds Filters tab in Settings.
|
||||
</description>
|
||||
<lead>
|
||||
<name>Aleksander Machniak</name>
|
||||
<user>alec</user>
|
||||
<email>alec@alec.pl</email>
|
||||
<active>yes</active>
|
||||
</lead>
|
||||
<date>2011-11-17</date>
|
||||
<version>
|
||||
<release>5.0</release>
|
||||
<api>5.0</api>
|
||||
</version>
|
||||
<stability>
|
||||
<release>stable</release>
|
||||
<api>stable</api>
|
||||
</stability>
|
||||
<license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
|
||||
<notes>-</notes>
|
||||
<contents>
|
||||
<dir baseinstalldir="/" name="/">
|
||||
<file name="managesieve.php" role="php">
|
||||
<tasks:replace from="@name@" to="name" type="package-info"/>
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info"/>
|
||||
</file>
|
||||
<file name="managesieve.js" role="data">
|
||||
<tasks:replace from="@name@" to="name" type="package-info"/>
|
||||
<tasks:replace from="@package_version@" to="version" type="package-info"/>
|
||||
</file>
|
||||
<file name="localization/bg_BG.inc" role="data"></file>
|
||||
<file name="localization/cs_CZ.inc" role="data"></file>
|
||||
<file name="localization/de_CH.inc" role="data"></file>
|
||||
<file name="localization/de_DE.inc" role="data"></file>
|
||||
<file name="localization/el_GR.inc" role="data"></file>
|
||||
<file name="localization/en_GB.inc" role="data"></file>
|
||||
<file name="localization/en_US.inc" role="data"></file>
|
||||
<file name="localization/es_AR.inc" role="data"></file>
|
||||
<file name="localization/es_ES.inc" role="data"></file>
|
||||
<file name="localization/et_EE.inc" role="data"></file>
|
||||
<file name="localization/fi_FI.inc" role="data"></file>
|
||||
<file name="localization/fr_FR.inc" role="data"></file>
|
||||
<file name="localization/gl_ES.inc" role="data"></file>
|
||||
<file name="localization/hr_HR.inc" role="data"></file>
|
||||
<file name="localization/hu_HU.inc" role="data"></file>
|
||||
<file name="localization/it_IT.inc" role="data"></file>
|
||||
<file name="localization/ja_JP.inc" role="data"></file>
|
||||
<file name="localization/lv_LV.inc" role="data"></file>
|
||||
<file name="localization/nb_NO.inc" role="data"></file>
|
||||
<file name="localization/nl_NL.inc" role="data"></file>
|
||||
<file name="localization/pl_PL.inc" role="data"></file>
|
||||
<file name="localization/pt_BR.inc" role="data"></file>
|
||||
<file name="localization/pt_PT.inc" role="data"></file>
|
||||
<file name="localization/ru_RU.inc" role="data"></file>
|
||||
<file name="localization/sk_SK.inc" role="data"></file>
|
||||
<file name="localization/sl_SI.inc" role="data"></file>
|
||||
<file name="localization/sv_SE.inc" role="data"></file>
|
||||
<file name="localization/uk_UA.inc" role="data"></file>
|
||||
<file name="localization/zh_CN.inc" role="data"></file>
|
||||
<file name="localization/zh_TW.inc" role="data"></file>
|
||||
<file name="skins/default/managesieve.css" role="data"></file>
|
||||
<file name="skins/default/managesieve_mail.css" role="data"></file>
|
||||
<file name="skins/default/templates/filteredit.html" role="data"></file>
|
||||
<file name="skins/default/templates/managesieve.html" role="data"></file>
|
||||
<file name="skins/default/templates/setedit.html" role="data"></file>
|
||||
<file name="skins/default/images/add.png" role="data"></file>
|
||||
<file name="skins/default/images/del.png" role="data"></file>
|
||||
<file name="skins/default/images/down_small.gif" role="data"></file>
|
||||
<file name="skins/default/images/filter.png" role="data"></file>
|
||||
<file name="skins/default/images/up_small.gif" role="data"></file>
|
||||
<file name="managesieve.php" role="php"></file>
|
||||
<file name="lib/rcube_sieve.php" role="php"></file>
|
||||
<file name="lib/rcube_sieve_script.php" role="php"></file>
|
||||
<file name="lib/Net/Sieve.php" role="php"></file>
|
||||
<file name="config.inc.php.dist" role="data"></file>
|
||||
</dir>
|
||||
<!-- / -->
|
||||
</contents>
|
||||
<dependencies>
|
||||
<required>
|
||||
<php>
|
||||
<min>5.2.1</min>
|
||||
</php>
|
||||
<pearinstaller>
|
||||
<min>1.7.0</min>
|
||||
</pearinstaller>
|
||||
</required>
|
||||
</dependencies>
|
||||
<phprelease/>
|
||||
</package>
|
Binary file not shown.
After Width: | Height: | Size: 106 B |
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
Binary file not shown.
After Width: | Height: | Size: 106 B |
@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
Test of Sieve body extension (RFC5173)
|
||||
--SKIPIF--
|
||||
--FILE--
|
||||
<?php
|
||||
include '../lib/rcube_sieve_script.php';
|
||||
|
||||
$txt = '
|
||||
require ["body","fileinto"];
|
||||
if body :raw :contains "MAKE MONEY FAST"
|
||||
{
|
||||
stop;
|
||||
}
|
||||
if body :content "text" :contains ["missile","coordinates"]
|
||||
{
|
||||
fileinto "secrets";
|
||||
}
|
||||
if body :content "audio/mp3" :contains ""
|
||||
{
|
||||
fileinto "jukebox";
|
||||
}
|
||||
if body :text :contains "project schedule"
|
||||
{
|
||||
fileinto "project/schedule";
|
||||
}
|
||||
';
|
||||
|
||||
$s = new rcube_sieve_script($txt);
|
||||
echo $s->as_text();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
require ["body","fileinto"];
|
||||
if body :raw :contains "MAKE MONEY FAST"
|
||||
{
|
||||
stop;
|
||||
}
|
||||
if body :content "text" :contains ["missile","coordinates"]
|
||||
{
|
||||
fileinto "secrets";
|
||||
}
|
||||
if body :content "audio/mp3" :contains ""
|
||||
{
|
||||
fileinto "jukebox";
|
||||
}
|
||||
if body :text :contains "project schedule"
|
||||
{
|
||||
fileinto "project/schedule";
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
Test of Sieve vacation extension (RFC5232)
|
||||
--SKIPIF--
|
||||
--FILE--
|
||||
<?php
|
||||
include '../lib/rcube_sieve_script.php';
|
||||
|
||||
$txt = '
|
||||
require ["imapflags"];
|
||||
# rule:[imapflags]
|
||||
if header :matches "Subject" "^Test$" {
|
||||
setflag "\\\\Seen";
|
||||
addflag ["\\\\Answered","\\\\Deleted"];
|
||||
}
|
||||
';
|
||||
|
||||
$s = new rcube_sieve_script($txt, array('imapflags'));
|
||||
echo $s->as_text();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
require ["imapflags"];
|
||||
# rule:[imapflags]
|
||||
if header :matches "Subject" "^Test$"
|
||||
{
|
||||
setflag "\\Seen";
|
||||
addflag ["\\Answered","\\Deleted"];
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Test of Sieve include extension
|
||||
--SKIPIF--
|
||||
--FILE--
|
||||
<?php
|
||||
include '../lib/rcube_sieve_script.php';
|
||||
|
||||
$txt = '
|
||||
require ["include"];
|
||||
|
||||
include "script.sieve";
|
||||
# rule:[two]
|
||||
if true
|
||||
{
|
||||
include :optional "second.sieve";
|
||||
}
|
||||
';
|
||||
|
||||
$s = new rcube_sieve_script($txt, array(), array('variables'));
|
||||
echo $s->as_text();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
require ["include"];
|
||||
include "script.sieve";
|
||||
# rule:[two]
|
||||
if true
|
||||
{
|
||||
include :optional "second.sieve";
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
Test of prefix comments handling
|
||||
--SKIPIF--
|
||||
--FILE--
|
||||
<?php
|
||||
include '../lib/rcube_sieve_script.php';
|
||||
|
||||
$txt = '
|
||||
# this is a comment
|
||||
# and the second line
|
||||
|
||||
require ["variables"];
|
||||
set "b" "c";
|
||||
';
|
||||
|
||||
$s = new rcube_sieve_script($txt, array(), array('variables'));
|
||||
echo $s->as_text();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
# this is a comment
|
||||
# and the second line
|
||||
|
||||
require ["variables"];
|
||||
set "b" "c";
|
@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
Test of Sieve relational extension (RFC5231)
|
||||
--SKIPIF--
|
||||
--FILE--
|
||||
<?php
|
||||
include '../lib/rcube_sieve_script.php';
|
||||
|
||||
$txt = '
|
||||
require ["relational","comparator-i;ascii-numeric"];
|
||||
# rule:[redirect]
|
||||
if header :value "ge" :comparator "i;ascii-numeric"
|
||||
["X-Spam-score"] ["14"] {redirect "test@test.tld";}
|
||||
';
|
||||
|
||||
$s = new rcube_sieve_script($txt);
|
||||
echo $s->as_text();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
require ["relational","comparator-i;ascii-numeric"];
|
||||
# rule:[redirect]
|
||||
if header :value "ge" :comparator "i;ascii-numeric" "X-Spam-score" "14"
|
||||
{
|
||||
redirect "test@test.tld";
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
--TEST--
|
||||
Test of Sieve vacation extension (RFC5230)
|
||||
--SKIPIF--
|
||||
--FILE--
|
||||
<?php
|
||||
include '../lib/rcube_sieve_script.php';
|
||||
|
||||
$txt = '
|
||||
require ["vacation"];
|
||||
# rule:[test-vacation]
|
||||
if anyof (header :contains "Subject" "vacation")
|
||||
{
|
||||
vacation :days 1 text:
|
||||
# test
|
||||
test test /* test */
|
||||
test
|
||||
.
|
||||
;
|
||||
stop;
|
||||
}
|
||||
';
|
||||
|
||||
$s = new rcube_sieve_script($txt);
|
||||
echo $s->as_text();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
require ["vacation"];
|
||||
# rule:[test-vacation]
|
||||
if header :contains "Subject" "vacation"
|
||||
{
|
||||
vacation :days 1 text:
|
||||
# test
|
||||
test test /* test */
|
||||
test
|
||||
.
|
||||
;
|
||||
stop;
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
--TEST--
|
||||
Test of Sieve variables extension
|
||||
--SKIPIF--
|
||||
--FILE--
|
||||
<?php
|
||||
include '../lib/rcube_sieve_script.php';
|
||||
|
||||
$txt = '
|
||||
require ["variables"];
|
||||
set "honorific" "Mr";
|
||||
set "vacation" text:
|
||||
Dear ${HONORIFIC} ${last_name},
|
||||
I am out, please leave a message after the meep.
|
||||
.
|
||||
;
|
||||
set :length "b" "${a}";
|
||||
set :lower "b" "${a}";
|
||||
set :upperfirst "b" "${a}";
|
||||
set :upperfirst :lower "b" "${a}";
|
||||
set :quotewildcard "b" "Rock*";
|
||||
';
|
||||
|
||||
$s = new rcube_sieve_script($txt, array(), array('variables'));
|
||||
echo $s->as_text();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
require ["variables"];
|
||||
set "honorific" "Mr";
|
||||
set "vacation" text:
|
||||
Dear ${HONORIFIC} ${last_name},
|
||||
I am out, please leave a message after the meep.
|
||||
.
|
||||
;
|
||||
set :length "b" "${a}";
|
||||
set :lower "b" "${a}";
|
||||
set :upperfirst "b" "${a}";
|
||||
set :upperfirst :lower "b" "${a}";
|
||||
set :quotewildcard "b" "Rock*";
|
@ -0,0 +1,38 @@
|
||||
--TEST--
|
||||
Test of Sieve subaddress extension (RFC5233)
|
||||
--SKIPIF--
|
||||
--FILE--
|
||||
<?php
|
||||
include '../lib/rcube_sieve_script.php';
|
||||
|
||||
$txt = '
|
||||
require ["envelope","subaddress","fileinto"];
|
||||
if envelope :user "To" "postmaster"
|
||||
{
|
||||
fileinto "postmaster";
|
||||
stop;
|
||||
}
|
||||
if envelope :detail :is "To" "mta-filters"
|
||||
{
|
||||
fileinto "mta-filters";
|
||||
stop;
|
||||
}
|
||||
';
|
||||
|
||||
$s = new rcube_sieve_script($txt);
|
||||
echo $s->as_text();
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
?>
|
||||
--EXPECT--
|
||||
require ["envelope","subaddress","fileinto"];
|
||||
if envelope :user "To" "postmaster"
|
||||
{
|
||||
fileinto "postmaster";
|
||||
stop;
|
||||
}
|
||||
if envelope :detail :is "To" "mta-filters"
|
||||
{
|
||||
fileinto "mta-filters";
|
||||
stop;
|
||||
}
|
Loading…
Reference in New Issue