Author Topic: Sieverules error.  (Read 8863 times)

Offline Jacekalex - Poland

  • Newbie
  • *
  • Posts: 6
Sieverules error.
« on: November 08, 2009, 04:17:09 PM »
Good morning.

Soory - I'm not speak engklish.
this text was translate with translate.google.

   I have a problem with the module sieverules - function messagevacation
Code: [Select]
$ label [ 'messagevacation'] = 'Out of Office Message';

This rule defines when an editor - a record is correct, jesat also correctly saved to the server magnasieve - to file.


Code: [Select]
root @ localhost: / var / lib / vpopmail / domains / example.com / user # cat. dovecot.sieve
# # Generated by RoundCube Webmail SieveRules Plugin # #
require [ "vacation", "fileinto"];
if anyof (size: over 1)
# Rule: [Rules1]
(
vacation
: 7 days
: subject "I'm on vacation."
: mime text:
Content-Type: text / plain; charset = ISO-8859-2

Welcome

I'm on vacation.
I am returning 30 September.

Yours
.
;
)
root @ localhost: / var / lib / vpopmail / domains / example.com / user #
- entry is correct.

When I edit Rule2 - and saved the changes in Rule2 - Rule1 entry is automatically changed - gone in a message recorded Rule1
Code: [Select]
root @ localhost: / var / lib / vpopmail / domains / example.com / user # cat. dovecot.sieve
# # Generated by RoundCube Webmail SieveRules Plugin # #
require [ "vacation", "fileinto"];
# Rule: [Rules1]
if anyof (size: over 1)
(
vacation
: 7 days
: subject "I'm on vacation."
: mime text:
Content-Type: text / plain;


.
;
)
# Rule: [Rules2]
elsif anyof (header: contains "X-Spam-Status" "yes")
(
fileinto "Spam";
)
root @ localhost: / var/lib/vpopmail/domains/example.com/user #


Where is the entry - text messages vacation?
After editing Rules2 - the entry of Rules1 been changed, although it was well-saved the file.

How do I fix this error?

Is there a version of sieverules - which is devoid of this error?

Programs: RoundCube Webmail IMAP Client - Version 0.3.1-20091031
            sieverules: @ version 1.3

Managesieve server dovecot:
Code: [Select]
dpkg-l | grep dovecot
ii dovecot-common 1:1.1.11-0ubuntu11 secure mail server that supports mbox and maildir mailbox
ii dovecot-imapd 1:1.1.11-0ubuntu11 secure IMAP server that supports mbox and maildir mailbox


Smtp server: Qmail & Vpopmail.

Operating System - Ubuntu 9.10 Karmic Koala
I noticed the same error in the operating systems Debian Lenny and Gentoo-Hardened)

Yours
:(

PS: Polish translation to sieverule locales - attachement. - My scribble ;)+
« Last Edit: March 04, 2010, 01:28:13 AM by Jacekalex - Poland »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Sieverules error.
« Reply #1 on: November 09, 2009, 02:08:42 PM »
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Jacekalex - Poland

  • Newbie
  • *
  • Posts: 6
Sieverules error.
« Reply #2 on: November 09, 2009, 10:13:13 PM »
Thanks

Partial success - the message is properly maintained, but it automatically changes the character encoding in Subject.
Effect - if a topic is characteristic of Polish letters - be changed to some bushes.

Examples:
Code: [Select]
## Generated by RoundCube Webmail SieveRules Plugin ##
require ["vacation","reject"];
# rule:[odpow]
if anyof (true)
{
vacation
:days 1
[b]:subject "ĄĘŚĆŻŹŁÓ-ąęśćżźłó"[/b] # characteristic points of the Polish language
"ĄĘŚĆŻŹŁÓ-ąęśćżźłó";
}
# rule:[Spam]
elsif anyof (header :contains "X-Spam-Status" "yes")
{
discard;
}
correctly - before modifying the rules Spam

Code: [Select]
## Generated by RoundCube Webmail SieveRules Plugin ##
require ["vacation","reject"];
# rule:[odpow]
if anyof (true)
{
vacation
:days 1
[b]:subject "ĄĘŚĆŻŹŁÓ-ąęśćżźłó"[/b] # result of the modification rules Spam
"ĄĘŚĆŻŹŁÓ-ąęśćżźłó";
}
# rule:[Spam]
elsif anyof (header :contains "X-Spam-Status" "yes")
{
reject text:
Dear  Spamers!
Good bye!
.
;
}
bad coding in Subject -- after modify the rules of Spam.

In the Polish language of 8 such distinctive signs - it is very difficult to write about the Subject passing 8 from 34 letters.
(And what the Chinese have to say :ticked:)


But the content is preserved - well.

We thank you once more!

Yours
:)
« Last Edit: November 09, 2009, 11:52:09 PM by Jacekalex - Poland »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Sieverules error.
« Reply #3 on: November 10, 2009, 04:51:00 AM »
You can fix the error in the UI by commenting out line 521 in rcube_sieve_script.php, the decode isn’t needed since the string is never encoded. It won’t really help though since last time I checked Dovecot Sieve doesn’t properly encode subjects before it sends the vacation message - a Dovecot sieve bug, nothing to do with the plugin.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Jacekalex - Poland

  • Newbie
  • *
  • Posts: 6
Sieverules error.
« Reply #4 on: November 10, 2009, 05:51:25 PM »
Thanks

I'm  commenting out line 521 in rcube_sieve_script.php - and everything is ok.

But I have a little question:

It is - from the dovecot-sieve is an error - possible.

Is it possible? -  to encode the Subject in this format:
Example
Code: [Select]
Subject: =?UTF-8?q?Odpowied=C5=BA_na_post_=27Konfiguracja_Apache=2E_Dost=C4=99p_z_zewn=C4=85trz=2E=27?=

such a format - used in emails is resistant to the various anomalies associated with encoding.
All popular servers and smtp imap pop3 (Postfix, Qmai, Dovecot, Courier, Exim ...) accept this format - but in the literal notation am not even a single character - which would not be present in the English alphabet (ISO_8859-1).
Also, all popular email programs - Thunderbird, Outlook, and others.
risk of damage to this record because it is minimal - that 99% of all the problems of encoding letters concerns the characteristic of the national character - which in the example record is not - despite the Subject - characteristic contains national characters.

After that-when the editing Subject vacation and save - it's all about


When testing - roundcube.sieve file saved in location / var / lib / vpopmail / domains / example.com / admin /sieve file  - charset is about .
When you edit this file by thunderbird-sieve - it's all about (good)

Instead, when you edit another - any rule in sieverules plugin - then comes a coding error - suddenly and without reason.

It is a strange server error dovecot sieve - which does not change the encoding in the file generated by avelsieve - squirrelmail-plugin does not change   encoding when editing in thunderbird-sieve, and changing-encoding when editing is done in sieverules.
Change (corruption) Subject coding is directly linked to cooperation dovecot-sieverules, but in my opinion-saving Subject  so - as in email style (=>> example)- can solve the problem for all languages.

Email Subject in this foormat (UTF-8 ) -    from my experience - I have friends in Ukraine and in Russia - a very different character set - all is ok

I did an experiment - I sent an e-mail - to the Japanese mailing list - came a few e-mails - properly (so it seems to me-I do not know Japan Language :) ) - my Thunderbird (LC_ALL = pl_PL.UTF-8 ) correctly displays the Russian and Japanese fonts.
I am learning to program - may - have reached such a level - to write their own programs - then be happy to help in the development of RoundCube - for the moment the first time Install the program - it is very good - but that does not mean - that there could be even better :)

But how to do it in sieverules?

Yours
:)
« Last Edit: November 10, 2009, 09:07:29 PM by Jacekalex - Poland »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Sieverules error.
« Reply #5 on: November 11, 2009, 02:11:14 PM »
yea as i said in the tests i did awhile ago encoding the subject made no difference because of a problem with dovecot sieve how ever a very quick test with some polish characters suggests that might have been resolved. I need to do more tests before I know for sure but if you want to test too then look in rcube_sieve_script.php and you'll find some mb_encode_mimeheader and mb_decode_mimeheader lines which are commented out, they encode/decode the subject.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Jacekalex - Poland

  • Newbie
  • *
  • Posts: 6
Thanks
« Reply #6 on: November 11, 2009, 03:15:22 PM »
Thank you.

At this time sieverules works properly.

My question (actually suggested)- the encoding of Subject - Format:
Example:
Code: [Select]

Format:UTF8
Subject: =?UTF-8?q?Odpowied=C5=BA_na_post_=27Konfiguracja_Apache=2E_Dost=C4=99p_z_zewn=C4=85trz=2E=27?=

Format: ISO-8859-2
Subject: =?ISO-8859-2?Q?Pomoc_dotycz=B1ca_has=B3a_Google?=


This format is resistant to all the trouble of encoding Subject - all programs that support e-mail (MTA, MDA, MUA) and complies with all the character encoding standards in the world.
I am not thinking only of Polish coding, but all the standards - including Chinese, Japanese, Korean, Arabic, Russian, Polish and many others.

RoundCube it reads correctly e Subjects in this format.

This is a proposal for the future Sieverules - Roundcube plugin, - for actually and next versions.

My problem of sieverules   is solved.

Thank you for your help.

Yours :)
« Last Edit: November 12, 2009, 11:11:41 AM by Jacekalex - Poland »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Sieverules error.
« Reply #7 on: November 12, 2009, 02:48:04 AM »
hi please ingore my previous message, here is a better explaination....

encoding short subjects works fine however if the encoded string is longer than a certain length then it must be split over multiple lines (http://www.faqs.org/rfcs/rfc2047.html) dovecot sieve (or atleast my version 1.0.15) cannot handle the subject if it is over multiple lines and so the email it sends out has an unreadable subject.

so in short the plugin has the capability to encode the subject but doesnt do it by default since the encoded subject is not correctly handeled.
« Last Edit: November 12, 2009, 01:20:36 PM by JohnDoh »
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Jacekalex - Poland

  • Newbie
  • *
  • Posts: 6
Further problem occurs when sending a vacation (in $ subject)
« Reply #8 on: November 12, 2009, 04:11:09 PM »
Edit:
Hi
the problem with character encoding is in the topic further messages generated by the function of the vacation module sieverules
In the configuration file (generated by the module sieverules):
Code: [Select]
vacation
:days 0
:subject "[B]ĄĘŚĆŹŻŁÓ - ąęśćżźłó[/B]!"
text:.....
in the mail - which is generated and sent
Code: [Select]
Subject: [B]�?�?�?�?ŹŻ�?�? - �?�?�?�?żź�?ó![/B]
I have two questions:
1.How do I solve this problem by the end of?
2. How to apply to all messages generated by the module sieverules, (I mean the entire message - the headers and content) php function iconv_mime_encode?
example for subject:
Code: [Select]
$subjecttext = "zażółć gęślą jaźń";
$settings = array(
"scheme" => 'B',
"input-charset" => 'UTF-8');

$subject = iconv_mime_encode("Subject", $subjecttext, $settings);
?>
In my opinion, apply in sieverules functions iconv-mime-encode,
End all the problems with each, a worldwide character encoding,
time and neatly.

Only - how to do it?

OLD:
Ok. - from what I see - it works - the Linux mail programs to work correctly - see the - how that mail from dovecot sieve cope with MS Outlook - Windows XP (still the most popular system in Poland) - where the default encoding scheme - is CP1250 (for the Polish site) - do not use this system - but the server that the creation - and webmail too - must work with its clients with WinXP SP2/SP3 and MS Outlook.

If there is a problem with the encoding of the subject - I look for a way - to display the Subject sieverules properly - but save a format - as in the examples - with a fixed encoding.

This is 100% possible - in RoundCube this mechanism works when displaying e'mails - is there anything about.
I test versions of Dovecot 1.1.11 in Ubuntu 9.10 , 1:1.0.15 in Debian Lenny, and 1.2.6 in Gentoo-Hardened 2008.
   
By contrast - when the vacation - the version - which has no amendments - which was mentioned in this topic - in previous posts - I entered in the format Subject: =? UTF-8 q? Answer = C5 = BA_na_post_ ... - a problem causing the error coding change Subject did not show any change in the so-coded theme.

If the MS Outlook (and other programs in Windows) will properly deal with emails from vacation, it will not be any problem.

In this day in sieverules is all about.  

Topic is solved.

Thank you.

Yours
:)
« Last Edit: March 04, 2010, 01:48:37 AM by Jacekalex - Poland »

lambada

  • Guest
Sieverules error.
« Reply #9 on: December 02, 2009, 02:42:57 AM »
It is a strange server error dovecot sieve - which does not change the encoding in the file generated by avelsieve - squirrelmail-plugin does not change encoding when editing in thunderbird-sieve, and changing-encoding when editing is done in sieverules.
Change (corruption) Subject coding is directly linked to cooperation dovecot-sieverules, but in my opinion-saving Subject so - as in email style (=>> example)- can solve the problem for all languages.