cyrus + roundcube + managesieve for vacation notification
Patrick Boutilier
boutilpj at ednet.ns.ca
Sat Dec 16 07:50:12 EST 2017
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 at 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 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 Bernsteinnic at 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
>>
> ----
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: boutilpj.vcf
Type: text/x-vcard
Size: 286 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20171216/3113d91e/attachment.vcf>
More information about the Info-cyrus
mailing list