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

Offline timtraver

  • Jr. Member
  • **
  • Posts: 36
Sieverules plugin
« Reply #60 on: July 28, 2009, 09:18:07 PM »
JohnDoe,
 
ok, let me update that previous post...
 
It appears that you were checking on the address portion of that field, so maybe it would actually be better to have it like this :
 
'from' => 'header::From',
 
so that it checks the entire header field named From for a string.
 
Also, although you have individual entries for each of the To, Cc and Bcc, I know that you can combine them into a singal rule when writing out the sieve rule that looks something like this :
 
address :contains ["To", "Cc", "Bcc"] "me@address.com"So, maybe in your header selection, you could somehow put that labeled as the option of "Any Recipient". The same may go for "Any Sender"?Tim.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Sieverules plugin
« Reply #61 on: July 29, 2009, 03:33:01 AM »
Quote from: fgh;20301
roundcubemail-0.3-RC1         sieverules.0_3b

timtraver is right, I suggest you try the sieverules.0_3rc1 version and see if the problem still occurs

Quote from: timtraver;20304
I think you actually meant that field to be a comparator of the "From" field so that when the managesieve writes out the rule, it uses the "From" header, as I do not believe there is a "Sender" header in most emails.

i have had discussions about this before and different people think it should do different things. thats why i made it really easy to change, those headers are set in an array at the top of sieverules.php and you can make it what ever you want. :)

Quote from: timtraver;20306
So, maybe in your header selection, you could somehow put that labeled as the option of "Any Recipient". The same may go for "Any Sender"?Tim.

this sounds interesting, i shall stick it on my list of things to look at

also the thing about the vacation subject message, yea i knew about that. I think I changed my mind half way though and then forgot to take it out everywhere - it was fixed already in rc1 but thanks for letting me know.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline fms

  • Jr. Member
  • **
  • Posts: 13
ManageSieve howto for RoundCube??
« Reply #62 on: September 01, 2009, 03:19:17 PM »
Hi All.

I'm trying to understand how to put sieve/managesieve in action on my server.

I'm running FreeBSD + PostFix + Dovecot + RoundCube

I activated managesieve plugin, but when I try to access it from RC, I receive the error: cant connect to managesieve server on port 2000.
Francisco

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Sieverules plugin
« Reply #63 on: September 02, 2009, 03:12:26 AM »
hi,

you need to make sure managesieve is running on your server and that any firewall is allowing connections to it, try telnetting from the machine running RC to your mail server on port 2000 or may be check you dovecot config make sure managesieve isnt running on a different port.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Rando

  • Newbie
  • *
  • Posts: 7
Sieverules plugin
« Reply #64 on: September 02, 2009, 04:57:24 AM »
Hello,
it seems that the vacation filter isn't created with a default "addresses" value. the aliases help seems to say it should use the "main address".

Is there a way to automatically add the default identity email address or automatically check all aliases (from the advanced options) for the vacation filter to work out of the box ?
(without "addresses", sieve won't use the filter)

thank you for this great plugin,
R.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Sieverules plugin
« Reply #65 on: September 02, 2009, 06:06:19 AM »
The address option is optional, I checked it with my sieve just now and according to the RFC as well. what imap/sieve server are you using?

If you want to make them all checked by default its easy enough, you'll find where they are generated in sieverules.php around line 1294,

Code: [Select]
$curaddress = in_array($sql_arr['email'], $vacto_arr) ? $sql_arr['email'] : "";
and just change it to

Code: [Select]
$curaddress = $sql_arr['email'];
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Rando

  • Newbie
  • *
  • Posts: 7
Sieverules plugin
« Reply #66 on: September 02, 2009, 10:47:21 AM »
Quote from: JohnDoh;20892

Code: [Select]
$curaddress = $sql_arr['email'];

thanks, it works.

Quote from: JohnDoh;20892
The address option is optional, I checked it with my sieve just now and according to the RFC as well. what imap/sieve server are you using?


vacation fails to work without "addresses" with
dovecot 1.2.4
sieve (not cmu) 0.1.11 or 0.1.12

sieve 0.1.12 is truly interesting with its implementation of a "date" filter rule

Offline phraktyl

  • Newbie
  • *
  • Posts: 3
Not importing default_file
« Reply #67 on: September 11, 2009, 06:27:30 PM »
First, let me say that Sievefules has been great! I've got it to where I'm able to edit my rules without any problems and the setup has been straightforward so far. Well done!

However, I'm having a problem getting it to import the default_file when a user doesn't have any previous rules setup.

Here's the relevant portion of my setup:

$sieverules_config['default_file'] = '/home/vmail/globalsieverc';
$sieverules_config['auto_load_default'] = TRUE;


I know the file exists and is readable, as it's the global sieve filter and it's processing other users' email. I've even used my own sieve file build with Sieverules to create the global file so it shouldn't have any issues importing it.

I'm not finding any logs that would be useful in figuring out what the hang-up is. dovecot.log shows the managesieve portion but nothing is showing up in the Roundcube errors file.

What am I missing?

Thanks

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Sieverules plugin
« Reply #68 on: September 12, 2009, 03:48:59 AM »
Thanks! I'm glad you like the plugin.

Check the users .sieve folder on the server and make sure there is no roundcube.sieve file in there, the default file is only coppied if the user doesnt have a roundcube.sieve file. If they have simply deleted their existing rules and have an empty rule file then it will not be coppied.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline phraktyl

  • Newbie
  • *
  • Posts: 3
Sieverules plugin
« Reply #69 on: September 14, 2009, 12:28:27 AM »
Just checked. The mailboxes are virtual so I tried it both without the seive directory created at all, and with an empty directory. In both cases the directory showed up with a ./tmp subdirectory but no default rules.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Sieverules plugin
« Reply #70 on: September 14, 2009, 09:24:17 AM »
It is working for me, so I am not quite sure what to suggest. Best thing is probably for you to do a bit of debugging and then we can see at what step it fails. You can find the code which coppies the default rule file in sieverules.php around line 208.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline phraktyl

  • Newbie
  • *
  • Posts: 3
Sieverules plugin
« Reply #71 on: September 14, 2009, 04:16:17 PM »
Heh. After some in-depth troubleshooting, I figured out that the main issue was PEBKAC.

Due to what I'm attributing as major cerebral flatulation, all of the checking I did was to ensure that the global sieve file was readable by the dovecot user. Astute readers will note that this by no means indicates whether said file is readable by the web server user. *facepalm*

Now that the file is *really* readable by Sieverules, the default file is imported properly. The only issue I see is that if the roundcube.sieve file doesn't exist, it gets imported, but the newly-imported rules aren't editable (or selectable) until I load the page a second time.
« Last Edit: September 15, 2009, 02:17:23 AM by phraktyl »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Sieverules plugin
« Reply #72 on: September 15, 2009, 03:23:22 AM »
I noticed that too, something is wrong there. I will look into it.

D'OH I think i have fixed it, you can see what has to change here http://github.com/JohnDoh/RoundCube-Plugin-SieveRules-Managesieve/commit/f6d27bd4d114757808852f63bfd92fdd189e2996
« Last Edit: September 15, 2009, 03:33:27 AM by JohnDoh »
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline sziki

  • Newbie
  • *
  • Posts: 2
managesieve_default
« Reply #73 on: September 15, 2009, 09:35:29 AM »
Hi All!

The 'managesieve_default' variable does not work for me.
I have a global sieve script which handle the spams but it is not included when I create a user script with roundcube. The whole path is world-readable, the filename does not contain any special chars neither dot. I re-generated the global script with roundcube managesieve plugin so it is in "roundcube-like" format with labels, but it does not help.
How should it work? Please advise!

The managesieve plugin works, anyway. This is roundcube 0.3-stable on Debian Lenny Dovecot 1.1.13 from backports. No errors in logs.

Thanks!

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Sieverules plugin
« Reply #74 on: September 15, 2009, 09:49:02 AM »
are you using the plugin from RoundCube Plugins or the one that came with 0.3s? The config variable in sieverules is called default_file not managesieve_default?

This thread is about the sieverules plugin, if you are talking about the one which came with 0.3s then please use a new thread to avoid confusion.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…