Author Topic: Sieverules (managesieve) plugin  (Read 212862 times)

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Sieverules plugin
« Reply #330 on: August 24, 2011, 02:53:42 AM »
Quote
Using RoundCube 0.6beta here, just upgraded it from 0.5.2 to 0.6beta with the help of bin/installto.sh script. Is there any information I can provide you that can be useful ?

as i said its nothing to do with the plugin. may be you didnt copy some files when doing the update to 0.6b or something.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline osterhase

  • Jr. Member
  • **
  • Posts: 19
Sieverules plugin
« Reply #331 on: August 25, 2011, 11:01:21 AM »
Hey John,

thanks again. Did not come to my mind at first to do it with an if-statement but it worked out fine. Thanks for that!

But we came across another problem:

Code: [Select]
$sieve->getScript($args['ruleset']);

Gets the current content of roundcube.sieve (and not the new content that is written). F.e. if the user has not defined (or deleted) all filters the roundcube.sieve content is:

/* empty script */

If a new filter is created the content that is passed by

Code: [Select]
$sieve->getScript($args['ruleset']);

is /* empty script */ but the new roundcube.sieve contains the newly created filter-rule (but is obviously overwritten by ispconfig).

Can you confirm that behavior? Any suggestions on that?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Sieverules plugin
« Reply #332 on: August 26, 2011, 03:07:54 AM »
are you still using the old example? the raw script is now passed as an argument, check the updated example from the other post.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline osterhase

  • Jr. Member
  • **
  • Posts: 19
Sieverules plugin
« Reply #333 on: August 26, 2011, 03:11:29 AM »
Missed that one sorry - gonna check it out.

Offline osterhase

  • Jr. Member
  • **
  • Posts: 19
isp_sieverules - plugin completed
« Reply #334 on: August 26, 2011, 07:42:09 AM »
Heya,

problems solved and it runs like a charme - thanks again, you really got me through it. We had a bit of difficulties because our servers run the stable version (0.5) so we had to do a couple of changes in the sieverules.php - but as soon as the stable version of 0.6 is out we could use this. Attached is the actual plugin which enables the communication between the sieverules-plugin and ispconfig. It's heavily based on John's example file. It actually should work also in the 0.6beta version.

Thanks!

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Sieverules plugin
« Reply #335 on: August 28, 2011, 07:26:35 AM »
osterhase please note in the latest revision I have changed the name hook to sieverules_save (dropped the d) this is because it is run before the save has completed so its a more accurate name. sorry about all the changes this week, this should be the last one.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline osterhase

  • Jr. Member
  • **
  • Posts: 19
Sieverules plugin
« Reply #336 on: August 29, 2011, 05:50:03 AM »
Hey John - thanks for the information. I've updated the plugin. Furthermore I was able to get rid of the db_function which makes the plugin easier to install. File attached.

Best regards

Offline mahdi75

  • Newbie
  • *
  • Posts: 1
Problem
« Reply #337 on: August 29, 2011, 06:31:13 PM »
Hello!

I'm new to roundcube.
I want to use Roundcube webmail client on my shared hosting account, and my mail server is Horde or MailEnable (I can choose one of them)

I have installed RoundCube successfully and it's great.
but I don't know how to add special rules for message Header and Title and text... ManageSieve don't add new rule, and new rule button of Sieverules plugin not work...


Is there anything needed to install on server? or how can I use it?



Please help!!

Best Regards!
Mahdi

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Sieverules plugin
« Reply #338 on: August 30, 2011, 03:20:32 AM »
Hi, please bare in mind that i have no idea about your setup so simply saying
Quote
and new rule button of Sieverules plugin not work...
is totally useless. there is almost ways some form a feedback to point you in the right direction may be a message in a red box at the top of the screen or a javascript error or something in the rc error log. i would hazard a guess that since neither of the plugins work you have failed to configure them to connect to your managesieve server.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline naveen28187

  • Newbie
  • *
  • Posts: 0
Sieverules plugin
« Reply #339 on: August 31, 2011, 07:23:20 AM »
Yes,this is quite possible

Offline alavaliant

  • Newbie
  • *
  • Posts: 6
one bug and one minor change request
« Reply #340 on: September 06, 2011, 06:01:37 PM »
Hi,

I've found a bug in sieverules - one of my users keeps putting spaces on the end of their folder names.   (Can't do that in roundcube it strips trailing spaces, need to use a client like thunderbird).   If a folder ends with a space even though it's selectable in sieverules as a folder to filter into if you select it and press save the folder selection snaps back to Inbox.   Checking the html source of the page the space is in the combobox html so it looks like the failure point is in the code that does the actual save.   I'd assume the space is being stripped from the end of the folder name in some function stopping the folder from being found correctly while saving.      A minor deal but I thought I'd mention it in case it's not too hard to fix since I can't seem to stop that user from ending folder names with spaces and then getting confused as to why they can't select them to filter into.

There I have some feedback on the 'out of office message'  rule layout,   I think it would make more sense if 'advanced options' was unticked by default.   My users don't need to see those options and find them slightly confusing - as it stands the ability to hide some options to me doesn't really add up - you have to hide them after they show up but that doesn't save and to keep them hidden you'd need to hide them again each time you load the rule back up.  (would anybody actually bother doing that each time they edit the rule?)      I had a go at writing a patch to have advanced options unticked by default,  I worked out where to do it when loading a previously saved rule but couldn't work out where to alter the javascript for when a new rule is created.     Any chance you'd consider making the advanced options tick box be unticked by default when creating out of office messages?

Thanks
-J

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Sieverules plugin
« Reply #341 on: September 07, 2011, 01:26:35 AM »
Hi,

You are correct whitespace is trimmed off the folder name when the rule is saved. If you wanted to stop it doing that then search for the line
Code: [Select]
$folder = $this->_strip_val($folders[$idx]);. I guess removing it wouldn't make that much difference since the values are all pre filled any way.

The advanced options box in the out of office message is unticked by default, its only ticked if the plugin is configued to show them by default or of your rule uses them.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline alavaliant

  • Newbie
  • *
  • Posts: 6
Sieverules plugin
« Reply #342 on: September 08, 2011, 03:29:04 AM »
Quote from: JohnDoh;36475
Hi,

You are correct whitespace is trimmed off the folder name when the rule is saved. If you wanted to stop it doing that then search for the line
Code: [Select]
$folder = $this->_strip_val($folders[$idx]);. I guess removing it wouldn't make that much difference since the values are all pre filled any way.


Thank you,  changing that line to
Code: [Select]
$folder = $folders[$idx];

fixes the bug in my testing and so far I'm not finding any negative side effects.   Think about it this may help me with other future cases as well.  I know some other users at my company tend to put spaces at the start of folder names to manually force them to be indented in their folder list so I suspect such a folder name would trigger the same bug if selected as a folder to filter into. (if _strip_val removes whitespace at both ends of the string like I assume?)

Quote from: JohnDoh;36475
Hi,


The advanced options box in the out of office message is unticked by default, its only ticked if the plugin is configued to show them by default or of your rule uses them.


Ahh I never noticed that before,   I've got a cyrus server so I've always had
Code: [Select]

// Force the :addresses line to always be added to new vacation rules
// Some sieve setups require that the :address part of a vacation rule is always present for the message to be sent
// Cyrus setups need this to option set to true
$rcmail_config['sieverules_force_vacto'] = TRUE;


which now I trace though the code I see changes how advanced options are shown.   I happen to also have
Code: [Select]

$rcmail_config['sieverules_limit_vacto'] = TRUE;

though so the address option isn't much use as the users only have one option and we want it shown so now I see how the code controls it I'll write a little patch for myself so those checks always end up with the advanced options set off.


Thanks for the help.
-J

Offline literakl

  • Newbie
  • *
  • Posts: 2
Re: Sieverules (managesieve) plugin
« Reply #343 on: April 24, 2013, 04:05:45 AM »
Hi,

I miss "time condition" feature of this great plugin. E.g. I plan vacancy, so I create a filter to send out of office message for every new person. But I have to activate it last minute I leave the office and I must deactivate it, when I return. In fact I deactivate it, once my colleagues remind me. It would be great to have two filter's input fields - valid from and valid until.

Thanks

Leo

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: Sieverules (managesieve) plugin
« Reply #344 on: April 24, 2013, 09:05:31 AM »
there is already the arival date option for tests so long as your sieve implementation supports the date extension.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…