Re: cyrus + roundcube + managesieve for vacation notification

2017-12-18 Thread Vladislav Kurz
On 12/16/17 09:55, Patrick Goetz wrote:
> The documentation page Nic mentioned does talk about global filters, but
> doesn't provide any clues about where such things should be placed.
> Following the dovecot example, I created this folder:
> 
>    /var/imap/sieve/global
> 
> which likely won't ever get used, but the managesieve plugin wants to
> know about it anyway.

Hello,

I think there is a little misunderstanding about managesieve_default.

This is not a path to a folder with default scripts. It is a path to a
FILE, that contains the default script. This script will be copied to
new user's script on first login if he does not have any sieve script
yet. The script in that path is not used by cyrus in any way. It is just
a template script for new users. Nothing prevents users to remove the
default rules later. And if some users will never login to roundcube,
they will never get this default script applied.


-- 
Best regards
Vladislav Kurz


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: cyrus + roundcube + managesieve for vacation notification

2017-12-16 Thread Patrick Boutilier

On 12/16/2017 04:55 AM, Patrick Goetz wrote:
Just a quick follow up:  Vladislav was correct; there is no need to have 
both sieve and managesieve lines in /etc/cyrus/cyrus.conf.  I removed 
the managesieve line and the vacation sieve filter is working fine. 
Sieve does appear in /etc/services (I guess check for your OS?), but 
it's not clear to me at the moment how this is relevant.


/etc/services is like a hosts file for ports. If you try to use 
something like servername:sieve instead of servername:4190 then sieve 
has to be defined as port 4190 in /etc/services .



Simple example using telnet to ssh port:



[boutilpj@ls6000 ~]$ telnet localhost ssh
Trying ::1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.3
quit
Protocol mismatch.
Connection closed by foreign host.




The documentation page Nic mentioned does talk about global filters, but 
doesn't provide any clues about where such things should be placed. 
Following the dovecot example, I created this folder:


    /var/imap/sieve/global

which likely won't ever get used, but the managesieve plugin wants to 
know about it anyway.


Since the roundcube managesieve plugin doesn't necessarily do everything 
for you (if you want to retain the option of setting up other filters), 
I found a nice one page web tutorial you can provide users:


   https://www.theedesign.com/blog/2016/set-office-message-roundcube

The alternative to this to set

    $config['managesieve_vacation'] = 1;

in config.inc.php in the managesieve plugins directory, which adds a 
vacation menu item the setting menu.  If your users (like mine) are only 
ever going to use a vacation filter and are easily confused, you can set


    $config['managesieve_vacation'] = 2;

This hides the filter menu and leaves only the vastly more user friendly 
vacation menu item.


This is all pretty easy to set up, once you know what to use and how to 
do it, I don't understand why it's not documented better.  I've been 
scratching my head over how to provide this feature for years.



On 12/15/2017 07:51 AM, Nic Bernstein wrote:

On 12/15/2017 07:38 AM, Vladislav Kurz wrote:

On 12/15/17 12:57, Patrick Goetz wrote:

Many thanks to Vladislav and Merlin for setting me in the right
direction for setting up user-activated vacation notifications.  A
couple of follow up questions:

On 12/14/2017 03:31 AM, Vladislav Kurz wrote:
Also, is there anything special I need to do with my cyrus 
configuration

to allow for roundcube to notify imapd about sieve rules being
activated/deactivated?

Just uncomment the sieve line in cyrus.conf

Following the documentation here:
  https://www.cyrusimap.org/imap/reference/admin/sieve.html

it looks like I also need to add a managesieve line to
/etc/cyrus/cyrus.conf?

    sieve cmd="timsieved" listen="servername:sieve" prefork=0
    managesieve   cmd="timsieved" listen="servername:4190" prefork=0

Is this correct, or am I doing some superfluous?  I enabled managesieve
and roundcube is talking to the sieve server, but didn't test without.

Hello Patrick,

these lines look like the same. Sieve port is 4190, and the first item
is IMHO just a name. Just keep the first one.


Actually, these may not be the same, depending on the contents of 
/etc/services for the "sieve" service.  This used to be 2000, prior to 
standardization in RFC5804.  So, if your /etc/services lists 4190, 
then get rid of the duplicate line.  The fact that Cyrus starts with 
both lines defined makes me think that either sieve isn't listed in 
/etc/services (which should have resulted in an error) or that it 
isn't 4190, since one cannot have two services defined for the same 
listen port.





Since this is our first time using sieve, I haven't worried about this
too much until now, but roundcube+managesieve  seems to be concerned
about the location of global sieve scripts:

    // default contents of filters script (eg. default spam filter)
    // $config['managesieve_default'] = '/etc/dovecot/sieve/global';
    $config['managesieve_default'] = '/var/imap/sieve';


There is nothing like global sieve script in cyrus (at least I did not
find a way how to do it.)


There is.  Please see the documentation here:
https://www.cyrusimap.org/imap/reference/admin/sieve.html#sieve-scripts-in-shared-folders 



Quoting:


Cyrus has two types of repositories where Sieve scripts can live:

1.

    *Personal* is per user and

2.

    *Global* is for every user. Global scripts aren’t applied on
    incoming messages by default: users must include them in their
    scripts.
  * Note that there are two types of Global scripts: *global*
    and *global per domain*.


Cheers,
 -nic



The option above is path to a default script (file, not folder) that
will be applied to the user upon first login to roundcube. I use it as a
template for users with some recommended settings or disabled examples.
I usually put it into /etc/roundcube/roundcube.script, but you can put
it 

Re: cyrus + roundcube + managesieve for vacation notification

2017-12-16 Thread Patrick Goetz
Just a quick follow up:  Vladislav was correct; there is no need to have 
both sieve and managesieve lines in /etc/cyrus/cyrus.conf.  I removed 
the managesieve line and the vacation sieve filter is working fine. 
Sieve does appear in /etc/services (I guess check for your OS?), but 
it's not clear to me at the moment how this is relevant.


The documentation page Nic mentioned does talk about global filters, but 
doesn't provide any clues about where such things should be placed. 
Following the dovecot example, I created this folder:


   /var/imap/sieve/global

which likely won't ever get used, but the managesieve plugin wants to 
know about it anyway.


Since the roundcube managesieve plugin doesn't necessarily do everything 
for you (if you want to retain the option of setting up other filters), 
I found a nice one page web tutorial you can provide users:


  https://www.theedesign.com/blog/2016/set-office-message-roundcube

The alternative to this to set

   $config['managesieve_vacation'] = 1;

in config.inc.php in the managesieve plugins directory, which adds a 
vacation menu item the setting menu.  If your users (like mine) are only 
ever going to use a vacation filter and are easily confused, you can set


   $config['managesieve_vacation'] = 2;

This hides the filter menu and leaves only the vastly more user friendly 
vacation menu item.


This is all pretty easy to set up, once you know what to use and how to 
do it, I don't understand why it's not documented better.  I've been 
scratching my head over how to provide this feature for years.



On 12/15/2017 07:51 AM, Nic Bernstein wrote:

On 12/15/2017 07:38 AM, Vladislav Kurz wrote:

On 12/15/17 12:57, Patrick Goetz wrote:

Many thanks to Vladislav and Merlin for setting me in the right
direction for setting up user-activated vacation notifications.  A
couple of follow up questions:

On 12/14/2017 03:31 AM, Vladislav Kurz wrote:

Also, is there anything special I need to do with my cyrus configuration
to allow for roundcube to notify imapd about sieve rules being
activated/deactivated?

Just uncomment the sieve line in cyrus.conf

Following the documentation here:
  https://www.cyrusimap.org/imap/reference/admin/sieve.html

it looks like I also need to add a managesieve line to
/etc/cyrus/cyrus.conf?

    sieve cmd="timsieved" listen="servername:sieve" prefork=0
    managesieve   cmd="timsieved" listen="servername:4190" prefork=0

Is this correct, or am I doing some superfluous?  I enabled managesieve
and roundcube is talking to the sieve server, but didn't test without.

Hello Patrick,

these lines look like the same. Sieve port is 4190, and the first item
is IMHO just a name. Just keep the first one.


Actually, these may not be the same, depending on the contents of 
/etc/services for the "sieve" service.  This used to be 2000, prior to 
standardization in RFC5804.  So, if your /etc/services lists 4190, then 
get rid of the duplicate line.  The fact that Cyrus starts with both 
lines defined makes me think that either sieve isn't listed in 
/etc/services (which should have resulted in an error) or that it isn't 
4190, since one cannot have two services defined for the same listen port.





Since this is our first time using sieve, I haven't worried about this
too much until now, but roundcube+managesieve  seems to be concerned
about the location of global sieve scripts:

    // default contents of filters script (eg. default spam filter)
    // $config['managesieve_default'] = '/etc/dovecot/sieve/global';
    $config['managesieve_default'] = '/var/imap/sieve';


There is nothing like global sieve script in cyrus (at least I did not
find a way how to do it.)


There is.  Please see the documentation here:
https://www.cyrusimap.org/imap/reference/admin/sieve.html#sieve-scripts-in-shared-folders

Quoting:


Cyrus has two types of repositories where Sieve scripts can live:

1.

*Personal* is per user and

2.

*Global* is for every user. Global scripts aren’t applied on
incoming messages by default: users must include them in their
scripts.
  * Note that there are two types of Global scripts: *global*
and *global per domain*.


Cheers,
     -nic



The option above is path to a default script (file, not folder) that
will be applied to the user upon first login to roundcube. I use it as a
template for users with some recommended settings or disabled examples.
I usually put it into /etc/roundcube/roundcube.script, but you can put
it almost anywhere. (perhaps somewhere in document_root for roundcube is
also fine).

Do not rely on it as default. It is applied only if the user does not
have a sieve script yet. After that users are free to modify it. If
someone does not use roundcube at all, he will not get that script applied.



--
Nic bernstein...@onlight.com
Onlight Inc.www.onlight.com
6525 W Bluemound Rd., Ste 24  v. 414.272.4477
Milwaukee, Wisconsin  53213-4073  f. 414.290.0335




Re: cyrus + roundcube + managesieve for vacation notification

2017-12-15 Thread Nic Bernstein

On 12/15/2017 07:38 AM, Vladislav Kurz wrote:

On 12/15/17 12:57, Patrick Goetz wrote:

Many thanks to Vladislav and Merlin for setting me in the right
direction for setting up user-activated vacation notifications.  A
couple of follow up questions:

On 12/14/2017 03:31 AM, Vladislav Kurz wrote:

Also, is there anything special I need to do with my cyrus configuration
to allow for roundcube to notify imapd about sieve rules being
activated/deactivated?

Just uncomment the sieve line in cyrus.conf

Following the documentation here:
  https://www.cyrusimap.org/imap/reference/admin/sieve.html

it looks like I also need to add a managesieve line to
/etc/cyrus/cyrus.conf?

    sieve cmd="timsieved" listen="servername:sieve" prefork=0
    managesieve   cmd="timsieved" listen="servername:4190" prefork=0

Is this correct, or am I doing some superfluous?  I enabled managesieve
and roundcube is talking to the sieve server, but didn't test without.

Hello Patrick,

these lines look like the same. Sieve port is 4190, and the first item
is IMHO just a name. Just keep the first one.


Actually, these may not be the same, depending on the contents of 
/etc/services for the "sieve" service.  This used to be 2000, prior to 
standardization in RFC5804.  So, if your /etc/services lists 4190, then 
get rid of the duplicate line.  The fact that Cyrus starts with both 
lines defined makes me think that either sieve isn't listed in 
/etc/services (which should have resulted in an error) or that it isn't 
4190, since one cannot have two services defined for the same listen port.





Since this is our first time using sieve, I haven't worried about this
too much until now, but roundcube+managesieve  seems to be concerned
about the location of global sieve scripts:

    // default contents of filters script (eg. default spam filter)
    // $config['managesieve_default'] = '/etc/dovecot/sieve/global';
    $config['managesieve_default'] = '/var/imap/sieve';


There is nothing like global sieve script in cyrus (at least I did not
find a way how to do it.)


There is.  Please see the documentation here:
https://www.cyrusimap.org/imap/reference/admin/sieve.html#sieve-scripts-in-shared-folders

Quoting:


Cyrus has two types of repositories where Sieve scripts can live:

1.

*Personal* is per user and

2.

*Global* is for every user. Global scripts aren’t applied on
incoming messages by default: users must include them in their
scripts.
  * Note that there are two types of Global scripts: *global*
and *global per domain*.


Cheers,
    -nic



The option above is path to a default script (file, not folder) that
will be applied to the user upon first login to roundcube. I use it as a
template for users with some recommended settings or disabled examples.
I usually put it into /etc/roundcube/roundcube.script, but you can put
it almost anywhere. (perhaps somewhere in document_root for roundcube is
also fine).

Do not rely on it as default. It is applied only if the user does not
have a sieve script yet. After that users are free to modify it. If
someone does not use roundcube at all, he will not get that script applied.



--
Nic bernstein...@onlight.com
Onlight Inc.www.onlight.com
6525 W Bluemound Rd., Ste 24  v. 414.272.4477
Milwaukee, Wisconsin  53213-4073  f. 414.290.0335


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

Re: cyrus + roundcube + managesieve for vacation notification

2017-12-15 Thread Vladislav Kurz
On 12/15/17 12:57, Patrick Goetz wrote:
> Many thanks to Vladislav and Merlin for setting me in the right
> direction for setting up user-activated vacation notifications.  A
> couple of follow up questions:
> 
> On 12/14/2017 03:31 AM, Vladislav Kurz wrote:
>>> Also, is there anything special I need to do with my cyrus configuration
>>> to allow for roundcube to notify imapd about sieve rules being
>>> activated/deactivated?
>>
>> Just uncomment the sieve line in cyrus.conf
> 
> Following the documentation here:
>  https://www.cyrusimap.org/imap/reference/admin/sieve.html
> 
> it looks like I also need to add a managesieve line to
> /etc/cyrus/cyrus.conf?
> 
>    sieve cmd="timsieved" listen="servername:sieve" prefork=0
>    managesieve   cmd="timsieved" listen="servername:4190" prefork=0
> 
> 
> Is this correct, or am I doing some superfluous?  I enabled managesieve
> and roundcube is talking to the sieve server, but didn't test without.
> 

Hello Patrick,

these lines look like the same. Sieve port is 4190, and the first item
is IMHO just a name. Just keep the first one.

> 
> Since this is our first time using sieve, I haven't worried about this
> too much until now, but roundcube+managesieve  seems to be concerned
> about the location of global sieve scripts:
> 
>    // default contents of filters script (eg. default spam filter)
>    // $config['managesieve_default'] = '/etc/dovecot/sieve/global';
>    $config['managesieve_default'] = '/var/imap/sieve';
> 

There is nothing like global sieve script in cyrus (at least I did not
find a way how to do it.)

The option above is path to a default script (file, not folder) that
will be applied to the user upon first login to roundcube. I use it as a
template for users with some recommended settings or disabled examples.
I usually put it into /etc/roundcube/roundcube.script, but you can put
it almost anywhere. (perhaps somewhere in document_root for roundcube is
also fine).

Do not rely on it as default. It is applied only if the user does not
have a sieve script yet. After that users are free to modify it. If
someone does not use roundcube at all, he will not get that script applied.

-- 
Best Regards
Vladislav Kurz


Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus

cyrus + roundcube + managesieve for vacation notification

2017-12-15 Thread Patrick Goetz
Many thanks to Vladislav and Merlin for setting me in the right 
direction for setting up user-activated vacation notifications.  A 
couple of follow up questions:


On 12/14/2017 03:31 AM, Vladislav Kurz wrote:
>> Also, is there anything special I need to do with my cyrus configuration
>> to allow for roundcube to notify imapd about sieve rules being
>> activated/deactivated?
>
> Just uncomment the sieve line in cyrus.conf

Following the documentation here:
 https://www.cyrusimap.org/imap/reference/admin/sieve.html

it looks like I also need to add a managesieve line to 
/etc/cyrus/cyrus.conf?


   sieve cmd="timsieved" listen="servername:sieve" prefork=0
   managesieve   cmd="timsieved" listen="servername:4190" prefork=0


Is this correct, or am I doing some superfluous?  I enabled managesieve 
and roundcube is talking to the sieve server, but didn't test without.



Since this is our first time using sieve, I haven't worried about this 
too much until now, but roundcube+managesieve  seems to be concerned 
about the location of global sieve scripts:


   // default contents of filters script (eg. default spam filter)
   // $config['managesieve_default'] = '/etc/dovecot/sieve/global';
   $config['managesieve_default'] = '/var/imap/sieve';


I set this to be /var/imap/sieve, but that doesn't feel right, since 
this folder appears to be the base for user sieve scripts?


[root@www ~]# cd /var/imap/sieve
[root@www sieve]# ls
0  3  6  9  b  C  e  F  h  I  k  L  n  O  q  R  t  U  w  X  z
1  4  7  a  B  d  E  g  H  j  K  m  N  p  Q  s  T  v  W  y  Z
2  5  8  A  c  D  f  G  i  J  l  M  o  P  r  S  u  V  x  Y


I need to identify an appropriate location for global sieve scripts in 
order to add it to PHP's open_basedir folder list.  Also, when a user 
activates a sieve script to facilitate vacation notification, does that 
script go into a global folder (unlikely) or into the user's personal 
sieve space?  I'm pretty sure it's the latter, just would like someone 
to confirm.




Cyrus Home Page: http://www.cyrusimap.org/
List Archives/Info: http://lists.andrew.cmu.edu/pipermail/info-cyrus/
To Unsubscribe:
https://lists.andrew.cmu.edu/mailman/listinfo/info-cyrus