i cant recreate the problem with imapflags. make sure in your config you have imapflags set to true in sieverules_allowed_actions.
The disappearing slash fix works fine - thanks. I found another bug:
With imapflags when editing a saved rule, the filter action "Mark message as" is not preselected (it's always Move message to, which is the first one).
i cant recreate the problem with imapflags. make sure in your config you have imapflags set to true in sieverules_allowed_actions.
Roundcube Patches: Sieverules, SpamAssassin Prefs, and more…
The action is enabled (I created the rule with sieverules):
------------------------------ snip ------------------------------
...
$rcmail_config['sieverules_allowed_actions'] = array(
'fileinto' => TRUE,
'vacation' => TRUE,
'reject' => FALSE,
'redirect' => FALSE,
'keep' => TRUE,
'discard' => TRUE,
'imapflags' => TRUE,
'notify' => FALSE,
'stop' => TRUE
);
...
------------------------------ snip ------------------------------
And a example file looks like this:
------------------------------ snip ------------------------------
## Generated by RoundCube Webmail SieveRules Plugin ##
require ["fileinto","imap4flags"];
# rule:[foo]
if allof (header :contains "X-List" "foo")
{
fileinto "INBOX.foo";
setflag "\\Seen";
stop;
}
------------------------------ snip ------------------------------
thanks for the examples. I have tied them with both the repo and released versions of the plugin and i cannot see any problem. sorry but i dont know what else to tell you.
Roundcube Patches: Sieverules, SpamAssassin Prefs, and more…
I just recently installed your sieverules plugin and like it very much, so thanks a lot for it!
That said, I think I found a bug in the recent version (from 2010/01/29).
When I configure a new Spam rule in roundcube that tests if X-Spam-Score is >= 10, the following file is generated and then saved by the managesieve daemon:
Notice the escaped \"ge\" comparator.Code:## Generated by RoundCube Webmail SieveRules Plugin ## require ["relational","comparator-i;ascii-numeric"]; # rule:[Spam] if anyof (header :value \"ge\" :comparator "i;ascii-numeric" "X-Spam-Score" "10") { discard; }
sievec throws an error when trying to compile the script, and sieverules itself seems not to be able to re-import the rule, as it just disappears when the Filters screen is reloaded.
The same happens with the "gt" comparator, possibly also others.
Can you reproduce this and if yes, could you tell me where to fix it?
Thank you!
I can't reproduce it. It could be something to do with your PHP settings.
The values for the operators dropdown should be htmlencoded so lets check they are. Please goto the new/edit rule screen and view the source, search for `value &` and you should find them all, if you dont try searching for `value "` and see if that finds them.
If that is ok then double check you have magic_quotes_gpc turned off in your php config (should be done by default in the .htaccess file in the rc root).
Roundcube Patches: Sieverules, SpamAssassin Prefs, and more…
Sieverules works quite fine, but I found an annoying misfeature in NetSieve.php. I know, this is not the sieverules author's concern, but maybe someone has a solution to it. We currently have three frontend machines handling the mailaccounts and NetSieve needs to follow the referrals it gets to e.g. mail1.server.net or mail2.server.net to login to the timsieved. Giving it the correct loginserver by hand it works perfectly, but otherwise I get the following error in the log:
google has only one answer that is not only five years old but also long solved inside NetSieve.php. But that did not fix my problem. Did any of you ran into this problem and could give me a hint?Code:[12-Feb-2010 11:10:22] Connection timed out (145): [12-Feb-2010 11:10:22] Can't follow referral to mail2, The error was= Connection timed out (5):
Kind regards
Ruediger
I'm not sure if it helps but since version 1.2 you can use %h instead of an actual hostname and then what ever imap host RC is connected too will be used.
Roundcube Patches: Sieverules, SpamAssassin Prefs, and more…
setting "sieverules_host" to %h does not solve the problem. But I got somewhat closer to a solution: editing Net_Sieve.php and inserting three new lines at the start of authPLAIN() makes it work:
This is the whole function authPLAIN(). The three new lines are the definitions of the array $this->_data[] with $user, $pass and port 2004. The problem seems to be that the first call of sendCmd is done with $user, $pass, $port and so on, but the second one when following the given referral (inside the function doCmd() ) it uses $this->data['host'], $this->data['user'] and so on. This array is unset at that very moment, so the connect fails.Code:function _authPLAIN($user, $pass , $euser ) { $this->_data['user']=$user; $this->_data['pass']=$pass; $this->_data['port']='2004'; if ($euser != '') { $cmd=sprintf('AUTHENTICATE "PLAIN" "%s"', base64_encode($euser . chr(0) . $user . chr(0) . $pass ) ) ; } else { $cmd=sprintf('AUTHENTICATE "PLAIN" "%s"', base64_encode( chr(0) . $user . chr(0) . $pass ) ); } return $this->_sendCmd( $cmd ) ; }
It seems to be a bug in Net_Sieve.php that has never been discovered before since noone used the script to connect to a referred host. Maybe this once worked with PHP 4 when more global variable definitions were still common.
Kind regards
Ruediger
There are currently 1 users browsing this thread. (0 members and 1 guests)