Opened 3 years ago

Closed 3 years ago

#10692 closed Task/To do item (fixed)

Add Sieve Support to Roundcube

Reported by: https://id.mayfirst.org/srevilak Owned by: https://id.mayfirst.org/srevilak
Priority: Medium Component: Tech
Keywords: dovecot sieve roundcube Cc: https://id.mayfirst.org/jamie
Sensitive: no

Description

Ticket #8368 involves a courier -> dovecot migration.

Dovecot supports sieve filtering. We'd like to have roundcube take advantage of this (i.e., we'd like to add sieve support to roundcube, and have this talk to Dovecot's managesieve plugin).

Change History (12)

comment:1 Changed 3 years ago by https://id.mayfirst.org/srevilak

  • Owner set to https://id.mayfirst.org/srevilak
  • Status changed from new to assigned

comment:2 Changed 3 years ago by https://id.mayfirst.org/jamie

  • Cc https://id.mayfirst.org/jamie added

comment:3 Changed 3 years ago by https://id.mayfirst.org/srevilak

According to https://plugins.roundcube.net/, plugins are managed by composer.

I see one plugin for managing sieve rules: https://plugins.roundcube.net/packages/johndoh/sieverules

To experiment, I'm going to cut a new branch, based on the roundcube-1.1.2-mfpl1 tag.

0 roundcube-code@stallman:/srv/roundcube-dev$ git status
# Not currently on any branch.
nothing to commit (working directory clean)

0 roundcube-code@stallman:/srv/roundcube-dev$ git checkout -b sieve-test roundcube-1.1.2-mfpl1
Switched to a new branch 'sieve-test'
0 roundcube-code@stallman:/srv/roundcube-dev$ wget -O composer.phar http://getcomposer.org/installer
--2015-07-04 18:28:34--  http://getcomposer.org/installer
Resolving getcomposer.org (getcomposer.org)... 87.98.253.108, 2001:41d0:a:7b19::
Connecting to getcomposer.org (getcomposer.org)|87.98.253.108|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 275841 (269K) [application/octet-stream]
Saving to: `composer.phar'

100%[=====================================================>] 275,841      675K/s   in 0.4s    

2015-07-04 18:28:35 (675 KB/s) - `composer.phar' saved [275841/275841]


0 roundcube-code@stallman:/srv/roundcube-dev$ cp composer.json-dist composer.json


0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar --check
All settings correct for using Composer
0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar install
All settings correct for using Composer
Downloading...

Composer successfully installed to: /srv/roundcube-dev/composer.phar
Use it: php composer.phar

0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar status
No local changes
0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar install
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
Installing dependencies (including require-dev)                
  - Installing roundcube/plugin-installer (dev-master 0.1.6)
    Cloning 0.1.6

  - Installing pear/pear_exception (dev-master 8c18719)
    Cloning 8c18719fdae000b690e3912be401c76e406dd13b

  - Installing pear/net_socket (dev-trunk bbe6a12)
    Cloning bbe6a12bb4f7059dba161f6ddd43f369c0ec8d09

  - Installing pear/net_smtp (dev-master 334e364)
    Cloning 334e364b3ca4375057e9bf70a228a738942c852b

  - Installing pear-pear.php.net/auth_sasl (1.0.6)
    Downloading: 100%         
  - Installing pear-pear.php.net/net_idna2 (0.1.1)
    Downloading: 100%         
  - Installing johndoh/sieverules (dev-release-2.2 1f5c8ee)
    Cloning 1f5c8ee9b70cfd1827680939acded873630951bb

Do you want to activate the plugin sieverules? [N|y] y
Updated local config at /srv/roundcube-dev/config/config.inc.php
  - Installing pear/console_getopt (v1.4.0)
    Downloading: 100%         

  - Installing pear/pear-core-minimal (dev-master bdfefca)
    Cloning bdfefcacb3b388a1050a58eff9ba5a8f43de2411

  - Installing pear/mail_mime (dev-master 7b21872)
    Cloning 7b218727710eb83894dbee51409673f4494c4b0c

  - Installing pear/mail_mime-decode (1.5.5.2)
    Downloading: 100%         

  - Installing pear-pear.php.net/console_getopt (1.4.0)
    Downloading: 100%         
  - Installing pear-pear.php.net/archive_tar (1.3.16)
    Downloading: 100%         
  - Installing pear-pear.php.net/structures_graph (1.1.0)
    Downloading: 100%         
  - Installing pear-pear.php.net/xml_util (1.3.0)
    Downloading: 100%         
  - Installing pear-pear.php.net/pear (1.9.5)
    Downloading: 100%         
  - Installing pear-pear.php.net/net_socket (1.0.14)
    Downloading: 100%         
  - Installing pear-pear.php.net/net_sieve (1.3.4)
    Downloading: 100%         
  - Installing patchwork/utf8 (dev-master 927caed)
    Cloning 927caedc65ec4f139e9d43fd2589a19a336babc3

  - Installing pear-pear.php.net/console_commandline (1.2.0)
    Downloading: 100%         
  - Installing pear-pear.php.net/crypt_gpg (1.4.0b4)
    Downloading: 100%         
  - Installing phpunit/php-text-template (1.2.1)
    Downloading: 100%         

  - Installing phpunit/php-timer (dev-master 3e82f4e)
    Cloning 3e82f4e9fc92665fafd9157568e4dcb01d014e5b

  - Installing sebastian/version (1.0.6)
    Downloading: 100%         

  - Installing sebastian/global-state (dev-master 23af31f)
    Cloning 23af31f402993cfd94e99cbc4b782e9a78eb0e97

  - Installing sebastian/recursion-context (dev-master 994d4a8)
    Cloning 994d4a811bafe801fb06dccbee797863ba2792ba

  - Installing sebastian/exporter (dev-master 7ae5513)
    Cloning 7ae5513327cb536431847bcc0c10edba2701064e

  - Installing sebastian/environment (dev-master bc66c3b)
    Cloning bc66c3bbe6e5822c34395049e110566491cafa3b

  - Installing sebastian/diff (dev-master 6899b3e)
    Cloning 6899b3e33bfbd386d88b5eea5f65f563e8793051

  - Installing sebastian/comparator (dev-master abd05e7)
    Cloning abd05e77d364138c0532a1b78a13c4d78311f546

  - Installing symfony/yaml (2.8.x-dev 000e7fc)
    Cloning 000e7fc2653335cd42c6d21405dac1c74224a387

  - Installing doctrine/instantiator (dev-master 8e884e7)
    Cloning 8e884e78f9f0eb1329e445619e04456e64d8051d

  - Installing phpdocumentor/reflection-docblock (2.0.4)
    Downloading: 100%         

  - Installing phpspec/prophecy (dev-master 5700f75)
    Cloning 5700f75b23b0dd3495c0f495fe33a5e6717ee160

  - Installing phpunit/phpunit-mock-objects (dev-master e486222)
    Cloning e4862226480f86ea18ef773212ec1e2acd42ba64

  - Installing phpunit/php-token-stream (dev-master 7a9b096)
    Cloning 7a9b0969488c3c54fd62b4d504b3ec758fd005d9

  - Installing phpunit/php-file-iterator (dev-master 6150bf2)
    Cloning 6150bf2c35d3fc379e50c7602b75caceaa39dbf0

  - Installing phpunit/php-code-coverage (dev-master df88fdf)
    Cloning df88fdf48a61af29cc309545f9c8d425c63b8852

  - Installing phpunit/phpunit (4.8.x-dev 21b619c)
    Cloning 21b619c6f0386a06d1646f401a398af3d33fc047

pear/net_smtp suggests installing pear/auth_sasl (Install optionally via your project's composer.json)
patchwork/utf8 suggests installing ext-wfio (Use WFIO for UTF-8 filesystem access on Windows)
sebastian/global-state suggests installing ext-uopz (*)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files

Since composer.phar is sitting in DocumentRoot, I've added a rewrite rule to .htaccess, so it can't be accessed from the web.

After the installation, here's the set of plugins (from config.inc.php)

// List of active plugins (in plugins/ directory)
$config['plugins'] = array(
        'new_user_dialog',
        'import_horde_contacts',
        'import_horde_identities',
        'sieverules',
);

composer created a vendor directory in DocumentRoot, and added a .gitignore for vendor. Added .htaccess rule to deny web access to the vendor directory.

I'm not sure how I feel about .gitignoring the `vendor' directory. Part of me wants git to track those changes, even if for no other reason than for keeping track of what's changed.

My first attempt at using filters brings good news and bad news. The good news: "Filters" is now an option in roundcube's settings menu. The bad news: click "Filters" gives me a WSOD (white screen of death).

209.0.0.0 - - [04/Jul/2015:19:01:47 -0400] "GET /<redacted>/?_task=settings&_action=plugin.sieverules HTTP/1.1" 500 635 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0"

Poo ...

For debugging, added this to config/config.inc.php

$config['debug_level'] = 4;

Now, I see the php error:

Fatal error: Cannot redeclare _PEAR_call_destructors() (previously declared in /srv/roundcube-dev/vendor/pear-pear.php.net/PEAR/PEAR.php:735) in /srv/roundcube-dev/vendor/pear/pear-core-minimal/src/PEAR.php on line 777

The internet suggests this workaround for roundcube https://stackoverflow.com/questions/23366641/cannot-redeclare-pear-call-destructors

mv vendor/pear /tmp/

Progress! /?_task=settings&_action=plugin.sieverules tells me

   An error occurred!
   Unable to connect to sieve server

Taking a break from dinner; then back to look at sieverules plugin configuration.

comment:4 Changed 3 years ago by https://id.mayfirst.org/srevilak

Hmm. Verified that dovecot's managesieve proxy is listening:

148 roundcube-code@stallman:/srv/roundcube-dev/plugins/managesieve$ telnet mail.mayfirst.org 4190
Trying 209.234.253.240...
Connected to mail.mayfirst.org.
Escape character is '^]'.
"IMPLEMENTATION" "Dovecot Pigeonhole"
"SIEVE" "fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave"
"NOTIFY" "mailto"
"SASL" ""
"STARTTLS"
"VERSION" "1.0"
OK "Dovecot ready."
^]
telnet> quit
Connection closed.

plugins/managesieve/config.inc.php has

$config['managesieve_port'] = 4190;
$config['managesieve_host'] = 'mail.mayfirst.org';

// Enables debugging of conversation with sieve server. Logs it into <log_dir>/sieve
$config['managesieve_debug'] = true;

Still getting "cannot connect to sieve server", but no debug log.

Interesting. I introduced a syntax error in plugins/managesieve/config.inc.php, and this causes no complaints in roundcube's UI. I also see nothing in managesieve's PHP files that would load config.inc.php. Perhaps that's why my configuration changes aren't getting picked up.

Tried putting this at the bottom of config/config.inc.php:

require(dirname(__FILE__) . '/../plugins/managesieve/config.inc.php.dist');
require(dirname(__FILE__) . '/../plugins/managesieve/config.inc.php');

Still "unable to connect to sieve server".

Just for curiosity, I'll try the "dev-master" version of the managesieve plugin (as opposed to dev-release-2.2).

0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar update
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
Updating dependencies (including require-dev)                  
  - Updating johndoh/sieverules (dev-release-2.2 1f5c8ee => dev-release-2.0 80f5347)
    Checking out 80f53474927893050d5b81edb337570e47f1c1e4

Writing lock file
Generating autoload files

0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files

0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar status
No local changes

No success there. Switching back to dev-release-2.2.

0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar update
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
Updating dependencies (including require-dev)                  
  - Updating johndoh/sieverules (dev-release-2.0 80f5347 => dev-release-2.2 1f5c8ee)
    Checking out 1f5c8ee9b70cfd1827680939acded873630951bb

Writing lock file
Generating autoload files

0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files

0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar status
No local changes

For now, I've

  • removed the require directives from config/config.inc.php
  • left debug_level at 4
  • left sieve debugging on (though I have yet to see managesieve generate any debug logging)

Will try some more tomorrow.

comment:5 Changed 3 years ago by https://id.mayfirst.org/srevilak

As a reference point

http://lists.roundcube.net/pipermail/users/2014-October/010674.html

is exactly what we're running into. Unfortunately, there have been no follow-ups to that posting.

comment:6 Changed 3 years ago by https://id.mayfirst.org/srevilak

Another reference point: http://lists.kolab.org/pipermail/users/2013-January/014362.html http://lists.kolab.org/pipermail/users/2013-February/014401.html

The latter suggests setting managesieve_usetls = true. Tried this, but still seeing "unable to connect to sieve server".

comment:7 Changed 3 years ago by https://id.mayfirst.org/srevilak

I found the problem. I was assuming that one needed to add a roundcube plugin for sieve filters, and I added sievefilter for this purpose. I got it wrong; there's already a managesieve plugin in the roundcube distribution; it's just not enabled by default.

Managesieve requires Net_Sieve, which came from composer.

Let's go back to the standard composer.json, blow away the vendor directory, and start again.

0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar update
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
Updating dependencies (including require-dev)                  
  - Installing roundcube/plugin-installer (dev-master 0.1.6)
    Cloning 0.1.6

  - Installing pear/pear_exception (dev-master 8c18719)
    Cloning 8c18719fdae000b690e3912be401c76e406dd13b

  - Installing pear/net_socket (dev-trunk bbe6a12)
    Cloning bbe6a12bb4f7059dba161f6ddd43f369c0ec8d09

  - Installing pear/net_smtp (dev-master 334e364)
    Cloning 334e364b3ca4375057e9bf70a228a738942c852b

  - Installing pear-pear.php.net/auth_sasl (1.0.6)
    Loading from cache
  - Installing pear-pear.php.net/net_idna2 (0.1.1)
    Loading from cache
  - Installing pear/console_getopt (v1.4.0)
    Loading from cache

  - Installing pear/pear-core-minimal (dev-master bdfefca)
    Cloning bdfefcacb3b388a1050a58eff9ba5a8f43de2411

  - Installing pear/mail_mime (dev-master 7b21872)
    Cloning 7b218727710eb83894dbee51409673f4494c4b0c

  - Installing pear/mail_mime-decode (1.5.5.2)
    Loading from cache

  - Installing pear-pear.php.net/console_getopt (1.4.0)
    Loading from cache
  - Installing pear-pear.php.net/archive_tar (1.3.16)
    Loading from cache
  - Installing pear-pear.php.net/structures_graph (1.1.0)
    Loading from cache
  - Installing pear-pear.php.net/xml_util (1.3.0)
    Loading from cache
  - Installing pear-pear.php.net/pear (1.9.5)
    Loading from cache
  - Installing pear-pear.php.net/net_socket (1.0.14)
    Loading from cache
  - Installing pear-pear.php.net/net_sieve (1.3.4)
    Loading from cache
  - Installing patchwork/utf8 (dev-master 927caed)
    Cloning 927caedc65ec4f139e9d43fd2589a19a336babc3

  - Installing pear-pear.php.net/console_commandline (1.2.0)
    Loading from cache
  - Installing pear-pear.php.net/crypt_gpg (1.4.0b4)
    Loading from cache
  - Installing phpunit/php-text-template (1.2.1)
    Loading from cache

  - Installing phpunit/php-timer (dev-master 3e82f4e)
    Cloning 3e82f4e9fc92665fafd9157568e4dcb01d014e5b

  - Installing sebastian/version (1.0.6)
    Loading from cache

  - Installing sebastian/global-state (dev-master 23af31f)
    Cloning 23af31f402993cfd94e99cbc4b782e9a78eb0e97

  - Installing sebastian/recursion-context (dev-master 994d4a8)
    Cloning 994d4a811bafe801fb06dccbee797863ba2792ba

  - Installing sebastian/exporter (dev-master 7ae5513)
    Cloning 7ae5513327cb536431847bcc0c10edba2701064e

  - Installing sebastian/environment (dev-master bc66c3b)
    Cloning bc66c3bbe6e5822c34395049e110566491cafa3b

  - Installing sebastian/diff (dev-master 6899b3e)
    Cloning 6899b3e33bfbd386d88b5eea5f65f563e8793051

  - Installing sebastian/comparator (dev-master abd05e7)
    Cloning abd05e77d364138c0532a1b78a13c4d78311f546

  - Installing symfony/yaml (2.8.x-dev 000e7fc)
    Cloning 000e7fc2653335cd42c6d21405dac1c74224a387

  - Installing doctrine/instantiator (dev-master 8e884e7)
    Cloning 8e884e78f9f0eb1329e445619e04456e64d8051d

  - Installing phpdocumentor/reflection-docblock (2.0.4)
    Loading from cache

  - Installing phpspec/prophecy (dev-master 5700f75)
    Cloning 5700f75b23b0dd3495c0f495fe33a5e6717ee160

  - Installing phpunit/phpunit-mock-objects (dev-master e486222)
    Cloning e4862226480f86ea18ef773212ec1e2acd42ba64

  - Installing phpunit/php-token-stream (dev-master 7a9b096)
    Cloning 7a9b0969488c3c54fd62b4d504b3ec758fd005d9

  - Installing phpunit/php-file-iterator (dev-master 6150bf2)
    Cloning 6150bf2c35d3fc379e50c7602b75caceaa39dbf0

  - Installing phpunit/php-code-coverage (dev-master df88fdf)
    Cloning df88fdf48a61af29cc309545f9c8d425c63b8852

  - Installing phpunit/phpunit (4.8.x-dev 21b619c)
    Cloning 21b619c6f0386a06d1646f401a398af3d33fc047

pear/net_smtp suggests installing pear/auth_sasl (Install optionally via your project's composer.json)
patchwork/utf8 suggests installing ext-wfio (Use WFIO for UTF-8 filesystem access on Windows)
sebastian/global-state suggests installing ext-uopz (*)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files

0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar install 
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files


0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar status
No local changes

0 roundcube-code@stallman:/srv/roundcube-dev$ rm -rf vendor/pear

Then, change roundcube's plugin list, so it looks like this:

$config['plugins'] = array(
        'new_user_dialog',
        'import_horde_contacts',
        'import_horde_identities',
        'managesieve',
);

After doing so, Settings > Filters shows the one personal sieve filter I have installed. Yay!

For kicks and grins, I'll give my filter name and save it.

After doing so, I have this in my home directory:

0 srevilak@buffy:~$ ls -ltr .dovecot.sieve 
0 lrwxrwxrwx 1 srevilak revilak 15 May 26 20:54 .dovecot.sieve -> .sieve/my.sieve
0 srevilak@buffy:~$ ls -ltr .sieve/my.sieve 
4 -rw-r--r-- 1 srevilak revilak 133 Jul  4 21:05 .sieve/my.sieve
0 srevilak@buffy:~$ cat .sieve/my.sieve 
require ["fileinto","regex"];
# rule:[Drop X-mailer-lid]
if header :regex "x-mailer-lid" "[0-9]+"
{
        fileinto "INBOX.Spam";
        stop;
}

After adding a second rule:

0 srevilak@buffy:~$ cat .sieve/my.sieve 
require ["fileinto","regex"];
# rule:[Drop X-mailer-lid]
if header :regex "x-mailer-lid" "[0-9]+"
{
        fileinto "INBOX.Spam";
        stop;
}
# rule:[No boogers]
if allof (header :contains "subject" "boogers")
{
        fileinto "INBOX.Spam";
}

That seems reasonable. What if I add a ruleset. (The one ruleset I have is called 'my', presumably based on the filename "my.sieve").

I create a ruleset called "Second ruleset", add one rule, save, then enable the ruleset. Here's what I see on the file system:

0 srevilak@buffy:~$ ls -l .dovecot.sieve 
0 lrwxrwxrwx 1 srevilak revilak 27 Jul  4 21:11 .dovecot.sieve -> .sieve/Second ruleset.sieve

0 srevilak@buffy:~$ cat .sieve/Second\ ruleset.sieve 
require ["imap4flags"];
# rule:[fruit loops]
if header :contains "subject" "fruit loops"
{
        setflag "\\Flagged";
}

So, it looks like one can have two or more rulesets, but only one ruleset can be enabled at a given time.

There is more testing to do, but the basic thing seems to work.

comment:8 Changed 3 years ago by https://id.mayfirst.org/jamie

Great work Steve! Thanks for working through the initial issues. I'll do some testing myself tomorrow, however, it looks like we are ready to transition all servers to dovecot!

comment:9 Changed 3 years ago by https://id.mayfirst.org/srevilak

Tried Settings > Filters with a mail account that's hosted on ossie (courier). Here, I get the Unable to connect to managesieve on mail.mayfirst.org:4190 error, but that seems reasonable to me. There's no managesieve running on ossie. I think we may have to live with that until the courier -> dovecot transition is finished.

For reference, here's what gets logged in log_dir/sieve when sieve debugging is turned on.

[06-Jul-2015 20:59:12 America/New_York] ERROR: (TRYLATER) "Account is temporarily unavailable." (3)
[06-Jul-2015 20:59:12 -0400]: <v3n2470m> PHP Error: Unable to connect to managesieve on mail.mayfirst.org:4190 in /srv/roundcube-dev/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php on line 216 (GET /766075725152988c/?_task=settings&_action=plugin.managesieve)
[06-Jul-2015 20:59:12 America/New_York] ERROR: Not currently in AUTHORISATION state (1)

One of the sieve rule actions is "Reply with message", which seems like a good way to set up vacation messages. Haven't tried this out, though.

One scenario I haven't tested yet: dovecot as IMAP server, no sieve rules set up.

comment:10 Changed 3 years ago by https://id.mayfirst.org/srevilak

tagging and branching

Now that we have filters working on roundcube.dev.mayfirst.org, I want to roll them back into our mainline, and promote to roundcube.mayfirst.org.

Here's the merge

0 sunny:roundcube$ git merge roundcube-dev/sieve-test
Updating f697fff..c037dcc
Fast-forward
 .gitignore                         |   4 ++--
 .htaccess                          |   2 ++
 composer.json                      |  51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 composer.phar                      | Bin 0 -> 1112650 bytes
 plugins/managesieve/config.inc.php |  21 +++++++++++++++++++++
 5 files changed, 76 insertions(+), 2 deletions(-)
 create mode 100644 composer.json
 create mode 100755 composer.phar
 create mode 100644 plugins/managesieve/config.inc.php

The other modifications were to config/config.inc.php; adding managesieve to $config['plugins'].

Let's make a new tag

git tag -s roundcube-1.1.2-mfpl2

And send changes to git.mayfirst.org

0 sunny:roundcube$ git push gmo mfpl-release-1.1
Counting objects: 120, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (76/76), done.
Writing objects: 100% (120/120), 520.36 KiB | 0 bytes/s, done.
Total 120 (delta 41), reused 120 (delta 41)
remote: To git-roundcube@moses.mayfirst.org:/srv/git/roundcube
remote:    f697fff..c037dcc  mfpl-release-1.1 -> mfpl-release-1.1
To ssh://gitosis@git.mayfirst.org/mfpl/roundcube
   f697fff..c037dcc  mfpl-release-1.1 -> mfpl-release-1.1

0 sunny:roundcube$ git push gmo --tags
Counting objects: 1, done.
Writing objects: 100% (1/1), 822 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
remote: To git-roundcube@moses.mayfirst.org:/srv/git/roundcube
remote:  * [new tag]         roundcube-1.1.2-mfpl2 -> roundcube-1.1.2-mfpl2
To ssh://gitosis@git.mayfirst.org/mfpl/roundcube
 * [new tag]         roundcube-1.1.2-mfpl2 -> roundcube-1.1.2-mfpl2

Next, test the promotion on roundcube.dev.mayfirst.org

0 roundcube-code@stallman:/srv/roundcube-dev$ git remote update
Fetching gmo
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (1/1), done.
From git://git.mayfirst.org/mfpl/roundcube
   f697fff..c037dcc  mfpl-release-1.1 -> gmo/mfpl-release-1.1
 * [new tag]         roundcube-1.1.2-mfpl2 -> roundcube-1.1.2-mfpl2


141 roundcube-code@stallman:/srv/roundcube-dev$ git tag -v roundcube-1.1.2-mfpl2
object c037dcc9ee27b113e5fb12e5ea236a5141b5b276
type commit
tag roundcube-1.1.2-mfpl2
tagger Steve Revilak <steve@...> 1436707481 -0400

Tagging addition of managesieve support
gpg: Signature made Sun 12 Jul 2015 09:25:13 AM EDT
gpg:                using RSA key 0x3EB22DE4E594DCF2
gpg: Good signature from "Steve Revilak <steve@...>"

0 roundcube-code@stallman:/srv/roundcube-dev$ git checkout roundcube-1.1.2-mfpl2
Note: checking out 'roundcube-1.1.2-mfpl2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at c037dcc... removed variables where we are not overriding default values

0 roundcube-code@stallman:/srv/roundcube-dev$ php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing pear/pear_exception (dev-master 8c18719)
    Cloning 8c18719fdae000b690e3912be401c76e406dd13b

  - Installing pear/console_getopt (v1.4.0)
    Loading from cache

  - Installing pear/pear-core-minimal (dev-master bdfefca)
    Cloning bdfefcacb3b388a1050a58eff9ba5a8f43de2411

  - Installing pear/mail_mime (dev-master 7b21872)
    Cloning 7b218727710eb83894dbee51409673f4494c4b0c

  - Installing pear/mail_mime-decode (1.5.5.2)
    Loading from cache

  - Installing pear/net_socket (dev-trunk bbe6a12)
    Cloning bbe6a12bb4f7059dba161f6ddd43f369c0ec8d09

  - Installing pear/net_smtp (dev-master 334e364)
    Cloning 334e364b3ca4375057e9bf70a228a738942c852b

pear/net_smtp suggests installing pear/auth_sasl (Install optionally via your project's composer.json)
Generating autoload files

comment:11 Changed 3 years ago by https://id.mayfirst.org/srevilak

roundcube.mayfirst.org promotion

Now, let's promote to roundcube.mayfirst.org.

0 roundcube-code@stallman:/srv/roundcube$ git remote update
Fetching gmo
remote: Counting objects: 126, done.
remote: Compressing objects: 100% (77/77), done.
remote: Total 121 (delta 41), reused 120 (delta 41)
Receiving objects: 100% (121/121), 521.13 KiB, done.
Resolving deltas: 100% (41/41), completed with 5 local objects.
From git://git.mayfirst.org/mfpl/roundcube
   f697fff..c037dcc  mfpl-release-1.1 -> gmo/mfpl-release-1.1
 * [new tag]         roundcube-1.1.2-mfpl2 -> roundcube-1.1.2-mfpl2

0 roundcube-code@stallman:/srv/roundcube$ git checkout roundcube-1.1.2-mfpl2
Previous HEAD position was f697fff... Merge tag '1.1.2' into mfpl-release-1.1
HEAD is now at c037dcc... removed variables where we are not overriding default values

0 roundcube-code@stallman:/srv/roundcube$ php composer.phar install
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
Installing dependencies (including require-dev)                
  - Installing roundcube/plugin-installer (dev-master 0.1.6)
    Cloning 0.1.6

  - Installing pear/pear_exception (dev-master 8c18719)
    Cloning 8c18719fdae000b690e3912be401c76e406dd13b

  - Installing pear/net_socket (dev-trunk bbe6a12)
    Cloning bbe6a12bb4f7059dba161f6ddd43f369c0ec8d09

  - Installing pear/net_smtp (dev-master 6842011)
    Cloning 68420118ac8f9dfe5c4b8cac1bdb955efcd4be21

  - Installing pear-pear.php.net/auth_sasl (1.0.6)
    Loading from cache
  - Installing pear-pear.php.net/net_idna2 (0.1.1)
    Loading from cache
  - Installing pear/console_getopt (v1.4.0)
    Loading from cache

  - Installing pear/pear-core-minimal (dev-master bdfefca)
    Cloning bdfefcacb3b388a1050a58eff9ba5a8f43de2411

  - Installing pear/mail_mime (dev-master 7b01639)
    Cloning 7b016396b6a92de48f771e5dc041b2cebc94288a

  - Installing pear/mail_mime-decode (1.5.5.2)
    Loading from cache

  - Installing pear-pear.php.net/console_getopt (1.4.0)
    Loading from cache
  - Installing pear-pear.php.net/archive_tar (1.3.16)
    Loading from cache
  - Installing pear-pear.php.net/structures_graph (1.1.0)
    Loading from cache
  - Installing pear-pear.php.net/xml_util (1.3.0)
    Loading from cache
  - Installing pear-pear.php.net/pear (1.9.5)
    Loading from cache
  - Installing pear-pear.php.net/net_socket (1.0.14)
    Loading from cache
  - Installing pear-pear.php.net/net_sieve (1.3.4)
    Loading from cache
  - Installing patchwork/utf8 (dev-master 927caed)
    Cloning 927caedc65ec4f139e9d43fd2589a19a336babc3

  - Installing pear-pear.php.net/console_commandline (1.2.0)
    Loading from cache
  - Installing pear-pear.php.net/crypt_gpg (1.4.0b4)
    Loading from cache
  - Installing phpunit/php-text-template (1.2.1)
    Loading from cache

  - Installing phpunit/php-timer (dev-master 3e82f4e)
    Cloning 3e82f4e9fc92665fafd9157568e4dcb01d014e5b

  - Installing sebastian/version (1.0.6)
    Loading from cache

  - Installing sebastian/global-state (dev-master 23af31f)
    Cloning 23af31f402993cfd94e99cbc4b782e9a78eb0e97

  - Installing sebastian/recursion-context (dev-master 994d4a8)
    Cloning 994d4a811bafe801fb06dccbee797863ba2792ba

  - Installing sebastian/exporter (dev-master 7ae5513)
    Cloning 7ae5513327cb536431847bcc0c10edba2701064e

  - Installing sebastian/environment (dev-master bc66c3b)
    Cloning bc66c3bbe6e5822c34395049e110566491cafa3b

  - Installing sebastian/diff (dev-master 6899b3e)
    Cloning 6899b3e33bfbd386d88b5eea5f65f563e8793051

  - Installing sebastian/comparator (dev-master abd05e7)
    Cloning abd05e77d364138c0532a1b78a13c4d78311f546

  - Installing symfony/yaml (2.8.x-dev 000e7fc)
    Cloning 000e7fc2653335cd42c6d21405dac1c74224a387

  - Installing doctrine/instantiator (dev-master 8e884e7)
    Cloning 8e884e78f9f0eb1329e445619e04456e64d8051d

  - Installing phpdocumentor/reflection-docblock (2.0.4)
    Loading from cache

  - Installing phpspec/prophecy (dev-master 5700f75)
    Cloning 5700f75b23b0dd3495c0f495fe33a5e6717ee160

  - Installing phpunit/phpunit-mock-objects (2.3.x-dev 18dfbcb)
    Cloning 18dfbcb81d05e2296c0bcddd4db96cade75e6f42

  - Installing phpunit/php-token-stream (dev-master 7a9b096)
    Cloning 7a9b0969488c3c54fd62b4d504b3ec758fd005d9

  - Installing phpunit/php-file-iterator (dev-master 6150bf2)
    Cloning 6150bf2c35d3fc379e50c7602b75caceaa39dbf0

  - Installing phpunit/php-code-coverage (dev-master df88fdf)
    Cloning df88fdf48a61af29cc309545f9c8d425c63b8852

  - Installing phpunit/phpunit (4.8.x-dev 437254c)
    Cloning 437254c51c8654ef9056778c4e7bdf24008d2a93

pear/net_smtp suggests installing pear/auth_sasl (Install optionally via your project's composer.json)
patchwork/utf8 suggests installing ext-wfio (Use WFIO for UTF-8 filesystem access on Windows)
sebastian/global-state suggests installing ext-uopz (*)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files
0 roundcube-code@stallman:/srv/roundcube$ 

Now, the last step is to update config.inc.php

0 roundcube-code@stallman:/srv/roundcube/config$ cp -pv config.inc.php config.inc.php.$(date +%F)
`config.inc.php' -> `config.inc.php.2015-07-12'

// edit config.inc.php

1 roundcube-code@stallman:/srv/roundcube/config$ diff -u config.inc.php.2015-07-12 config.inc.php
--- config.inc.php.2015-07-12   2015-03-07 21:07:42.000000000 -0500
+++ config.inc.php      2015-07-12 09:44:21.000000000 -0400
@@ -83,7 +83,8 @@
 // List of active plugins (in plugins/ directory)
 $config['plugins'] = array ('new_user_dialog', 
                             'import_horde_contacts',
-                            'import_horde_identities');
+                            'import_horde_identities',
+                           'managesieve');
 
 // These cols are shown in the message list. Available cols are:
 // subject, from, to, fromto, cc, replyto, date, size, status, flag,


1 roundcube-code@stallman:/srv/roundcube/config$ mv -v config.inc.php.2015-07-12 OLD/
`config.inc.php.2015-07-12' -> `OLD/config.inc.php.2015-07-12'

Now, the filter section appears in 'Settings'. Clicking 'Filters' gives me a white screen. Blah.

[12-Jul-2015 09:46:11 America/New_York] PHP Fatal error:  Cannot redeclare _PEAR_call_destructors() (previously declared in /srv/roundcube/vendor/pear-pear.php.net/PEAR/PEAR.php:735) in /srv/roundcube/vendor/pear/pear-core-minimal/src/PEAR.php on line 777

Oh yes, ran into this before.

0 roundcube-code@stallman:/srv/roundcube$ mkdir -m 700 /tmp/roundcube
0 roundcube-code@stallman:/srv/roundcube$ mv vendor/pear /tmp/roundcube/

And now, filters seem to be working.

comment:12 Changed 3 years ago by https://id.mayfirst.org/srevilak

  • Resolution set to fixed
  • Status changed from assigned to closed

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.