[packaging] Branch 'ucs/3.1/kolab-2.3' - 5 commits - bin/cleandb.sh bin/decrypt.sh bin/indexcontacts.sh bin/installto.sh bin/moduserprefs.sh bin/msgimport.sh bin/updatecss.sh bin/updatedb.sh CHANGELOG composer.json-dist config/main.inc.php.dist debian/changelog debian/patches index.php INSTALL installer/check.php installer/config.php installer/rcube_install.php installer/test.php plugins/acl plugins/archive plugins/enigma plugins/help plugins/managesieve plugins/markasjunk plugins/newmail_notifier plugins/new_user_dialog plugins/password plugins/userinfo plugins/vcard_attachments plugins/virtuser_query plugins/zipdownload program/include program/js program/lib program/localization program/steps skins/classic skins/larry

Christoph Wickert wickert at kolabsys.com
Wed Jul 3 19:29:49 CEST 2013


 CHANGELOG                                                                      |   59 +
 INSTALL                                                                        |    8 
 bin/cleandb.sh                                                                 |    5 
 bin/decrypt.sh                                                                 |    8 
 bin/indexcontacts.sh                                                           |    9 
 bin/installto.sh                                                               |    6 
 bin/moduserprefs.sh                                                            |    2 
 bin/msgimport.sh                                                               |    7 
 bin/updatecss.sh                                                               |  122 ++
 bin/updatedb.sh                                                                |   20 
 composer.json-dist                                                             |   16 
 config/main.inc.php.dist                                                       |    2 
 debian/changelog                                                               |    6 
 debian/patches/0001-Extend-fetched-header-block-to-32K-require-one-of-su.patch |   36 
 debian/patches/correct_install_path.patch                                      |    4 
 debian/patches/series                                                          |    1 
 index.php                                                                      |    6 
 installer/check.php                                                            |   12 
 installer/config.php                                                           |   11 
 installer/rcube_install.php                                                    |   12 
 installer/test.php                                                             |   10 
 plugins/acl/acl.php                                                            |    5 
 plugins/acl/localization/cs_CZ.inc                                             |    2 
 plugins/acl/localization/et_EE.inc                                             |    2 
 plugins/acl/localization/fi_FI.inc                                             |    6 
 plugins/acl/localization/gl_ES.inc                                             |   50 
 plugins/acl/localization/it_IT.inc                                             |    6 
 plugins/acl/localization/ko_KR.inc                                             |  102 +-
 plugins/acl/localization/lt_LT.inc                                             |    2 
 plugins/acl/localization/ro_RO.inc                                             |   24 
 plugins/acl/localization/zh_CN.inc                                             |   28 
 plugins/acl/localization/zh_TW.inc                                             |    4 
 plugins/acl/skins/classic/acl.css                                              |    4 
 plugins/acl/skins/larry/acl.css                                                |   24 
 plugins/archive/localization/az_AZ.inc                                         |   18 
 plugins/archive/localization/bg_BG.inc                                         |   18 
 plugins/archive/localization/ca_ES.inc                                         |   18 
 plugins/archive/localization/cs_CZ.inc                                         |   18 
 plugins/archive/localization/cy_GB.inc                                         |   18 
 plugins/archive/localization/da_DK.inc                                         |   18 
 plugins/archive/localization/el_GR.inc                                         |   18 
 plugins/archive/localization/es_AR.inc                                         |   18 
 plugins/archive/localization/fr_FR.inc                                         |    6 
 plugins/archive/localization/gl_ES.inc                                         |   18 
 plugins/archive/localization/he_IL.inc                                         |   18 
 plugins/archive/localization/hu_HU.inc                                         |   16 
 plugins/archive/localization/ko_KR.inc                                         |   20 
 plugins/archive/localization/lt_LT.inc                                         |   18 
 plugins/archive/localization/pt_BR.inc                                         |   10 
 plugins/archive/localization/ro_RO.inc                                         |    6 
 plugins/archive/localization/sl_SI.inc                                         |   18 
 plugins/archive/localization/tr_TR.inc                                         |   18 
 plugins/archive/localization/zh_CN.inc                                         |    6 
 plugins/archive/localization/zh_TW.inc                                         |   18 
 plugins/enigma/enigma.php                                                      |    3 
 plugins/enigma/lib/enigma_engine.php                                           |   18 
 plugins/help/localization/ko_KR.inc                                            |    2 
 plugins/help/localization/zh_CN.inc                                            |    2 
 plugins/managesieve/localization/az_AZ.inc                                     |    9 
 plugins/managesieve/localization/be_BE.inc                                     |    3 
 plugins/managesieve/localization/bg_BG.inc                                     |    3 
 plugins/managesieve/localization/bs_BA.inc                                     |    3 
 plugins/managesieve/localization/ca_ES.inc                                     |   39 
 plugins/managesieve/localization/cs_CZ.inc                                     |    5 
 plugins/managesieve/localization/cy_GB.inc                                     |    3 
 plugins/managesieve/localization/da_DK.inc                                     |   31 
 plugins/managesieve/localization/de_CH.inc                                     |    3 
 plugins/managesieve/localization/de_DE.inc                                     |    3 
 plugins/managesieve/localization/el_GR.inc                                     |  211 ++--
 plugins/managesieve/localization/en_GB.inc                                     |    3 
 plugins/managesieve/localization/eo.inc                                        |    3 
 plugins/managesieve/localization/es_AR.inc                                     |    3 
 plugins/managesieve/localization/es_ES.inc                                     |    3 
 plugins/managesieve/localization/et_EE.inc                                     |    5 
 plugins/managesieve/localization/fa_IR.inc                                     |    3 
 plugins/managesieve/localization/fi_FI.inc                                     |    5 
 plugins/managesieve/localization/fr_FR.inc                                     |   13 
 plugins/managesieve/localization/gl_ES.inc                                     |  143 +-
 plugins/managesieve/localization/he_IL.inc                                     |    3 
 plugins/managesieve/localization/hr_HR.inc                                     |    3 
 plugins/managesieve/localization/hu_HU.inc                                     |    3 
 plugins/managesieve/localization/hy_AM.inc                                     |    3 
 plugins/managesieve/localization/ia.inc                                        |    3 
 plugins/managesieve/localization/id_ID.inc                                     |    3 
 plugins/managesieve/localization/it_IT.inc                                     |    3 
 plugins/managesieve/localization/ja_JP.inc                                     |    3 
 plugins/managesieve/localization/ko_KR.inc                                     |  241 ++--
 plugins/managesieve/localization/lt_LT.inc                                     |    5 
 plugins/managesieve/localization/lv_LV.inc                                     |    3 
 plugins/managesieve/localization/ml_IN.inc                                     |    3 
 plugins/managesieve/localization/mr_IN.inc                                     |    3 
 plugins/managesieve/localization/nb_NO.inc                                     |    3 
 plugins/managesieve/localization/nl_NL.inc                                     |    7 
 plugins/managesieve/localization/nn_NO.inc                                     |    3 
 plugins/managesieve/localization/pl_PL.inc                                     |    3 
 plugins/managesieve/localization/pt_BR.inc                                     |    3 
 plugins/managesieve/localization/pt_PT.inc                                     |    3 
 plugins/managesieve/localization/ro_RO.inc                                     |    5 
 plugins/managesieve/localization/ru_RU.inc                                     |    3 
 plugins/managesieve/localization/si_LK.inc                                     |    3 
 plugins/managesieve/localization/sk_SK.inc                                     |    3 
 plugins/managesieve/localization/sl_SI.inc                                     |   11 
 plugins/managesieve/localization/sv_SE.inc                                     |    3 
 plugins/managesieve/localization/tr_TR.inc                                     |    3 
 plugins/managesieve/localization/uk_UA.inc                                     |    3 
 plugins/managesieve/localization/vi_VN.inc                                     |    3 
 plugins/managesieve/localization/zh_CN.inc                                     |  101 +
 plugins/managesieve/localization/zh_TW.inc                                     |   23 
 plugins/managesieve/skins/classic/managesieve.css                              |    8 
 plugins/managesieve/skins/classic/managesieve_mail.css                         |    2 
 plugins/managesieve/skins/larry/managesieve.css                                |    8 
 plugins/markasjunk/localization/el_GR.inc                                      |    2 
 plugins/markasjunk/localization/gl_ES.inc                                      |    2 
 plugins/markasjunk/localization/ro_RO.inc                                      |    6 
 plugins/new_user_dialog/localization/ko_KR.inc                                 |    4 
 plugins/new_user_dialog/localization/nl_NL.inc                                 |    4 
 plugins/new_user_dialog/localization/ro_RO.inc                                 |    4 
 plugins/new_user_dialog/localization/zh_CN.inc                                 |    2 
 plugins/newmail_notifier/localization/gl_ES.inc                                |   12 
 plugins/newmail_notifier/localization/nl_NL.inc                                |   10 
 plugins/newmail_notifier/localization/ro_RO.inc                                |    4 
 plugins/password/drivers/pam.php                                               |    3 
 plugins/password/drivers/sql.php                                               |    2 
 plugins/password/localization/nl_NL.inc                                        |   20 
 plugins/password/localization/ro_RO.inc                                        |   10 
 plugins/password/localization/zh_CN.inc                                        |    8 
 plugins/userinfo/localization/nl_NL.inc                                        |    2 
 plugins/userinfo/localization/ro_RO.inc                                        |    8 
 plugins/userinfo/localization/zh_CN.inc                                        |    4 
 plugins/vcard_attachments/localization/zh_CN.inc                               |    2 
 plugins/virtuser_query/virtuser_query.php                                      |   67 -
 plugins/zipdownload/localization/ro_RO.inc                                     |    4 
 plugins/zipdownload/zipdownload.php                                            |    6 
 program/include/bc.php                                                         |    2 
 program/include/iniset.php                                                     |   17 
 program/include/rcmail.php                                                     |   10 
 program/js/app.js                                                              |  366 +++----
 program/js/app.js.src                                                          |   54 -
 program/js/common.js                                                           |    4 
 program/js/list.js                                                             |   68 -
 program/js/list.js.src                                                         |    4 
 program/lib/Roundcube/bootstrap.php                                            |    8 
 program/lib/Roundcube/html.php                                                 |    5 
 program/lib/Roundcube/rcube.php                                                |   30 
 program/lib/Roundcube/rcube_addressbook.php                                    |   24 
 program/lib/Roundcube/rcube_cache.php                                          |   33 
 program/lib/Roundcube/rcube_config.php                                         |   22 
 program/lib/Roundcube/rcube_contacts.php                                       |   40 
 program/lib/Roundcube/rcube_csv2vcard.php                                      |    6 
 program/lib/Roundcube/rcube_db.php                                             |   71 +
 program/lib/Roundcube/rcube_db_mysql.php                                       |    9 
 program/lib/Roundcube/rcube_db_pgsql.php                                       |   34 
 program/lib/Roundcube/rcube_imap.php                                           |   15 
 program/lib/Roundcube/rcube_imap_cache.php                                     |   14 
 program/lib/Roundcube/rcube_imap_generic.php                                   |   27 
 program/lib/Roundcube/rcube_ldap.php                                           |   54 -
 program/lib/Roundcube/rcube_message.php                                        |    7 
 program/lib/Roundcube/rcube_mime.php                                           |  191 ++-
 program/lib/Roundcube/rcube_output.php                                         |    2 
 program/lib/Roundcube/rcube_session.php                                        |    6 
 program/lib/Roundcube/rcube_smtp.php                                           |    2 
 program/lib/Roundcube/rcube_spellchecker.php                                   |    2 
 program/lib/Roundcube/rcube_string_replacer.php                                |    4 
 program/lib/Roundcube/rcube_vcard.php                                          |   25 
 program/lib/Roundcube/rcube_washtml.php                                        |   50 
 program/lib/utf8.class.php                                                     |    4 
 program/localization/ar_SA/labels.inc                                          |    8 
 program/localization/ar_SA/messages.inc                                        |    2 
 program/localization/ast/labels.inc                                            |    8 
 program/localization/ast/messages.inc                                          |    2 
 program/localization/az_AZ/labels.inc                                          |   12 
 program/localization/az_AZ/messages.inc                                        |   24 
 program/localization/be_BE/labels.inc                                          |    8 
 program/localization/be_BE/messages.inc                                        |    2 
 program/localization/bg_BG/labels.inc                                          |    8 
 program/localization/bg_BG/messages.inc                                        |    2 
 program/localization/bn_BD/labels.inc                                          |    8 
 program/localization/bn_BD/messages.inc                                        |    2 
 program/localization/br/labels.inc                                             |    8 
 program/localization/br/messages.inc                                           |    2 
 program/localization/bs_BA/labels.inc                                          |    8 
 program/localization/bs_BA/messages.inc                                        |    2 
 program/localization/ca_ES/labels.inc                                          |   28 
 program/localization/ca_ES/messages.inc                                        |   70 -
 program/localization/cs_CZ/labels.inc                                          |   12 
 program/localization/cs_CZ/messages.inc                                        |    2 
 program/localization/cy_GB/labels.inc                                          |   12 
 program/localization/cy_GB/messages.inc                                        |    2 
 program/localization/da_DK/labels.inc                                          |   14 
 program/localization/da_DK/messages.inc                                        |    4 
 program/localization/de_CH/labels.inc                                          |   14 
 program/localization/de_CH/messages.inc                                        |    2 
 program/localization/de_DE/labels.inc                                          |   14 
 program/localization/de_DE/messages.inc                                        |    2 
 program/localization/el_GR/labels.inc                                          |    8 
 program/localization/el_GR/messages.inc                                        |   60 -
 program/localization/en_GB/labels.inc                                          |    8 
 program/localization/en_GB/messages.inc                                        |    2 
 program/localization/eo/labels.inc                                             |    8 
 program/localization/eo/messages.inc                                           |    2 
 program/localization/es_AR/labels.inc                                          |  220 ++--
 program/localization/es_AR/messages.inc                                        |    2 
 program/localization/es_ES/labels.inc                                          |    8 
 program/localization/es_ES/messages.inc                                        |    2 
 program/localization/et_EE/labels.inc                                          |   10 
 program/localization/et_EE/messages.inc                                        |    2 
 program/localization/eu_ES/labels.inc                                          |    8 
 program/localization/eu_ES/messages.inc                                        |    2 
 program/localization/fa_AF/labels.inc                                          |    8 
 program/localization/fa_AF/messages.inc                                        |    2 
 program/localization/fa_IR/labels.inc                                          |   16 
 program/localization/fa_IR/messages.inc                                        |    2 
 program/localization/fi_FI/labels.inc                                          |   16 
 program/localization/fi_FI/messages.inc                                        |    2 
 program/localization/fr_FR/csv2vcard.inc                                       |   96 +
 program/localization/fr_FR/labels.inc                                          |   80 -
 program/localization/fr_FR/messages.inc                                        |  212 ++--
 program/localization/fy_NL/labels.inc                                          |    8 
 program/localization/ga_IE/labels.inc                                          |    8 
 program/localization/ga_IE/messages.inc                                        |    2 
 program/localization/gl_ES/labels.inc                                          |   74 -
 program/localization/gl_ES/messages.inc                                        |   22 
 program/localization/he_IL/labels.inc                                          |   12 
 program/localization/he_IL/messages.inc                                        |    2 
 program/localization/hi_IN/labels.inc                                          |    8 
 program/localization/hi_IN/messages.inc                                        |    2 
 program/localization/hr_HR/labels.inc                                          |    8 
 program/localization/hr_HR/messages.inc                                        |    2 
 program/localization/hu_HU/labels.inc                                          |    8 
 program/localization/hu_HU/messages.inc                                        |    4 
 program/localization/hy_AM/labels.inc                                          |    8 
 program/localization/hy_AM/messages.inc                                        |    2 
 program/localization/ia/labels.inc                                             |    8 
 program/localization/ia/messages.inc                                           |    2 
 program/localization/id_ID/labels.inc                                          |    8 
 program/localization/id_ID/messages.inc                                        |    2 
 program/localization/is_IS/labels.inc                                          |    8 
 program/localization/is_IS/messages.inc                                        |    2 
 program/localization/it_IT/labels.inc                                          |    8 
 program/localization/it_IT/messages.inc                                        |    2 
 program/localization/ja_JP/labels.inc                                          |    8 
 program/localization/ja_JP/messages.inc                                        |    2 
 program/localization/ka_GE/labels.inc                                          |    8 
 program/localization/ka_GE/messages.inc                                        |    2 
 program/localization/km_KH/labels.inc                                          |    8 
 program/localization/km_KH/messages.inc                                        |    2 
 program/localization/ko_KR/labels.inc                                          |  508 +++++-----
 program/localization/ko_KR/messages.inc                                        |  279 ++---
 program/localization/ku/labels.inc                                             |    8 
 program/localization/ku/messages.inc                                           |    2 
 program/localization/lt_LT/labels.inc                                          |   14 
 program/localization/lt_LT/messages.inc                                        |    2 
 program/localization/lv_LV/labels.inc                                          |    8 
 program/localization/lv_LV/messages.inc                                        |  114 +-
 program/localization/mk_MK/labels.inc                                          |    8 
 program/localization/mk_MK/messages.inc                                        |    2 
 program/localization/ml_IN/labels.inc                                          |    8 
 program/localization/ml_IN/messages.inc                                        |    2 
 program/localization/mr_IN/labels.inc                                          |    8 
 program/localization/mr_IN/messages.inc                                        |    2 
 program/localization/ms_MY/labels.inc                                          |    8 
 program/localization/ms_MY/messages.inc                                        |    2 
 program/localization/nb_NO/labels.inc                                          |    8 
 program/localization/nb_NO/messages.inc                                        |    2 
 program/localization/ne_NP/labels.inc                                          |    8 
 program/localization/ne_NP/messages.inc                                        |    2 
 program/localization/nl_BE/labels.inc                                          |    8 
 program/localization/nl_BE/messages.inc                                        |    2 
 program/localization/nl_NL/labels.inc                                          |    8 
 program/localization/nl_NL/messages.inc                                        |    4 
 program/localization/nn_NO/labels.inc                                          |    8 
 program/localization/nn_NO/messages.inc                                        |    2 
 program/localization/pl_PL/labels.inc                                          |    8 
 program/localization/pl_PL/messages.inc                                        |    4 
 program/localization/ps/labels.inc                                             |    8 
 program/localization/ps/messages.inc                                           |    2 
 program/localization/pt_BR/labels.inc                                          |    8 
 program/localization/pt_BR/messages.inc                                        |    2 
 program/localization/pt_PT/labels.inc                                          |    8 
 program/localization/pt_PT/messages.inc                                        |    2 
 program/localization/ro_RO/labels.inc                                          |   74 -
 program/localization/ro_RO/messages.inc                                        |   60 -
 program/localization/ru_RU/labels.inc                                          |    8 
 program/localization/ru_RU/messages.inc                                        |    2 
 program/localization/si_LK/labels.inc                                          |    8 
 program/localization/si_LK/messages.inc                                        |    2 
 program/localization/sk_SK/labels.inc                                          |    8 
 program/localization/sk_SK/messages.inc                                        |    2 
 program/localization/sl_SI/labels.inc                                          |   46 
 program/localization/sl_SI/messages.inc                                        |    6 
 program/localization/sq_AL/labels.inc                                          |    8 
 program/localization/sq_AL/messages.inc                                        |    2 
 program/localization/sr_CS/labels.inc                                          |    8 
 program/localization/sr_CS/messages.inc                                        |    2 
 program/localization/sv_SE/labels.inc                                          |    8 
 program/localization/sv_SE/messages.inc                                        |    2 
 program/localization/ta_IN/labels.inc                                          |    8 
 program/localization/ta_IN/messages.inc                                        |    2 
 program/localization/th_TH/labels.inc                                          |    8 
 program/localization/th_TH/messages.inc                                        |    2 
 program/localization/tr_TR/labels.inc                                          |   12 
 program/localization/tr_TR/messages.inc                                        |    2 
 program/localization/uk_UA/labels.inc                                          |    8 
 program/localization/uk_UA/messages.inc                                        |    2 
 program/localization/vi_VN/labels.inc                                          |    8 
 program/localization/vi_VN/messages.inc                                        |    2 
 program/localization/zh_CN/labels.inc                                          |  182 +--
 program/localization/zh_CN/messages.inc                                        |  126 +-
 program/localization/zh_TW/labels.inc                                          |   16 
 program/localization/zh_TW/messages.inc                                        |    2 
 program/steps/addressbook/func.inc                                             |    4 
 program/steps/addressbook/import.inc                                           |    4 
 program/steps/addressbook/save.inc                                             |    2 
 program/steps/addressbook/show.inc                                             |    2 
 program/steps/mail/autocomplete.inc                                            |    2 
 program/steps/mail/compose.inc                                                 |   27 
 program/steps/mail/func.inc                                                    |   29 
 program/steps/mail/get.inc                                                     |   12 
 program/steps/mail/sendmail.inc                                                |    2 
 program/steps/mail/show.inc                                                    |   10 
 program/steps/settings/func.inc                                                |    9 
 program/steps/settings/save_prefs.inc                                          |    2 
 skins/classic/addressbook.css                                                  |    4 
 skins/classic/common.css                                                       |   48 
 skins/classic/embed.css                                                        |    2 
 skins/classic/functions.js                                                     |    9 
 skins/classic/ie6hacks.css                                                     |   24 
 skins/classic/iehacks.css                                                      |    6 
 skins/classic/mail.css                                                         |   34 
 skins/classic/print.css                                                        |   29 
 skins/classic/settings.css                                                     |    2 
 skins/larry/addressbook.css                                                    |    6 
 skins/larry/embed.css                                                          |    2 
 skins/larry/iehacks.css                                                        |    2 
 skins/larry/mail.css                                                           |   26 
 skins/larry/print.css                                                          |   25 
 skins/larry/settings.css                                                       |    2 
 skins/larry/styles.css                                                         |   56 -
 skins/larry/templates/message.html                                             |    2 
 skins/larry/ui.js                                                              |   14 
 skins/larry/watermark.html                                                     |    2 
 341 files changed, 3905 insertions(+), 2820 deletions(-)

New commits:
commit dd543342bef1297bd23d1131a043e2b211152c73
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Wed Jul 3 16:33:47 2013 +0200

    0.9.2-1: Update changelog

diff --git a/debian/changelog b/debian/changelog
index 081ba6b..da3de81 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+roundcube (0.9.2-1) unstable; urgency=low
+
+  * Imported Upstream version 0.9.2
+
+ -- Christoph Wickert <wickert at kolabsys.com>  Wed, 03 Jul 2013 16:19:40 +0200
+
 roundcube (0.9.0-1) unstable; urgency=low
 
   * Imported Upstream version 0.9.0


commit 16c879e660446588ab318a0d8826a006fbfcb37e
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Wed Jul 3 16:33:34 2013 +0200

    Update correct_install_path.patch for 0.9.2

diff --git a/debian/patches/correct_install_path.patch b/debian/patches/correct_install_path.patch
index 85cfe4a..ef5fd42 100644
--- a/debian/patches/correct_install_path.patch
+++ b/debian/patches/correct_install_path.patch
@@ -2,8 +2,8 @@ Install path is /var/lib/roundcube for Debian. Don't try to guess it.
 
 --- a/program/include/iniset.php
 +++ b/program/include/iniset.php
-@@ -40,7 +40,7 @@
- }
+@@ -25,7 +25,7 @@ define('RCMAIL_VERSION', '0.9.2');
+ define('RCMAIL_START', microtime(true));
  
  if (!defined('INSTALL_PATH')) {
 -    define('INSTALL_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');


commit 7b91f0e366cea750020719a0d4b8476b57c93560
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Wed Jul 3 16:33:17 2013 +0200

    Remove upstreamed patch

diff --git a/debian/patches/0001-Extend-fetched-header-block-to-32K-require-one-of-su.patch b/debian/patches/0001-Extend-fetched-header-block-to-32K-require-one-of-su.patch
deleted file mode 100644
index 5294ed1..0000000
--- a/debian/patches/0001-Extend-fetched-header-block-to-32K-require-one-of-su.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 23ea51e98df7f1591ff0b788809b4eba784ab27d Mon Sep 17 00:00:00 2001
-From: Thomas Bruederli <bruederli at kolabsys.com>
-Date: Thu, 25 Apr 2013 12:57:29 +0200
-Subject: [PATCH] Extend fetched header block to 32K, require one of subjct,
- from or to headers
-
----
- program/lib/Roundcube/rcube_message.php |    5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
-index 0701cc0..e10ed39 100644
---- a/program/lib/Roundcube/rcube_message.php
-+++ b/program/lib/Roundcube/rcube_message.php
-@@ -321,7 +321,7 @@ class rcube_message
- 
-             // parse headers from message/rfc822 part
-             if (!isset($structure->headers['subject'])) {
--                list($headers, $dump) = explode("\r\n\r\n", $this->get_part_content($structure->mime_id, null, true, 8192));
-+                list($headers, $dump) = explode("\r\n\r\n", $this->get_part_content($structure->mime_id, null, true, 32768));
-                 $structure->headers = rcube_mime::parse_headers($headers);
-             }
-         }
-@@ -329,7 +329,8 @@ class rcube_message
-             $mimetype = $structure->mimetype;
- 
-         // show message headers
--        if ($recursive && is_array($structure->headers) && isset($structure->headers['subject'])) {
-+        if ($recursive && is_array($structure->headers) &&
-+                ($structure->headers['subject'] || $structure->headers['from'] || $structure->headers['to'])) {
-             $c = new stdClass;
-             $c->type = 'headers';
-             $c->headers = $structure->headers;
--- 
-1.7.10.4
-
diff --git a/debian/patches/series b/debian/patches/series
index 7cca4df..5d89590 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
 correct_install_path.patch
 #use_pspell.patch
 default-charset-utf8.patch
-0001-Extend-fetched-header-block-to-32K-require-one-of-su.patch


commit b0661bcf1d8d8871e881b762fc4f1c260b6708b8
Merge: 6b9e808 baa5f40
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Wed Jul 3 16:14:19 2013 +0200

    Merge tag 'upstream/0.9.2' into ucs/3.1/kolab-2.3
    
    Upstream version 0.9.2



commit baa5f406edc53365206f9e9c0454a42266a767a4
Author: Christoph Wickert <wickert at kolabsys.com>
Date:   Wed Jul 3 16:13:56 2013 +0200

    Imported Upstream version 0.9.2

diff --git a/CHANGELOG b/CHANGELOG
index fe342a4..0a61ef5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,65 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+RELEASE 0.9.2
+-------------
+- Fix image thumbnails display in print mode (#1489134)
+- Fix height of message headers block (#1489108)
+- Fix timeout issue on drag&drop uploads (#1489170)
+- Fix default sorting of threaded list when THREAD=REFS isn't supported
+- Fix list mode switch to 'List' after saving list settings in Larry skin (#1489164)
+- Fix error when there's no writeable addressbook source (#1489162)
+- Fix zipdownload plugin issue with filenames charset (#1489156)
+- Fix so non-inline images aren't skipped on forward (#1489150)
+- Fix "null" instead of empty string on messages list in IE10 (#1489145)
+- Fix legacy options handling
+- Fix so bounces addresses in Sender headers are skipped on Reply-All (#1489011)
+- Fix bug where serialized strings were truncated in PDO::quote() (#1489142)
+- Fix displaying messages with invalid self-closing HTML tags (#1489137)
+- Fix PHP warning when responding to a message with many Return-Path headers (#1489136)
+- Fix unintentional compose window resize (#1489114)
+- Fix performance regression in text wrapping function (#1489133)
+- Fix connection to posgtres db using unix socket (#1489132)
+- Fix handling of comma when adding contact from contacts widget (#1489107)
+- Fix bug where a message was opened in both preview pane and new window on double-click (#1489122)
+- Fix fatal error when xdebug.max_nesting_level was exceeded in rcube_washtml (#1489110)
+- Fix PHP warning in html_table::set_row_attribs() in PHP 5.4 (#1489094)
+- Fix invalid option selected in default_font selector when font is unset (#1489112)
+- Fix displaying contact with ID divisible by 100 in sql addressbook (#1489121)
+- Fix browser warnings on PDF plugin detection (#1489118)
+- Fix fatal error when parsing UUencoded messages (#1489119)
+
+RELEASE 0.9.1
+-------------
+- Better German labels for from/to to avoid conflicts with 'sender' (#1489084)
+- Fix problem where security warning was displayed for valid images with image/jpg type (#1489097)
+- Fix handling of invalid email addresses in headers (#1489092)
+- Fix IMAP connection issue with default_socket_timeout < 0 and imap_timeout < 0 (#1489090)
+- Fix various PHP code bugs found using static analysis (#1489086)
+- Fix backslash character handling on vCard import (#1489085)
+- Fix csv import from Thunderbird with French localization (#1489059)
+- Fix messages list focus issue in Opera and Webkit (#1489058)
+- Fix Reply-To header handling in Reply-All action (#1489037)
+- Fix so Sender: address is added to Cc: field on reply to all (#1489011)
+- Fix so addressbook_search_mode works also for group search (#1489079)
+- Fix removal of a contact from a group in LDAP addressbook (#1489081)
+- Inlcude SQL query in the log on SQL error (#1489064)
+- Fix handling untagged responses in IMAP FETCH - "could not load message" error (#1489074)
+- Fix very small window size in Chrome (#1488931)
+- Fix list page reset when viewing a message in Larry skin (#1489076)
+- Fix min_refresh_interval handling on preferences save (#1489073)
+- Fix PDF support detection for Firefox PDF.js (#1488972)
+- Fix possible collision in generated thumbnail cache key (#1489069)
+- Fix exit code on bootsrap errors in CLI mode (#1489044)
+- Fix error handling in CLI mode, use STDERR and non-empty exit code (#1489043)
+- Fix error when using check_referer=true
+- Fix incorrect handling of some specific links (#1489060)
+- Fix incorrect handling of leading spaces in text wrapping
+- Fix unintentional messages list jumps on click in Internet Explorer (#1489056)
+- Fix list of required configuration options (#1489055)
+- Fix DB error when creating a new contact and a group is selected (#1489051)
+- Fix handling of deprecated boolean value of reply_mode option (#1489052)
+
 RELEASE 0.9.0
 -------------
 - Fix display of HTML entities in protected folder name (#1489042)
diff --git a/INSTALL b/INSTALL
index de29441..3abf0d1 100644
--- a/INSTALL
+++ b/INSTALL
@@ -129,9 +129,15 @@ versions don't have a -O option for the createdb, so if you are
 using that version you'll have to change ownership of the DB later.
 
 
+* Microsoft SQL Server
+----------------------
+Language/locale of the database must be set to us_english (1033). More info
+on this at http://trac.roundcube.net/ticket/1488918.
+
+
 Database cleaning
 -----------------
-Do keep your database slick and clean we recommend to periodically execute
+To keep your database slick and clean we recommend to periodically execute
 bin/cleandb.sh which finally removes all records that are marked as deleted.
 Best solution is to install a cronjob running this script daily.
 
diff --git a/bin/cleandb.sh b/bin/cleandb.sh
index ecf2583..ea905c8 100755
--- a/bin/cleandb.sh
+++ b/bin/cleandb.sh
@@ -34,8 +34,9 @@ $RCMAIL = rcmail::get_instance();
 $db = $RCMAIL->get_dbh();
 $db->db_connect('w');
 
-if (!$db->is_connected() || $db->is_error())
-    die("No DB connection\n");
+if (!$db->is_connected() || $db->is_error()) {
+    rcube::raise_error("No DB connection", false, true);
+}
 
 if (!empty($_SERVER['argv'][1]))
     $days = intval($_SERVER['argv'][1]);
diff --git a/bin/decrypt.sh b/bin/decrypt.sh
index 95fdefc..ff7c430 100755
--- a/bin/decrypt.sh
+++ b/bin/decrypt.sh
@@ -19,7 +19,7 @@
  +-----------------------------------------------------------------------+
 */
 
-/*-
+/**
  * If http_received_header_encrypt is configured, the IP address and the
  * host name of the added Received: header is encrypted with 3DES, to
  * protect information that some could consider sensitve, yet their
@@ -28,8 +28,8 @@
  * Such an encrypted Received: header might look like:
  *
  * Received: from DzgkvJBO5+bw+oje5JACeNIa/uSI4mRw2cy5YoPBba73eyBmjtyHnQ==
- * 	[my0nUbjZXKtl7KVBZcsvWOxxtyVFxza4]
- *	with HTTP/1.1 (POST); Thu, 14 May 2009 19:17:28 +0200
+ *  [my0nUbjZXKtl7KVBZcsvWOxxtyVFxza4]
+ *  with HTTP/1.1 (POST); Thu, 14 May 2009 19:17:28 +0200
  *
  * In this example, the two encrypted components are the sender host name
  * (DzgkvJBO5+bw+oje5JACeNIa/uSI4mRw2cy5YoPBba73eyBmjtyHnQ==) and the IP
@@ -48,7 +48,7 @@
  *
  * If (most likely binary) junk is shown, then
  *  - either the encryption password has, between the time the mail was sent
- *    and `now', changed, or
+ *    and 'now', changed, or
  *  - you are dealing with counterfeit header data.
  */
 
diff --git a/bin/indexcontacts.sh b/bin/indexcontacts.sh
index a9a5a95..413dc4b 100755
--- a/bin/indexcontacts.sh
+++ b/bin/indexcontacts.sh
@@ -30,17 +30,18 @@ $RCMAIL = rcmail::get_instance();
 $db = $RCMAIL->get_dbh();
 $db->db_connect('w');
 
-if (!$db->is_connected() || $db->is_error())
-    die("No DB connection\n");
+if (!$db->is_connected() || $db->is_error()) {
+    rcube::raise_error("No DB connection", false, true);
+}
 
 // iterate over all users
 $sql_result = $db->query("SELECT user_id FROM " . $RCMAIL->config->get('db_table_users', 'users')." WHERE 1=1");
 while ($sql_result && ($sql_arr = $db->fetch_assoc($sql_result))) {
     echo "Indexing contacts for user " . $sql_arr['user_id'] . "...";
-    
+
     $contacts = new rcube_contacts($db, $sql_arr['user_id']);
     $contacts->set_pagesize(9999);
-    
+
     $result = $contacts->list_records();
     while ($result->count && ($row = $result->next())) {
         unset($row['words']);
diff --git a/bin/installto.sh b/bin/installto.sh
index e6cf79d..8e1ab1f 100755
--- a/bin/installto.sh
+++ b/bin/installto.sh
@@ -26,17 +26,17 @@ require_once INSTALL_PATH . 'program/include/clisetup.php';
 $target_dir = unslashify($_SERVER['argv'][1]);
 
 if (empty($target_dir) || !is_dir(realpath($target_dir)))
-  die("Invalid target: not a directory\nUsage: installto.sh <TARGET>\n");
+  rcube::raise_error("Invalid target: not a directory\nUsage: installto.sh <TARGET>", false, true);
 
 // read version from iniset.php
 $iniset = @file_get_contents($target_dir . '/program/include/iniset.php');
 if (!preg_match('/define\(.RCMAIL_VERSION.,\s*.([0-9.]+[a-z-]*)/', $iniset, $m))
-  die("No valid Roundcube installation found at $target_dir\n");
+  rcube::raise_error("No valid Roundcube installation found at $target_dir", false, true);
 
 $oldversion = $m[1];
 
 if (version_compare(version_parse($oldversion), version_parse(RCMAIL_VERSION), '>='))
-  die("Installation at target location is up-to-date!\n");
+  rcube::raise_error("Installation at target location is up-to-date!", false, true);
 
 echo "Upgrading from $oldversion. Do you want to continue? (y/N)\n";
 $input = trim(fgets(STDIN));
diff --git a/bin/moduserprefs.sh b/bin/moduserprefs.sh
index b8ba985..049372c 100755
--- a/bin/moduserprefs.sh
+++ b/bin/moduserprefs.sh
@@ -2,7 +2,7 @@
 <?php
 /*
  +-----------------------------------------------------------------------+
- | bin/moduserprefs.sh                                                      |
+ | bin/moduserprefs.sh                                                   |
  |                                                                       |
  | This file is part of the Roundcube Webmail client                     |
  | Copyright (C) 2012, The Roundcube Dev Team                            |
diff --git a/bin/msgimport.sh b/bin/msgimport.sh
index 41bcd7e..1fcc346 100755
--- a/bin/msgimport.sh
+++ b/bin/msgimport.sh
@@ -33,8 +33,7 @@ else if (!($args['host'] && $args['file']))
 }
 else if (!is_file($args['file']))
 {
-	print "Cannot read message file\n";
-	exit;
+	rcube::raise_error("Cannot read message file.", false, true);
 }
 
 // prompt for username if not set
@@ -87,7 +86,7 @@ if ($IMAP->connect($host, $args['user'], $args['pass'], $imap_port, $imap_ssl))
 				if ($IMAP->save_message($args['mbox'], rtrim($message)))
 					$count++;
 				else
-					die("Failed to save message to {$args['mbox']}\n");
+					rcube::raise_error("Failed to save message to {$args['mbox']}", false, true);
 				$message = '';
 			}
 			continue;
@@ -108,7 +107,7 @@ if ($IMAP->connect($host, $args['user'], $args['pass'], $imap_port, $imap_ssl))
 }
 else
 {
-	print "IMAP login failed.\n";
+	rcube::raise_error("IMAP login failed.", false, true);
 }
 
 ?>
diff --git a/bin/updatecss.sh b/bin/updatecss.sh
new file mode 100755
index 0000000..53d237c
--- /dev/null
+++ b/bin/updatecss.sh
@@ -0,0 +1,122 @@
+#!/usr/bin/env php
+<?php
+/*
+ +-----------------------------------------------------------------------+
+ | bin/updatecss.sh                                                      |
+ |                                                                       |
+ | This file is part of the Roundcube Webmail client                     |
+ | Copyright (C) 2010-2013, The Roundcube Dev Team                       |
+ |                                                                       |
+ | Licensed under the GNU General Public License version 3 or            |
+ | any later version with exceptions for skins & plugins.                |
+ | See the README file for a full license statement.                     |
+ |                                                                       |
+ | PURPOSE:                                                              |
+ |   Update cache-baster marks for css background images                 |
+ +-----------------------------------------------------------------------+
+ | Author: Aleksander Machniak <alec at alec.pl>                            |
+ +-----------------------------------------------------------------------+
+*/
+
+define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
+
+require_once INSTALL_PATH . 'program/include/clisetup.php';
+
+// get arguments
+$opts = rcube_utils::get_opt(array(
+    'd' => 'dir',
+));
+
+if (empty($opts['dir'])) {
+    print "Skin directory not specified (--dir). Using skins/ and plugins/*/skins/.\n";
+
+    $dir     = INSTALL_PATH . 'skins';
+    $dir_p   = INSTALL_PATH . 'plugins';
+    $skins   = glob("$dir/*", GLOB_ONLYDIR);
+    $skins_p = glob("$dir_p/*/skins/*", GLOB_ONLYDIR);
+
+    $dirs = array_merge($skins, $skins_p);
+}
+// Check if directory exists
+else if (!file_exists($opts['dir'])) {
+    rcube::raise_error("Specified directory doesn't exist.", false, true);
+}
+else {
+    $dirs = array($opts['dir']);
+}
+
+foreach ($dirs as $dir) {
+    $img_dir = $dir . '/images';
+    if (!file_exists($img_dir)) {
+        continue;
+    }
+
+    $files   = get_files($dir);
+    $images  = get_images($img_dir);
+    $find    = array();
+    $replace = array();
+
+    // build regexps array
+    foreach ($images as $path => $sum) {
+        $path_ex   = str_replace('.', '\\.', $path);
+        $find[]    = "#url\(['\"]?images/$path_ex(\?v=[a-f0-9-\.]+)?['\"]?\)#";
+        $replace[] = "url(images/$path?v=$sum)";
+    }
+
+    foreach ($files as $file) {
+        $file    = $dir . '/' . $file;
+        print "File: $file\n";
+        $content = file_get_contents($file);
+        $content = preg_replace($find, $replace, $content, -1, $count);
+        if ($count) {
+            file_put_contents($file, $content);
+        }
+    }
+}
+
+
+function get_images($dir)
+{
+    $images = array();
+    $dh     = opendir($dir);
+
+    while ($file = readdir($dh)) {
+        if (preg_match('/^(.+)\.(gif|ico|png|jpg|jpeg)$/', $file, $m)) {
+            $filepath = "$dir/$file";
+            $images[$file] = substr(md5_file($filepath), 0, 4) . '.' . filesize($filepath);
+            print "Image: $filepath ({$images[$file]})\n";
+        }
+        else if ($file != '.' && $file != '..' && is_dir($dir . '/' . $file)) {
+            foreach (get_images($dir . '/' . $file) as $img => $sum) {
+                $images[$file . '/' . $img] = $sum;
+            }
+        }
+    }
+
+    closedir($dh);
+
+    return $images;
+}
+
+function get_files($dir)
+{
+    $files = array();
+    $dh    = opendir($dir);
+
+    while ($file = readdir($dh)) {
+        if (preg_match('/^(.+)\.(css|html)$/', $file, $m)) {
+            $files[] = $file;
+        }
+        else if ($file != '.' && $file != '..' && is_dir($dir . '/' . $file)) {
+            foreach (get_files($dir . '/' . $file) as $f) {
+                $files[] = $file . '/' . $f;
+            }
+        }
+    }
+
+    closedir($dh);
+
+    return $files;
+}
+
+?>
diff --git a/bin/updatedb.sh b/bin/updatedb.sh
index 7fa8cce..aeeaf68 100755
--- a/bin/updatedb.sh
+++ b/bin/updatedb.sh
@@ -31,18 +31,15 @@ $opts = rcube_utils::get_opt(array(
 ));
 
 if (empty($opts['dir'])) {
-  echo "ERROR: Database schema directory not specified (--dir).\n";
-  exit(1);
+    rcube::raise_error("Database schema directory not specified (--dir).", false, true);
 }
 if (empty($opts['package'])) {
-  echo "ERROR: Database schema package name not specified (--package).\n";
-  exit(1);
+    rcube::raise_error("Database schema package name not specified (--package).", false, true);
 }
 
 // Check if directory exists
 if (!file_exists($opts['dir'])) {
-  echo "ERROR: Specified database schema directory doesn't exist.\n";
-  exit(1);
+    rcube::raise_error("Specified database schema directory doesn't exist.", false, true);
 }
 
 $RC = rcube::get_instance();
@@ -51,8 +48,7 @@ $DB = rcube_db::factory($RC->config->get('db_dsnw'));
 // Connect to database
 $DB->db_connect('w');
 if (!$DB->is_connected()) {
-    echo "Error connecting to database: " . $DB->is_error() . ".\n";
-    exit(1);
+    rcube::raise_error("Error connecting to database: " . $DB->is_error(), false, true);
 }
 
 // Read DB schema version from database (if 'system' table exists)
@@ -113,8 +109,7 @@ if (empty($version)) {
 
 $dir = $opts['dir'] . DIRECTORY_SEPARATOR . $DB->db_provider;
 if (!file_exists($dir)) {
-    echo "DDL Upgrade files for " . $DB->db_provider . " driver not found.\n";
-    exit(1);
+    rcube::raise_error("DDL Upgrade files for " . $DB->db_provider . " driver not found.", false, true);
 }
 
 $dh     = opendir($dir);
@@ -132,13 +127,12 @@ foreach ($result as $v) {
     $error = update_db_schema($opts['package'], $v, $dir . DIRECTORY_SEPARATOR . "$v.sql");
 
     if ($error) {
-        echo "\nError in DDL upgrade $v: $error\n";
-        exit(1);
+        echo "[FAILED]\n";
+        rcube::raise_error("Error in DDL upgrade $v: $error", false, true);
     }
     echo "[OK]\n";
 }
 
-exit(0);
 
 function update_db_schema($package, $version, $file)
 {
diff --git a/composer.json-dist b/composer.json-dist
new file mode 100644
index 0000000..e746203
--- /dev/null
+++ b/composer.json-dist
@@ -0,0 +1,16 @@
+{
+    "name": "roundcube/roundcubemail",
+    "description": "The Roundcube Webmail suite",
+    "license": "GPL-3.0+",
+    "repositories": [
+        {
+            "type": "composer",
+            "url": "http://plugins.roundcube.net/"
+        }
+    ],
+    "require": {
+        "php": ">=5.3.0",
+        "roundcube/plugin-installer": ">=0.1.3"
+    },
+    "minimum-stability": "dev"
+}
diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist
index 5a652a5..2bbf8cb 100644
--- a/config/main.inc.php.dist
+++ b/config/main.inc.php.dist
@@ -888,6 +888,6 @@ $rcmail_config['autocomplete_single'] = false;
 // Default font for composed HTML message.
 // Supported values: Andale Mono, Arial, Arial Black, Book Antiqua, Courier New,
 // Georgia, Helvetica, Impact, Tahoma, Terminal, Times New Roman, Trebuchet MS, Verdana
-$rcmail_config['default_font'] = '';
+$rcmail_config['default_font'] = 'Verdana';
 
 // end of config file
diff --git a/index.php b/index.php
index f34b07c..0fbcb74 100644
--- a/index.php
+++ b/index.php
@@ -2,7 +2,7 @@
 /*
  +-------------------------------------------------------------------------+
  | Roundcube Webmail IMAP Client                                           |
- | Version 0.9.0                                                          |
+ | Version 0.9.2                                                           |
  |                                                                         |
  | Copyright (C) 2005-2013, The Roundcube Dev Team                         |
  |                                                                         |
@@ -161,7 +161,7 @@ if ($RCMAIL->task == 'login' && $RCMAIL->action == 'login') {
 }
 
 // end session (after optional referer check)
-else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id']) && (!$RCMAIL->config->get('referer_check') || rcmail::check_referer())) {
+else if ($RCMAIL->task == 'logout' && isset($_SESSION['user_id']) && (!$RCMAIL->config->get('referer_check') || rcube_utils::check_referer())) {
   $userdata = array(
     'user' => $_SESSION['username'],
     'host' => $_SESSION['storage_host'],
@@ -236,7 +236,7 @@ else {
     }
 
     // check referer if configured
-    if ($RCMAIL->config->get('referer_check') && !rcmail::check_referer()) {
+    if ($RCMAIL->config->get('referer_check') && !rcube_utils::check_referer()) {
       raise_error(array(
         'code' => 403, 'type' => 'php',
         'message' => "Referer check failed"), true, true);
diff --git a/installer/check.php b/installer/check.php
index 14fc4f0..fcf3502 100644
--- a/installer/check.php
+++ b/installer/check.php
@@ -64,12 +64,12 @@ $source_urls = array(
     'Intl'      => 'http://www.php.net/manual/en/book.intl.php',
     'Exif'      => 'http://www.php.net/manual/en/book.exif.php',
     'PDO'       => 'http://www.php.net/manual/en/book.pdo.php',
-    'pdo_mysql'   => 'http://www.php.net/manual/en/book.pdo-mysql.php',
-    'pdo_pgsql'   => 'http://www.php.net/manual/en/book.pdo-pgsql.php',
-    'pdo_sqlite'  => 'http://www.php.net/manual/en/book.pdo-sqlite.php',
-    'pdo_sqlite2' => 'http://www.php.net/manual/en/book.pdo-sqlite.php',
-    'pdo_sqlsrv'  => 'http://www.php.net/manual/en/book.pdo-sqlsrv.php',
-    'pdo_dblib'   => 'http://www.php.net/manual/en/book.pdo-dblib.php',
+    'pdo_mysql'   => 'http://www.php.net/manual/en/ref.pdo-mysql.php',
+    'pdo_pgsql'   => 'http://www.php.net/manual/en/ref.pdo-pgsql.php',
+    'pdo_sqlite'  => 'http://www.php.net/manual/en/ref.pdo-sqlite.php',
+    'pdo_sqlite2' => 'http://www.php.net/manual/en/ref.pdo-sqlite.php',
+    'pdo_sqlsrv'  => 'http://www.php.net/manual/en/ref.pdo-sqlsrv.php',
+    'pdo_dblib'   => 'http://www.php.net/manual/en/ref.pdo-dblib.php',
     'PEAR'      => 'http://pear.php.net',
     'Net_SMTP'  => 'http://pear.php.net/package/Net_SMTP',
     'Mail_mime' => 'http://pear.php.net/package/Mail_mime',
diff --git a/installer/config.php b/installer/config.php
index d6846ed..97a5128 100644
--- a/installer/config.php
+++ b/installer/config.php
@@ -15,7 +15,6 @@ $RCI->load_defaults();
 // register these boolean fields
 $RCI->bool_config_props = array(
   'ip_check' => 1,
-  'enable_caching' => 1,
   'enable_spellcheck' => 1,
   'auto_create_user' => 1,
   'smtp_log' => 1,
@@ -127,16 +126,6 @@ echo $check_ipcheck->show(intval($RCI->getprop('ip_check')), array('value' => 1)
 <p class="hint">This increases security but can cause sudden logouts when someone uses a proxy with changing IPs.</p>
 </dd>
 
-<dt class="propname">enable_caching</dt>
-<dd>
-<?php
-
-$check_caching = new html_checkbox(array('name' => '_enable_caching', 'id' => "cfgcache"));
-echo $check_caching->show(intval($RCI->getprop('enable_caching')), array('value' => 1));
-
-?>
-<label for="cfgcache">Cache messages in local database</label><br />
-</dd>
 
 <dt class="propname">enable_spellcheck</dt>
 <dd>
diff --git a/installer/rcube_install.php b/installer/rcube_install.php
index 08761ce..ce9ddfc 100644
--- a/installer/rcube_install.php
+++ b/installer/rcube_install.php
@@ -46,8 +46,7 @@ class rcube_install
 
   // these config options are required for a working system
   var $required_config = array(
-    'db_dsnw', 'db_table_contactgroups', 'db_table_contactgroupmembers',
-    'des_key', 'session_lifetime', 'support_url',
+    'db_dsnw', 'des_key', 'session_lifetime',
   );
 
   // list of supported database drivers
@@ -288,7 +287,7 @@ class rcube_install
     if ($this->config['log_driver'] == 'syslog') {
       if (!function_exists('openlog')) {
         $out['dependencies'][] = array('prop' => 'log_driver',
-          'explain' => 'This requires the <tt>sylog</tt> extension which could not be loaded.');
+          'explain' => 'This requires the <tt>syslog</tt> extension which could not be loaded.');
       }
       if (empty($this->config['syslog_id'])) {
         $out['dependencies'][] = array('prop' => 'syslog_id',
@@ -457,6 +456,7 @@ class rcube_install
         '0.7-beta', '0.7', '0.7.1', '0.7.2', '0.7.3', '0.7.4',
         '0.8-beta', '0.8-rc', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6',
         '0.9-beta', '0.9-rc', '0.9-rc2',
+        // Note: Do not add newer versions here
     ));
     return $select;
   }
@@ -638,8 +638,10 @@ class rcube_install
    */
   function update_db($version)
   {
-    system(INSTALL_PATH . "bin/updatedb.sh --package=roundcube --version=" . $version
-      . " --dir=" . INSTALL_PATH . "SQL", $result);
+    system(INSTALL_PATH . "bin/updatedb.sh --package=roundcube"
+      . " --version=" . escapeshellarg($version)
+      . " --dir=" . INSTALL_PATH . "SQL"
+      . " 2>&1", $result);
 
     return !$result;
   }
diff --git a/installer/test.php b/installer/test.php
index bd49ac5..340fe26 100644
--- a/installer/test.php
+++ b/installer/test.php
@@ -38,13 +38,13 @@ if ($RCI->configured && ($messages = $RCI->check_config())) {
   
   if (is_array($messages['missing'])) {
     echo '<h3 class="warning">Missing config options</h3>';
-    echo '<p class="hint">The following config options are not present in the current configuration.<br/>';
-    echo 'Please check the default config files and add the missing properties to your local config files.</p>';
-    
-    echo '<ul class="configwarings">';
+    echo '<p class="hint">The following config options are not set (not present or empty) in the current configuration.<br/>';
+    echo 'Please check the default config files and set the missing properties in your local config files.</p>';
+
+    echo '<ul class="configwarnings">';
     foreach ($messages['missing'] as $msg) {
       echo html::tag('li', null, html::span('propname', $msg['prop']) . ($msg['name'] ? ':&nbsp;' . $msg['name'] : ''));
-    }    
+    }
     echo '</ul>';
   }
 
diff --git a/plugins/acl/acl.php b/plugins/acl/acl.php
index a4abe28..466185d 100644
--- a/plugins/acl/acl.php
+++ b/plugins/acl/acl.php
@@ -433,8 +433,9 @@ class acl extends rcube_plugin
         $acl   = trim(get_input_value('_acl', RCUBE_INPUT_GPC));
         $oldid = trim(get_input_value('_old', RCUBE_INPUT_GPC));
 
-        $acl   = array_intersect(str_split($acl), $this->rights_supported());
-        $users = $oldid ? array($user) : explode(',', $user);
+        $acl    = array_intersect(str_split($acl), $this->rights_supported());
+        $users  = $oldid ? array($user) : explode(',', $user);
+        $result = 0;
 
         foreach ($users as $user) {
             $user = trim($user);
diff --git a/plugins/acl/localization/cs_CZ.inc b/plugins/acl/localization/cs_CZ.inc
index acf80ac..167788b 100644
--- a/plugins/acl/localization/cs_CZ.inc
+++ b/plugins/acl/localization/cs_CZ.inc
@@ -21,7 +21,7 @@ $labels['myrights'] = 'Přístupová práva';
 $labels['username'] = 'Uživatel:';
 $labels['advanced'] = 'pokročilý režim';
 $labels['newuser'] = 'Přidat záznam';
-$labels['actions'] = 'Access right actions...';
+$labels['actions'] = 'Přístupové právo akce ...';
 $labels['anyone'] = 'Všichni uživatelé (kdokoli)';
 $labels['anonymous'] = 'Hosté (anonymní)';
 $labels['identifier'] = 'Identifikátor';
diff --git a/plugins/acl/localization/et_EE.inc b/plugins/acl/localization/et_EE.inc
index f89e7d6..e41275a 100644
--- a/plugins/acl/localization/et_EE.inc
+++ b/plugins/acl/localization/et_EE.inc
@@ -89,7 +89,7 @@ $messages['saving'] = 'Ligipääsuõiguste salvestamine...';
 $messages['updatesuccess'] = 'Ligipääsuõigused on muudetud';
 $messages['deletesuccess'] = 'Ligipääsuõigused on kustutatud';
 $messages['createsuccess'] = 'Ligipääsuõigused on lisatud';
-$messages['updateerror'] = 'Ligipääsuõiguste uuendamine nurjus';
+$messages['updateerror'] = 'Unable to update access rights';
 $messages['deleteerror'] = 'Ligipääsuõiguste kustutamine nurjus';
 $messages['createerror'] = 'Ligipääsuõiguste andmine nurjus';
 $messages['deleteconfirm'] = 'Oled sa kindel, et sa soovid valitudkasutaja(te) õiguseid kustutada?';
diff --git a/plugins/acl/localization/fi_FI.inc b/plugins/acl/localization/fi_FI.inc
index 329664a..1238b0f 100644
--- a/plugins/acl/localization/fi_FI.inc
+++ b/plugins/acl/localization/fi_FI.inc
@@ -89,11 +89,11 @@ $messages['saving'] = 'Tallennetaan käyttöoikeuksia...';
 $messages['updatesuccess'] = 'Käyttöoikeuksia muutettiin onnistuneesti';
 $messages['deletesuccess'] = 'Käyttöoikeuksia poistettiin onnistuneesti';
 $messages['createsuccess'] = 'Käyttöoikeuksia lisättiin onnistuneesti';
-$messages['updateerror'] = 'Ubable to update access rights';
+$messages['updateerror'] = 'Käyttöoikeuksien päivitys epäonnistui';
 $messages['deleteerror'] = 'Käyttöoikeuksien poistaminen epäonnistui';
 $messages['createerror'] = 'Käyttöoikeuksien lisääminen epäonnistui';
 $messages['deleteconfirm'] = 'Are you sure, you want to remove access rights of selected user(s)?';
-$messages['norights'] = 'No rights has been specified!';
-$messages['nouser'] = 'No username has been specified!';
+$messages['norights'] = 'Oikeuksia ei ole määritelty!';
+$messages['nouser'] = 'Käyttäjänimeä ei ole määritelty!';
 
 ?>
diff --git a/plugins/acl/localization/gl_ES.inc b/plugins/acl/localization/gl_ES.inc
index a287a41..bb88371 100644
--- a/plugins/acl/localization/gl_ES.inc
+++ b/plugins/acl/localization/gl_ES.inc
@@ -26,46 +26,46 @@ $labels['anyone'] = 'Tódolos usuarios (calquera)';
 $labels['anonymous'] = 'Invitados (anónimo)';
 $labels['identifier'] = 'Identificador';
 
-$labels['acll'] = 'Lookup';
+$labels['acll'] = 'Bloquear';
 $labels['aclr'] = 'Ler mensaxes';
 $labels['acls'] = 'Keep Seen state';
 $labels['aclw'] = 'Write flags';
 $labels['acli'] = 'Insert (Copy into)';
 $labels['aclp'] = 'Post';
-$labels['aclc'] = 'Create subfolders';
-$labels['aclk'] = 'Create subfolders';
+$labels['aclc'] = 'Crear subcartafoles';
+$labels['aclk'] = 'Crear subcartafoles';
 $labels['acld'] = 'Borrar mensaxes';
 $labels['aclt'] = 'Borrar mensaxes';
 $labels['acle'] = 'Expunge';
 $labels['aclx'] = 'Eliminar carpeta';
 $labels['acla'] = 'Administrar';
 
-$labels['aclfull'] = 'Full control';
-$labels['aclother'] = 'Other';
-$labels['aclread'] = 'Read';
-$labels['aclwrite'] = 'Write';
-$labels['acldelete'] = 'Delete';
+$labels['aclfull'] = 'Control total';
+$labels['aclother'] = 'Outros';
+$labels['aclread'] = 'Lectura';
+$labels['aclwrite'] = 'Escritura';
+$labels['acldelete'] = 'Borrado';
 
-$labels['shortacll'] = 'Lookup';
-$labels['shortaclr'] = 'Read';
-$labels['shortacls'] = 'Keep';
-$labels['shortaclw'] = 'Write';
-$labels['shortacli'] = 'Insert';
+$labels['shortacll'] = 'Busca';
+$labels['shortaclr'] = 'Ler';
+$labels['shortacls'] = 'Manter';
+$labels['shortaclw'] = 'Escribir';
+$labels['shortacli'] = 'Insertar';
 $labels['shortaclp'] = 'Post';
-$labels['shortaclc'] = 'Create';
-$labels['shortaclk'] = 'Create';
-$labels['shortacld'] = 'Delete';
-$labels['shortaclt'] = 'Delete';
+$labels['shortaclc'] = 'Crear';
+$labels['shortaclk'] = 'Crear';
+$labels['shortacld'] = 'Borrar';
+$labels['shortaclt'] = 'Borrar';
 $labels['shortacle'] = 'Expunge';
-$labels['shortaclx'] = 'Folder delete';
+$labels['shortaclx'] = 'Borrar cartafol';
 $labels['shortacla'] = 'Administrar';
 
-$labels['shortaclother'] = 'Other';
-$labels['shortaclread'] = 'Read';
-$labels['shortaclwrite'] = 'Write';
-$labels['shortacldelete'] = 'Delete';
+$labels['shortaclother'] = 'Outros';
+$labels['shortaclread'] = 'Lectura';
+$labels['shortaclwrite'] = 'Escritura';
+$labels['shortacldelete'] = 'Borrado';
 
-$labels['longacll'] = 'The folder is visible on lists and can be subscribed to';
+$labels['longacll'] = 'O cartafol é visible e pode ser suscrito';
 $labels['longaclr'] = 'The folder can be opened for reading';
 $labels['longacls'] = 'Messages Seen flag can be changed';
 $labels['longaclw'] = 'Messages flags and keywords can be changed, except Seen and Deleted';
@@ -93,7 +93,7 @@ $messages['updateerror'] = 'Ubable to update access rights';
 $messages['deleteerror'] = 'Unable to delete access rights';
 $messages['createerror'] = 'Unable to add access rights';
 $messages['deleteconfirm'] = 'Are you sure, you want to remove access rights of selected user(s)?';
-$messages['norights'] = 'No rights has been specified!';
-$messages['nouser'] = 'No username has been specified!';
+$messages['norights'] = 'Non se especificaron permisos!';
+$messages['nouser'] = 'Non se especificou o nome de usuario!';
 
 ?>
diff --git a/plugins/acl/localization/it_IT.inc b/plugins/acl/localization/it_IT.inc
index b4927fb..11d9053 100644
--- a/plugins/acl/localization/it_IT.inc
+++ b/plugins/acl/localization/it_IT.inc
@@ -41,7 +41,7 @@ $labels['aclx'] = 'Elimina cartella';
 $labels['acla'] = 'Amministra';
 
 $labels['aclfull'] = 'Controllo completo';
-$labels['aclother'] = 'Altri';
+$labels['aclother'] = 'Altro';
 $labels['aclread'] = 'Lettura';
 $labels['aclwrite'] = 'Scrittura';
 $labels['acldelete'] = 'Elimina';
@@ -57,10 +57,10 @@ $labels['shortaclk'] = 'Crea';
 $labels['shortacld'] = 'Elimina';
 $labels['shortaclt'] = 'Elimina';
 $labels['shortacle'] = 'Elimina';
-$labels['shortaclx'] = 'Cancella cartella';
+$labels['shortaclx'] = 'Elimina cartella';
 $labels['shortacla'] = 'Amministra';
 
-$labels['shortaclother'] = 'Altri';
+$labels['shortaclother'] = 'Altro';
 $labels['shortaclread'] = 'Lettura';
 $labels['shortaclwrite'] = 'Scrittura';
 $labels['shortacldelete'] = 'Elimina';
diff --git a/plugins/acl/localization/ko_KR.inc b/plugins/acl/localization/ko_KR.inc
index 85e3372..524427a 100644
--- a/plugins/acl/localization/ko_KR.inc
+++ b/plugins/acl/localization/ko_KR.inc
@@ -19,81 +19,81 @@
 $labels['sharing'] = '공유';
 $labels['myrights'] = '접근 권한';
 $labels['username'] = '사용자:';
-$labels['advanced'] = 'advanced mode';
+$labels['advanced'] = '고급 모드';
 $labels['newuser'] = '엔트리 추가';
-$labels['actions'] = 'Access right actions...';
-$labels['anyone'] = 'All users (anyone)';
-$labels['anonymous'] = 'Guests (anonymous)';
+$labels['actions'] = '접근 권한 동작...';
+$labels['anyone'] = '모든 사용자 (아무나)';
+$labels['anonymous'] = '방문자 (익명)';
 $labels['identifier'] = '식별자';
 
-$labels['acll'] = 'Lookup';
-$labels['aclr'] = 'Read messages';
+$labels['acll'] = '조회';
+$labels['aclr'] = '읽은 메시지';
 $labels['acls'] = '읽은 상태로 유지';
-$labels['aclw'] = 'Write flags';
-$labels['acli'] = 'Insert (Copy into)';
+$labels['aclw'] = '쓰기 깃발';
+$labels['acli'] = '삽입 (복사할 위치)';
 $labels['aclp'] = '게시';
 $labels['aclc'] = '하위 폴더 만들기';
 $labels['aclk'] = '하위 폴더 만들기';
 $labels['acld'] = '메시지 삭제';
 $labels['aclt'] = '메시지 삭제';
-$labels['acle'] = 'Expunge';
+$labels['acle'] = '영구 제거';
 $labels['aclx'] = '폴더 삭제';
 $labels['acla'] = '관리자';
 
-$labels['aclfull'] = 'Full control';
-$labels['aclother'] = 'Other';
-$labels['aclread'] = 'Read';
-$labels['aclwrite'] = 'Write';
-$labels['acldelete'] = 'Delete';
+$labels['aclfull'] = '전체 제어권';
+$labels['aclother'] = '기타';
+$labels['aclread'] = '읽기';
+$labels['aclwrite'] = '쓰기';
+$labels['acldelete'] = '삭제';
 
-$labels['shortacll'] = 'Lookup';
-$labels['shortaclr'] = 'Read';
-$labels['shortacls'] = 'Keep';
-$labels['shortaclw'] = 'Write';
-$labels['shortacli'] = 'Insert';
+$labels['shortacll'] = '조회';
+$labels['shortaclr'] = '읽기';
+$labels['shortacls'] = 'ë³´ê´€';
+$labels['shortaclw'] = '쓰기';
+$labels['shortacli'] = '삽입';
 $labels['shortaclp'] = '게시';
-$labels['shortaclc'] = 'Create';
-$labels['shortaclk'] = 'Create';
-$labels['shortacld'] = 'Delete';
-$labels['shortaclt'] = 'Delete';
-$labels['shortacle'] = 'Expunge';
+$labels['shortaclc'] = '생성';
+$labels['shortaclk'] = '생성';
+$labels['shortacld'] = '삭제';
+$labels['shortaclt'] = '삭제';
+$labels['shortacle'] = '지움';
 $labels['shortaclx'] = '폴더 삭제';
-$labels['shortacla'] = '관리자';
+$labels['shortacla'] = '관리';
 
-$labels['shortaclother'] = 'Other';
-$labels['shortaclread'] = 'Read';
-$labels['shortaclwrite'] = 'Write';
-$labels['shortacldelete'] = 'Delete';
+$labels['shortaclother'] = '기타';
+$labels['shortaclread'] = '읽기';
+$labels['shortaclwrite'] = '쓱';
+$labels['shortacldelete'] = '삭제';
 
-$labels['longacll'] = 'The folder is visible on lists and can be subscribed to';
-$labels['longaclr'] = 'The folder can be opened for reading';
-$labels['longacls'] = 'Messages Seen flag can be changed';
-$labels['longaclw'] = 'Messages flags and keywords can be changed, except Seen and Deleted';
-$labels['longacli'] = '폴더에 메시지를 복사하거나 작성할 수 있음';
-$labels['longaclp'] = '이 폴더로 메시지를 게시할 수 있음';
-$labels['longaclc'] = '이 폴더의 바로 밑에 폴더를 생성(또는 이름 변경)할 수 있음';
-$labels['longaclk'] = '이 폴더의 바로 밑에 폴더를 생성(또는 이름 변경)할 수 있음';
-$labels['longacld'] = '메시지 삭제 플래그가 변경될 수 있음';
-$labels['longaclt'] = '메시지 삭제 플래그가 변경될 수 있음';
-$labels['longacle'] = 'Messages can be expunged';
-$labels['longaclx'] = '폴더를 삭제하거나 이름 변경 할 수 있음';
+$labels['longacll'] = '폴더가 목록에 나타나고 다음 사용자가 구독할 수 있음:';
+$labels['longaclr'] = '읽기 위해 폴더를 열 수 있음';
+$labels['longacls'] = '읽은 메시지 깃발이 변경될 수 있음';
+$labels['longaclw'] = '메시지 깃발 및 키워드를 변경할 수 있음, 다만 읽음 및 삭제됨은 제외';
+$labels['longacli'] = '메시지를 폴더에 복사하거나 작성할 수 있음';
+$labels['longaclp'] = '메시지를 이 폴더로 게시할 수 있음';
+$labels['longaclc'] = '이 폴더의 바로 아래에 폴더를 생성(또는 이름 변경)할 수 있음';
+$labels['longaclk'] = '이 폴더의 바로 아래에 폴더를 생성(또는 이름 변경)할 수 있음';
+$labels['longacld'] = '메시지 삭제 깃발이 변경될 수 있음';
+$labels['longaclt'] = '메시지 삭제 깃발이 변경될 수 있음';
+$labels['longacle'] = '메시지가 영구 제거될 수 있음';
+$labels['longaclx'] = '폴더를 삭제하거나 이름을 변경 할 수 있음';
 $labels['longacla'] = '폴더의 접근 권한을 변경할 수 있음';
 
 $labels['longaclfull'] = '폴더 관리를 포함한 모든 제어권';
-$labels['longaclread'] = 'The folder can be opened for reading';
-$labels['longaclwrite'] = '메시지에 표시하거나, 폴더로 메시지를 복사하거나 작성할 수 있음';
+$labels['longaclread'] = '폴더를 열어 읽을 수 있음';
+$labels['longaclwrite'] = '메시지에 표시하거나, 폴더로 이동하거나 복사할 수 있음';
 $labels['longacldelete'] = '메시지를 삭제할 수 있음';
 
-$messages['deleting'] = '접근 권한 삭제 중...';
-$messages['saving'] = '접근 권한 저장 중...';
-$messages['updatesuccess'] = '접근 권한을 변경하는데 성공 함.';
-$messages['deletesuccess'] = '접근 권한을 삭제하는데 성공 함.';
-$messages['createsuccess'] = '접근 권한을 추가하는데 성공 함.';
-$messages['updateerror'] = '접근 권한을 갱신할 수 없음.';
+$messages['deleting'] = '접근 권한을 삭제하는 중...';
+$messages['saving'] = '접근 권한을 저장하는 중...';
+$messages['updatesuccess'] = '접근 권한을 성공적으로 변경함.';
+$messages['deletesuccess'] = '접근 권한을 성공적으로 삭제함.';
+$messages['createsuccess'] = '접근 권한을 성공적으로 추가함.';
+$messages['updateerror'] = '접근 권한을 업데이트할 수 없음.';
 $messages['deleteerror'] = '접근 권한을 삭제할 수 없음.';
 $messages['createerror'] = '접근 권한을 추가할 수 없음.';
-$messages['deleteconfirm'] = '선택한 사용자(들)의 접근 권한을 삭제하고자 하는 것이 확실 합니까?';
+$messages['deleteconfirm'] = '정말로 선택한 사용자의 접근 권한을 삭제하시겠습니까?';
 $messages['norights'] = '지정된 권한이 없음!';
-$messages['nouser'] = '지정된 username이 없음!';
+$messages['nouser'] = '지정된 사용자명이 없음!';
 
 ?>
diff --git a/plugins/acl/localization/lt_LT.inc b/plugins/acl/localization/lt_LT.inc
index 6507504..5939301 100644
--- a/plugins/acl/localization/lt_LT.inc
+++ b/plugins/acl/localization/lt_LT.inc
@@ -70,7 +70,7 @@ $labels['longaclr'] = 'Aplanką galima peržiūrėti';
 $labels['longacls'] = 'Pranešimų vėliavėlė "Matyta" gali būti pakeista';
 $labels['longaclw'] = 'Pranešimų vėliavėlės ir raktažodžiai gali būti pakeisti, išskyrus "Matytas" ir "Ištrintas"';
 $labels['longacli'] = 'Pranešimai gali būti įrašyti arba nukopijuoti į aplanką';
-$labels['longaclp'] = 'Messages can be posted to this folder';
+$labels['longaclp'] = 'Į šį aplanką galima dėti laiškus.';
 $labels['longaclc'] = 'Nauji aplankai gali būti kuriami (arba pervadinami) šioje direktorijoje';
 $labels['longaclk'] = 'Nauji aplankai gali būti kuriami (arba pervadinami) šioje direktorijoje';
 $labels['longacld'] = 'Pranešimų vėliavėlė "Ištrintas" gali būti pakeista';
diff --git a/plugins/acl/localization/ro_RO.inc b/plugins/acl/localization/ro_RO.inc
index e87524a..17124e4 100644
--- a/plugins/acl/localization/ro_RO.inc
+++ b/plugins/acl/localization/ro_RO.inc
@@ -28,7 +28,7 @@ $labels['identifier'] = 'Identificator';
 
 $labels['acll'] = 'Caută';
 $labels['aclr'] = 'Citire mesaje';
-$labels['acls'] = 'Menține starea de Vâzut';
+$labels['acls'] = 'Menține starea citirii';
 $labels['aclw'] = 'Indicator scriere';
 $labels['acli'] = 'Inserare (copiere în)';
 $labels['aclp'] = 'Postează';
@@ -65,7 +65,7 @@ $labels['shortaclread'] = 'CiteÅŸte';
 $labels['shortaclwrite'] = 'Scrie';
 $labels['shortacldelete'] = 'Șterge';
 
-$labels['longacll'] = 'Dosarul este vizibil pe liste și se poate înscrie pe el';
+$labels['longacll'] = 'Dosarul este vizibil pe liste și se poate subscrie la acesta';
 $labels['longaclr'] = 'Dosarul se poate deschide pentru citire';
 $labels['longacls'] = 'Indicatorul de Văzut a fost schimbat';
 $labels['longaclw'] = 'Indicatoarele și cuvintele cheie ale mesajelor se pot schimba cu excepția Văzut și Șters';
@@ -73,8 +73,8 @@ $labels['longacli'] = 'Mesajul se poate scrie sau copia într-un dosar';
 $labels['longaclp'] = 'Mesajele se pot trimite către acest dosar';
 $labels['longaclc'] = 'Dosarele se pot crea (sau redenumi) direct sub acest dosar';
 $labels['longaclk'] = 'Dosarele se pot crea (sau redenumi) direct sub acest dosar';
-$labels['longacld'] = 'Indicatorul de Șters al mesajelor se pot modifica';
-$labels['longaclt'] = 'Indicatorul de Șters al mesajelor se pot modifica';
+$labels['longacld'] = 'Indicatorul de Șters al mesajelor se poate modifica';
+$labels['longaclt'] = 'Indicatorul de Șters al mesajelor se poate modifica';
 $labels['longacle'] = 'Mesajele se pot elimina';
 $labels['longaclx'] = 'Dosarul se poate șterge sau redenumi';
 $labels['longacla'] = 'Drepturile de acces la dosar se pot schimba';
@@ -82,18 +82,18 @@ $labels['longacla'] = 'Drepturile de acces la dosar se pot schimba';
 $labels['longaclfull'] = 'Control complet include și administrare dosar';
 $labels['longaclread'] = 'Dosarul se poate deschide pentru citire';
 $labels['longaclwrite'] = 'Mesajul se poate marca, scrie sau copia într-un dosar';
-$labels['longacldelete'] = 'Mesajul se poate șterge';
+$labels['longacldelete'] = 'Mesajele se pot șterge';
 
-$messages['deleting'] = 'Drepturile de acces la ștergere...';
-$messages['saving'] = 'Drepturile de acces la salvare...';
+$messages['deleting'] = 'Șterg drepturile de access...';
+$messages['saving'] = 'Salvez drepturi accesare...';
 $messages['updatesuccess'] = 'Drepturile de acces au fost schimbate cu succes';
 $messages['deletesuccess'] = 'Drepturile de acces au fost șterse cu succes';
 $messages['createsuccess'] = 'Drepturile de acces au fost adăugate cu succes';
-$messages['updateerror'] = 'Nu sau putut actualiza drepturile de acces';
-$messages['deleteerror'] = 'Nu sau putut șterge drepturile de acces';
-$messages['createerror'] = 'Nu sau putut adăuga drepturi de acces';
-$messages['deleteconfirm'] = 'Sunteți sigur că doriți să ștergeți drepturile de acces la utilizatorul(i) selectați?';
+$messages['updateerror'] = 'Unable to update access rights';
+$messages['deleteerror'] = 'Nu s-au putut șterge drepturile de acces';
+$messages['createerror'] = 'Nu s-au putut adăuga drepturi de acces';
+$messages['deleteconfirm'] = 'Sunteți sigur că doriți să ștergeți drepturile de acces la utilizatorul (ii) selectați?';
 $messages['norights'] = 'Nu au fost specificate drepturi!';
-$messages['nouser'] = 'Nu a fost specificat nume de utilizator!';
+$messages['nouser'] = 'Nu a fost specificat niciun utilizator!';
 
 ?>
diff --git a/plugins/acl/localization/zh_CN.inc b/plugins/acl/localization/zh_CN.inc
index 0c51716..ebf3140 100644
--- a/plugins/acl/localization/zh_CN.inc
+++ b/plugins/acl/localization/zh_CN.inc
@@ -16,12 +16,12 @@
  For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-acl/
 */
 
-$labels['sharing'] = '共享中';
+$labels['sharing'] = '共享';
 $labels['myrights'] = '访问权限';
 $labels['username'] = '用户:';
 $labels['advanced'] = '高级模式';
-$labels['newuser'] = '添加条目';
-$labels['actions'] = 'Access right actions...';
+$labels['newuser'] = '新增条目';
+$labels['actions'] = '权限设置...';
 $labels['anyone'] = '所有用户(任何人)';
 $labels['anonymous'] = '来宾(匿名)';
 $labels['identifier'] = '标识符';
@@ -29,7 +29,7 @@ $labels['identifier'] = '标识符';
 $labels['acll'] = '查找';
 $labels['aclr'] = '读取消息';
 $labels['acls'] = '保存已读状态';
-$labels['aclw'] = 'Write flags';
+$labels['aclw'] = '写入标志';
 $labels['acli'] = '插入(复制至)';
 $labels['aclp'] = '发送';
 $labels['aclc'] = '创建子文件夹';
@@ -41,15 +41,15 @@ $labels['aclx'] = '删除文件夹';
 $labels['acla'] = '管理';
 
 $labels['aclfull'] = '全部控制';
-$labels['aclother'] = '其他';
-$labels['aclread'] = '阅读';
-$labels['aclwrite'] = '撰写';
+$labels['aclother'] = '其它';
+$labels['aclread'] = '读取';
+$labels['aclwrite'] = '写入';
 $labels['acldelete'] = '删除';
 
 $labels['shortacll'] = '查找';
-$labels['shortaclr'] = '阅读';
-$labels['shortacls'] = '保留';
-$labels['shortaclw'] = '撰写';
+$labels['shortaclr'] = '读取';
+$labels['shortacls'] = '保存';
+$labels['shortaclw'] = '写入';
 $labels['shortacli'] = '插入';
 $labels['shortaclp'] = '发送';
 $labels['shortaclc'] = '新建';
@@ -61,22 +61,22 @@ $labels['shortaclx'] = '删除文件夹';
 $labels['shortacla'] = '管理';
 
 $labels['shortaclother'] = '其他';
-$labels['shortaclread'] = 'Read';
-$labels['shortaclwrite'] = '撰写';
+$labels['shortaclread'] = '读取';
+$labels['shortaclwrite'] = '写入';
 $labels['shortacldelete'] = '删除';
 
 $labels['longacll'] = '该文件夹在列表上可见且可被订阅';
 $labels['longaclr'] = '该文件夹可被打开阅读';
 $labels['longacls'] = 'Messages Seen flag can be changed';
 $labels['longaclw'] = 'Messages flags and keywords can be changed, except Seen and Deleted';
-$labels['longacli'] = 'Messages can be written or copied to the folder';
+$labels['longacli'] = '消息可写或可被复制至文件夹中';
 $labels['longaclp'] = 'Messages can be posted to this folder';
 $labels['longaclc'] = 'Folders can be created (or renamed) directly under this folder';
 $labels['longaclk'] = 'Folders can be created (or renamed) directly under this folder';
 $labels['longacld'] = 'Messages Delete flag can be changed';
 $labels['longaclt'] = 'Messages Delete flag can be changed';
 $labels['longacle'] = '消息可被清除';
-$labels['longaclx'] = '该文件夹可悲删除或重命名';
+$labels['longaclx'] = '该文件夹可被删除或重命名';
 $labels['longacla'] = '文件夹访问权限可被修改';
 
 $labels['longaclfull'] = 'Full control including folder administration';
diff --git a/plugins/acl/localization/zh_TW.inc b/plugins/acl/localization/zh_TW.inc
index 3125c28..821f7b3 100644
--- a/plugins/acl/localization/zh_TW.inc
+++ b/plugins/acl/localization/zh_TW.inc
@@ -65,10 +65,10 @@ $labels['shortaclread'] = '讀取';
 $labels['shortaclwrite'] = '寫入';
 $labels['shortacldelete'] = '刪除';
 
-$labels['longacll'] = 'The folder is visible on lists and can be subscribed to';
+$labels['longacll'] = '此資料夾權限可以訂閱和瀏覽';
 $labels['longaclr'] = '資料夾能被打開與讀取';
 $labels['longacls'] = '能修改訊息標幟';
-$labels['longaclw'] = 'Messages flags and keywords can be changed, except Seen and Deleted';
+$labels['longaclw'] = '內容旗標和關鍵字可以變更,不包含已檢視和刪除的';
 $labels['longacli'] = '訊息能寫入或複製到資料夾';
 $labels['longaclp'] = '訊息能被投遞到這個資料夾';
 $labels['longaclc'] = '這個資料夾之下可以建子資料夾(或重新命名)';
diff --git a/plugins/acl/skins/classic/acl.css b/plugins/acl/skins/classic/acl.css
index cf3391f..0764465 100644
--- a/plugins/acl/skins/classic/acl.css
+++ b/plugins/acl/skins/classic/acl.css
@@ -47,12 +47,12 @@
 
 #acltable tbody td.partial
 {
-  background: url(images/partial.png) center no-repeat;
+  background: url(images/partial.png?v=05d7.389) center no-repeat;
 }
 
 #acltable tbody td.enabled
 {
-  background: url(images/enabled.png) center no-repeat;
+  background: url(images/enabled.png?v=9d9a.674) center no-repeat;
 }
 
 #acltable tr.selected td
diff --git a/plugins/acl/skins/larry/acl.css b/plugins/acl/skins/larry/acl.css
index e392a26..67512a6 100644
--- a/plugins/acl/skins/larry/acl.css
+++ b/plugins/acl/skins/larry/acl.css
@@ -65,14 +65,14 @@
 
 #acltable tbody td.partial
 {
-  background-image: url(images/partial.png);
+  background-image: url(images/partial.png?v=05d7.389);
   background-position: center;
   background-repeat: no-repeat;
 }
 
 #acltable tbody td.enabled
 {
-  background-image: url(images/enabled.png);
+  background-image: url(images/enabled.png?v=9d9a.674);
   background-position: center;
   background-repeat: no-repeat;
 }
@@ -80,21 +80,21 @@
 #acltable tbody tr.selected td.partial
 {
   background-color: #019bc6;
-  background-image: url(images/partial.png), -moz-linear-gradient(top, #019bc6 0%, #017cb4 100%);
-  background-image: url(images/partial.png), -webkit-gradient(linear, left top, left bottom, color-stop(0%,#019bc6), color-stop(100%,#017cb4));
-  background-image: url(images/partial.png), -o-linear-gradient(top, #019bc6 0%, #017cb4 100%);
-  background-image: url(images/partial.png), -ms-linear-gradient(top, #019bc6 0%, #017cb4 100%);
-  background-image: url(images/partial.png), linear-gradient(top, #019bc6 0%, #017cb4 100%);
+  background-image: url(images/partial.png?v=05d7.389), -moz-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+  background-image: url(images/partial.png?v=05d7.389), -webkit-gradient(linear, left top, left bottom, color-stop(0%,#019bc6), color-stop(100%,#017cb4));
+  background-image: url(images/partial.png?v=05d7.389), -o-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+  background-image: url(images/partial.png?v=05d7.389), -ms-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+  background-image: url(images/partial.png?v=05d7.389), linear-gradient(top, #019bc6 0%, #017cb4 100%);
 }
 
 #acltable tbody tr.selected td.enabled
 {
   background-color: #019bc6;
-  background-image: url(images/enabled.png), -moz-linear-gradient(top, #019bc6 0%, #017cb4 100%);
-  background-image: url(images/enabled.png), -webkit-gradient(linear, left top, left bottom, color-stop(0%,#019bc6), color-stop(100%,#017cb4));
-  background-image: url(images/enabled.png), -o-linear-gradient(top, #019bc6 0%, #017cb4 100%);
-  background-image: url(images/enabled.png), -ms-linear-gradient(top, #019bc6 0%, #017cb4 100%);
-  background-image: url(images/enabled.png), linear-gradient(top, #019bc6 0%, #017cb4 100%);
+  background-image: url(images/enabled.png?v=9d9a.674), -moz-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+  background-image: url(images/enabled.png?v=9d9a.674), -webkit-gradient(linear, left top, left bottom, color-stop(0%,#019bc6), color-stop(100%,#017cb4));
+  background-image: url(images/enabled.png?v=9d9a.674), -o-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+  background-image: url(images/enabled.png?v=9d9a.674), -ms-linear-gradient(top, #019bc6 0%, #017cb4 100%);
+  background-image: url(images/enabled.png?v=9d9a.674), linear-gradient(top, #019bc6 0%, #017cb4 100%);
 }
 
 #aclform
diff --git a/plugins/archive/localization/az_AZ.inc b/plugins/archive/localization/az_AZ.inc
index 8aab6f2..19a409d 100644
--- a/plugins/archive/localization/az_AZ.inc
+++ b/plugins/archive/localization/az_AZ.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Arxiv';
 $labels['buttontitle'] = 'Mesajı arxivə göndər';
 $labels['archived'] = 'Arxivə göndərildi';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Müvəffəqiyyətlə arxivləşdirildi. Yeni arxiv qovluqlarını görmək üçün səhifəni yeniləyin.';
+$labels['archiveerror'] = 'Bəzi məktublar arxivləşdirilə bilinmirlər';
 $labels['archivefolder'] = 'Arxiv';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Arxiv';
+$labels['archivetype'] = 'Arxivi böl: ';
+$labels['archivetypeyear'] = 'İl (məs. Arxiv/2012)';
+$labels['archivetypemonth'] = 'Ay (məs. Arxiv/2012/06)';
+$labels['archivetypefolder'] = 'Orijinal qovluq';
+$labels['archivetypesender'] = 'Göndərənin E-Poçtu';
+$labels['unkownsender'] = 'naməlum';
 
 ?>
diff --git a/plugins/archive/localization/bg_BG.inc b/plugins/archive/localization/bg_BG.inc
index fd32931..b7be242 100644
--- a/plugins/archive/localization/bg_BG.inc
+++ b/plugins/archive/localization/bg_BG.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Архивиране';
 $labels['buttontitle'] = 'Архивиране на съобщението';
 $labels['archived'] = 'Архивирането е успешно';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Успешно архивирано. Презаредете страницата за да видите архивираните папки.';
+$labels['archiveerror'] = 'Някои съобщения не бяха архивирани';
 $labels['archivefolder'] = 'Архивиране';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Архив';
+$labels['archivetype'] = 'Раздели архива по';
+$labels['archivetypeyear'] = 'Година (пр. Архив/2012)';
+$labels['archivetypemonth'] = 'Месец (пр. Архив/2012/06)';
+$labels['archivetypefolder'] = 'Оригинална папка';
+$labels['archivetypesender'] = 'Email адрес на изпращача';
+$labels['unkownsender'] = 'неизвестно';
 
 ?>
diff --git a/plugins/archive/localization/ca_ES.inc b/plugins/archive/localization/ca_ES.inc
index fde7d35..04ade1d 100644
--- a/plugins/archive/localization/ca_ES.inc
+++ b/plugins/archive/localization/ca_ES.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Arxiva';
 $labels['buttontitle'] = 'Arxiva aquest missatge';
 $labels['archived'] = 'Arxivat correctament';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Arxivat correctament. Recarregueu la pàgina per veure les noves carpetes de l\'arxiu.';
+$labels['archiveerror'] = 'Alguns missatges no han pogut ser arxivats';
 $labels['archivefolder'] = 'Arxiva';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Arxiu';
+$labels['archivetype'] = 'Dividir arxiu per';
+$labels['archivetypeyear'] = 'Any (p.ex. Arxiu/2012)';
+$labels['archivetypemonth'] = 'Mes (p.ex. Arxiu/2012/06)';
+$labels['archivetypefolder'] = 'Carpeta original';
+$labels['archivetypesender'] = 'Adreça del remitent';
+$labels['unkownsender'] = 'desconegut';
 
 ?>
diff --git a/plugins/archive/localization/cs_CZ.inc b/plugins/archive/localization/cs_CZ.inc
index 2f2fd95..e71aa5f 100644
--- a/plugins/archive/localization/cs_CZ.inc
+++ b/plugins/archive/localization/cs_CZ.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Archiv';
 $labels['buttontitle'] = 'Archivovat zprávu';
 $labels['archived'] = 'Úspěšně vloženo do archivu';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Úspěšně archivovány. Obnovte stránku, abyste uviděli nové složky v archivu.';
+$labels['archiveerror'] = 'Některé zprávy nelze archivovat';
 $labels['archivefolder'] = 'Archiv';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Archiv';
+$labels['archivetype'] = 'Rozdělit archiv podle';
+$labels['archivetypeyear'] = 'Rok (napÅ™.  Archiv/2012)';
+$labels['archivetypemonth'] = 'Měsíc (např. Archiv/2012/06)';
+$labels['archivetypefolder'] = 'Původní složka';
+$labels['archivetypesender'] = 'E-mail odesílatele';
+$labels['unkownsender'] = 'neznámý';
 
 ?>
diff --git a/plugins/archive/localization/cy_GB.inc b/plugins/archive/localization/cy_GB.inc
index fa8e197..454c26d 100644
--- a/plugins/archive/localization/cy_GB.inc
+++ b/plugins/archive/localization/cy_GB.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Archif';
 $labels['buttontitle'] = 'Archifo\'r neges hwn';
 $labels['archived'] = 'Archifwyd yn llwyddiannus';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Archifwyd yn llwyddiannus. Ail-lwythwch y dudalen i weld ffolderi archif newydd.';
+$labels['archiveerror'] = 'Nid oedd yn bosib archifo rhai negeseuon';
 $labels['archivefolder'] = 'Archif';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Archif';
+$labels['archivetype'] = 'Rhannu archif gyda';
+$labels['archivetypeyear'] = 'Blwyddyn (e.g. Archif/2012)';
+$labels['archivetypemonth'] = 'Mis (e.g. Archif/2012/06)';
+$labels['archivetypefolder'] = 'Ffolder gwreiddiol';
+$labels['archivetypesender'] = 'Ebost anfonwr';
+$labels['unkownsender'] = 'anhysbys';
 
 ?>
diff --git a/plugins/archive/localization/da_DK.inc b/plugins/archive/localization/da_DK.inc
index d4a88ca..ac67700 100644
--- a/plugins/archive/localization/da_DK.inc
+++ b/plugins/archive/localization/da_DK.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Arkiv';
 $labels['buttontitle'] = 'Arkivér denne besked';
 $labels['archived'] = 'Succesfuldt arkiveret.';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Arkivering lykkedes. Genindlæs siden for at se den nye arkiv mappe.';
+$labels['archiveerror'] = 'Nogle meddelelser kunne ikke arkiveres';
 $labels['archivefolder'] = 'Arkiv';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Arkiver';
+$labels['archivetype'] = 'Del arkiv med';
+$labels['archivetypeyear'] = 'Ã…r (f.eks. Arkiv/2012)';
+$labels['archivetypemonth'] = 'MÃ¥ned (f.eks. Arkiv/2012/06)';
+$labels['archivetypefolder'] = 'Original mappe';
+$labels['archivetypesender'] = 'Afsenders email';
+$labels['unkownsender'] = 'ukendt';
 
 ?>
diff --git a/plugins/archive/localization/el_GR.inc b/plugins/archive/localization/el_GR.inc
index 57a98ab..6da9f7d 100644
--- a/plugins/archive/localization/el_GR.inc
+++ b/plugins/archive/localization/el_GR.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Αρχειοθέτηση';
 $labels['buttontitle'] = 'Αρχειοθέτηση μηνύματος';
 $labels['archived'] = 'Αρχειοθετήθηκε με επιτυχία';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Επιτυχής αρχειοθετηση. Ανανέωση της σελίδας για να δείτε τους νέους φακέλους αρχειοθέτησης. ';
+$labels['archiveerror'] = 'Ορισμένα μηνύματα δεν μπορεσαν να αρχειοθετηθουν. ';
 $labels['archivefolder'] = 'Αρχειοθέτηση';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Αρχειοθέτηση';
+$labels['archivetype'] = 'Χασμα αρχειου απο';
+$labels['archivetypeyear'] = 'Χρονος (π.χ. Αρχειο/2012)';
+$labels['archivetypemonth'] = 'Μηνας (π.χ. Αρχειο/2012/06)';
+$labels['archivetypefolder'] = 'Αυθεντικος φακελος';
+$labels['archivetypesender'] = 'Αποστολέας email';
+$labels['unkownsender'] = 'άγνωστο';
 
 ?>
diff --git a/plugins/archive/localization/es_AR.inc b/plugins/archive/localization/es_AR.inc
index ad9e84a..5fb0824 100644
--- a/plugins/archive/localization/es_AR.inc
+++ b/plugins/archive/localization/es_AR.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Archivo';
 $labels['buttontitle'] = 'Archivar este mensaje';
 $labels['archived'] = 'Mensaje Archivado';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Archivado satisfactoriamente. Recarga la página para ver las nuevas capetas archivadas.';
+$labels['archiveerror'] = 'Algunos mensajes no pudieron archivarse';
 $labels['archivefolder'] = 'Archivo';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Archivo';
+$labels['archivetype'] = 'Separar archivo por';
+$labels['archivetypeyear'] = 'Año (ej. Archivo/2012)';
+$labels['archivetypemonth'] = 'Mes (ej. Archivo/2012/06)';
+$labels['archivetypefolder'] = 'Carpeta original';
+$labels['archivetypesender'] = 'Remitente del correo';
+$labels['unkownsender'] = 'desconocido';
 
 ?>
diff --git a/plugins/archive/localization/fr_FR.inc b/plugins/archive/localization/fr_FR.inc
index fbed872..638de3a 100644
--- a/plugins/archive/localization/fr_FR.inc
+++ b/plugins/archive/localization/fr_FR.inc
@@ -19,16 +19,16 @@
 $labels = array();
 $labels['buttontext'] = 'Archive';
 $labels['buttontitle'] = 'Archiver ce message';
-$labels['archived'] = 'Message archivé avec success';
+$labels['archived'] = 'Message archivé avec succès';
 $labels['archivedreload'] = 'Archivé avec succès. Rechargez la page pour voir les nouveaux dossiers d\'archivage.';
 $labels['archiveerror'] = 'Certains messages n\'ont pas pu être archivés.';
 $labels['archivefolder'] = 'Archive';
 $labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Diviser l\'archive en';
+$labels['archivetype'] = 'Diviser l\'archive par';
 $labels['archivetypeyear'] = 'Année (ex Archives/2012)';
 $labels['archivetypemonth'] = 'Mois (ex Archives/2012/06)';
 $labels['archivetypefolder'] = 'Dossier original';
-$labels['archivetypesender'] = 'Email de l\'émetteur';
+$labels['archivetypesender'] = 'Courriel de l\'émetteur';
 $labels['unkownsender'] = 'inconnu';
 
 ?>
diff --git a/plugins/archive/localization/gl_ES.inc b/plugins/archive/localization/gl_ES.inc
index 09b64b2..55180fe 100644
--- a/plugins/archive/localization/gl_ES.inc
+++ b/plugins/archive/localization/gl_ES.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Arquivo';
 $labels['buttontitle'] = 'Arquivar esta mensaxe';
 $labels['archived'] = 'Aquivouse a mensaxe';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Arquivado correctamente. Recargue a páxina para ver os novos cartafoles de arquivado.';
+$labels['archiveerror'] = 'Non se puideron arquivar algunhas mensaxes';
 $labels['archivefolder'] = 'Arquivo';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Arquivar';
+$labels['archivetype'] = 'Dividir o arquivo por';
+$labels['archivetypeyear'] = 'Ano (p.ex. Arquivo/2012)';
+$labels['archivetypemonth'] = 'Mes (p.ex. Arquivo/2012/06)';
+$labels['archivetypefolder'] = 'Cartafol orixe';
+$labels['archivetypesender'] = 'Enderezo do remitente';
+$labels['unkownsender'] = 'descoñecido';
 
 ?>
diff --git a/plugins/archive/localization/he_IL.inc b/plugins/archive/localization/he_IL.inc
index 834e467..37bcaaa 100644
--- a/plugins/archive/localization/he_IL.inc
+++ b/plugins/archive/localization/he_IL.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'ארכיון';
 $labels['buttontitle'] = 'משלוח ההודעה לארכיב';
 $labels['archived'] = 'עדכון הארכיון הצליח';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'נשמר בהצלחה בארכיב. יש לרענו את הדף כדי לראות את התיקיות החדשות בארכיב.';
+$labels['archiveerror'] = 'לא ניתן היה להעביר לארכיב חלק מההודעות';
 $labels['archivefolder'] = 'ארכיון';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'ארכיב';
+$labels['archivetype'] = 'לחלק את הארכיב על ידי';
+$labels['archivetypeyear'] = 'שנה ( לדוגמה, ארכיב/2012/96 )';
+$labels['archivetypemonth'] = 'חודש ( לדוגמה, ארכיב/2012/96 )';
+$labels['archivetypefolder'] = 'תיקיה מקורית';
+$labels['archivetypesender'] = 'שולח ההודעה';
+$labels['unkownsender'] = 'לא ידוע';
 
 ?>
diff --git a/plugins/archive/localization/hu_HU.inc b/plugins/archive/localization/hu_HU.inc
index e95c2d0..970a241 100644
--- a/plugins/archive/localization/hu_HU.inc
+++ b/plugins/archive/localization/hu_HU.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Archiválás';
 $labels['buttontitle'] = 'Üzenet archiválása';
 $labels['archived'] = 'Sikeres archiválás';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Az arhiválás sikeres. Frissitsd az oldalt, hogy lásd a létrejött arhivum mappákat.';
+$labels['archiveerror'] = 'Néhány üzenetet nem sikerült arhiválni';
 $labels['archivefolder'] = 'Archiválás';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
+$labels['settingstitle'] = 'Archiválás';
+$labels['archivetype'] = 'Arhívum tovább bontása a következő szerint';
+$labels['archivetypeyear'] = 'Év ( pl Arhívum/2012)';
+$labels['archivetypemonth'] = 'Honap ( pl Arhívum/2012/06)';
+$labels['archivetypefolder'] = 'Eredeti mappa';
+$labels['archivetypesender'] = 'Feladó';
 $labels['unkownsender'] = 'ismeretlen';
 
 ?>
diff --git a/plugins/archive/localization/ko_KR.inc b/plugins/archive/localization/ko_KR.inc
index 96a7ac4..4226420 100644
--- a/plugins/archive/localization/ko_KR.inc
+++ b/plugins/archive/localization/ko_KR.inc
@@ -19,16 +19,16 @@
 $labels = array();
 $labels['buttontext'] = 'ë³´ê´€';
 $labels['buttontitle'] = '이 메시지를 보관';
-$labels['archived'] = '성공적으로 보관 됨';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archived'] = '성공적으로 보관됨';
+$labels['archivedreload'] = '성공적으로 보관됨. 페이지를 다시 불러와서 새 보관 폴더를 확인하세요.';
+$labels['archiveerror'] = '일부 메시지가 보관되지 않음';
 $labels['archivefolder'] = 'ë³´ê´€';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'ë³´ê´€';
+$labels['archivetype'] = '보관된 메시지 정리 기준';
+$labels['archivetypeyear'] = '연도 (예: 보관 편지함/2012)';
+$labels['archivetypemonth'] = '월 (예: 보관 편지함/2012/06)';
+$labels['archivetypefolder'] = '원본 폴더';
+$labels['archivetypesender'] = '발신인 이메일';
+$labels['unkownsender'] = '알 수 없음';
 
 ?>
diff --git a/plugins/archive/localization/lt_LT.inc b/plugins/archive/localization/lt_LT.inc
index 3604627..069a656 100644
--- a/plugins/archive/localization/lt_LT.inc
+++ b/plugins/archive/localization/lt_LT.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Archyvuoti';
 $labels['buttontitle'] = 'Perkelti šį laišką į archyvą';
 $labels['archived'] = 'Laiškas sėkmingai perkeltas į archyvą';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Sėkmingai perkelta į archyvą. Iš naujo įkelkite puslapį, kad pamatytumėt pasikeitimus.';
+$labels['archiveerror'] = 'Į archyvą nepavyko perkelti keleto laiškų.';
 $labels['archivefolder'] = 'Archyvuoti';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Archyvuoti';
+$labels['archivetype'] = 'Padalinti archyvÄ… pagal';
+$labels['archivetypeyear'] = 'Metai (pvz. Archyvas/2012)';
+$labels['archivetypemonth'] = 'MÄ—nesis (pvz. Archyvas/2012/06)';
+$labels['archivetypefolder'] = 'Tikrasis aplankas';
+$labels['archivetypesender'] = 'Siuntėjo el. pašto adresas';
+$labels['unkownsender'] = 'nežinomas';
 
 ?>
diff --git a/plugins/archive/localization/pt_BR.inc b/plugins/archive/localization/pt_BR.inc
index 6439780..3df6cfd 100644
--- a/plugins/archive/localization/pt_BR.inc
+++ b/plugins/archive/localization/pt_BR.inc
@@ -20,13 +20,13 @@ $labels = array();
 $labels['buttontext'] = 'Arquivo';
 $labels['buttontitle'] = 'Arquivar esta mensagem';
 $labels['archived'] = 'Arquivada com sucesso';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
+$labels['archivedreload'] = 'Arquivado com sucesso. Recarregue a página para ver as novas pastas de arquivo.';
 $labels['archiveerror'] = 'Algumas mensagens não puderam ser arquivadas';
 $labels['archivefolder'] = 'Arquivo';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
+$labels['settingstitle'] = 'Arquivo';
+$labels['archivetype'] = 'Dividir arquivo por';
+$labels['archivetypeyear'] = 'Ano (isto é, Arquivo/2012)';
+$labels['archivetypemonth'] = 'Mês (isto é, Arquivo/2012/06)';
 $labels['archivetypefolder'] = 'Pasta original';
 $labels['archivetypesender'] = 'E-mail do remetente';
 $labels['unkownsender'] = 'desconhecido';
diff --git a/plugins/archive/localization/ro_RO.inc b/plugins/archive/localization/ro_RO.inc
index e88e918..6fa5cee 100644
--- a/plugins/archive/localization/ro_RO.inc
+++ b/plugins/archive/localization/ro_RO.inc
@@ -18,13 +18,13 @@
 
 $labels = array();
 $labels['buttontext'] = 'Arhivă';
-$labels['buttontitle'] = 'Arhivează acest mesaj.';
+$labels['buttontitle'] = 'Arhivează mesajul.';
 $labels['archived'] = 'Arhivare reuşită.';
 $labels['archivedreload'] = 'Arhivat cu succes. Reîncărcați pagina pentru a vedea noul dosar de arhivare.';
-$labels['archiveerror'] = 'Câteva mesaje nu au putut fi arhivate';
+$labels['archiveerror'] = 'Unele mesaje nu au putut fi arhivate';
 $labels['archivefolder'] = 'Arhivă';
 $labels['settingstitle'] = 'Arhivă';
-$labels['archivetype'] = 'Divide arhiva pe';
+$labels['archivetype'] = 'ÃŽmparte arhiva pe';
 $labels['archivetypeyear'] = 'Ani (ex. Arhiva/2013)';
 $labels['archivetypemonth'] = 'Luni (ex. Arhiva/2013/06)';
 $labels['archivetypefolder'] = 'Dosar original';
diff --git a/plugins/archive/localization/sl_SI.inc b/plugins/archive/localization/sl_SI.inc
index 94d1f68..b49fe93 100644
--- a/plugins/archive/localization/sl_SI.inc
+++ b/plugins/archive/localization/sl_SI.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'Arhiv';
 $labels['buttontitle'] = 'Arhiviraj to sporočilo';
 $labels['archived'] = 'Sporočilo je bilo uspešno arhivirano';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Uspešno  shranjeno v arhiv. Za pregled map v Arhivu ponovno naložite stran.';
+$labels['archiveerror'] = 'Nekaterih sporočil ni bilo mogoče arhivirati';
 $labels['archivefolder'] = 'Arhiv';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'Arhiv';
+$labels['archivetype'] = 'Razdeli arhiv glede na';
+$labels['archivetypeyear'] = 'Leto (npr. Arhiv/2012)';
+$labels['archivetypemonth'] = 'Mesec (npr. Arhiv/2012/06)';
+$labels['archivetypefolder'] = 'Izvorna mapa';
+$labels['archivetypesender'] = 'Naslov pošiljatelja';
+$labels['unkownsender'] = 'neznan';
 
 ?>
diff --git a/plugins/archive/localization/tr_TR.inc b/plugins/archive/localization/tr_TR.inc
index 7654983..b6960ea 100644
--- a/plugins/archive/localization/tr_TR.inc
+++ b/plugins/archive/localization/tr_TR.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = 'ArÅŸiv';
 $labels['buttontitle'] = 'Bu postayı arşivle';
 $labels['archived'] = 'Başarıyla arşivlendi';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = 'Başarıyla arşivlendi. Yeni arşiv dosyalarını görmek için sayfayı yenileyin.';
+$labels['archiveerror'] = 'Bazı mesajlar arşivlenemedi.';
 $labels['archivefolder'] = 'ArÅŸiv';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = 'ArÅŸiv';
+$labels['archivetype'] = 'Arşivi bunla böl';
+$labels['archivetypeyear'] = 'Yıl (Arşiv/2012)';
+$labels['archivetypemonth'] = 'Ay(ArÅŸiv/2012/06)';
+$labels['archivetypefolder'] = 'Özgün dosya';
+$labels['archivetypesender'] = 'E-Posta Göndericisi';
+$labels['unkownsender'] = 'bilinmeyen';
 
 ?>
diff --git a/plugins/archive/localization/zh_CN.inc b/plugins/archive/localization/zh_CN.inc
index f0e2d42..4a13d54 100644
--- a/plugins/archive/localization/zh_CN.inc
+++ b/plugins/archive/localization/zh_CN.inc
@@ -18,13 +18,13 @@
 
 $labels = array();
 $labels['buttontext'] = '存档';
-$labels['buttontitle'] = '将该信息存档';
+$labels['buttontitle'] = '存档该信息';
 $labels['archived'] = '存档成功';
-$labels['archivedreload'] = '存档成功。刷新本页来查看新的存档文件夹。';
+$labels['archivedreload'] = '存档成功。请刷新本页以查看新的存档文件夹。';
 $labels['archiveerror'] = '部分信息无法存档';
 $labels['archivefolder'] = '存档';
 $labels['settingstitle'] = '存档';
-$labels['archivetype'] = 'Divide archive by';
+$labels['archivetype'] = '分类存档按';
 $labels['archivetypeyear'] = '年(例如 存档/2012)';
 $labels['archivetypemonth'] = '月(例如 存档/2012/06)';
 $labels['archivetypefolder'] = '原始文件夹';
diff --git a/plugins/archive/localization/zh_TW.inc b/plugins/archive/localization/zh_TW.inc
index a434f31..6eac3a3 100644
--- a/plugins/archive/localization/zh_TW.inc
+++ b/plugins/archive/localization/zh_TW.inc
@@ -20,15 +20,15 @@ $labels = array();
 $labels['buttontext'] = '封存';
 $labels['buttontitle'] = '封存此信件';
 $labels['archived'] = '已成功封存';
-$labels['archivedreload'] = 'Successfully archived. Reload the page to see the new archive folders.';
-$labels['archiveerror'] = 'Some messages could not be archived';
+$labels['archivedreload'] = '封存動作完成.重新載入頁面瀏覽新的封存資料夾';
+$labels['archiveerror'] = '部分資訊無法完成封存';
 $labels['archivefolder'] = '封存';
-$labels['settingstitle'] = 'Archive';
-$labels['archivetype'] = 'Divide archive by';
-$labels['archivetypeyear'] = 'Year (e.g. Archive/2012)';
-$labels['archivetypemonth'] = 'Month (e.g. Archive/2012/06)';
-$labels['archivetypefolder'] = 'Original folder';
-$labels['archivetypesender'] = 'Sender email';
-$labels['unkownsender'] = 'unknown';
+$labels['settingstitle'] = '封存';
+$labels['archivetype'] = '封存檔案切割方式';
+$labels['archivetypeyear'] = '年分(例如: 封存/2012)';
+$labels['archivetypemonth'] = '月份(例如: 封存/2012/06)';
+$labels['archivetypefolder'] = '原始資料夾';
+$labels['archivetypesender'] = '寄件者電子信箱';
+$labels['unkownsender'] = '未知';
 
 ?>
diff --git a/plugins/enigma/enigma.php b/plugins/enigma/enigma.php
index a4009ce..2579355 100644
--- a/plugins/enigma/enigma.php
+++ b/plugins/enigma/enigma.php
@@ -47,6 +47,8 @@ class enigma extends rcube_plugin
         $rcmail = rcmail::get_instance();
         $this->rc = $rcmail;
 
+        $section = rcube_utils::get_input_value('_section', rcube_utils::INPUT_GET);
+
         if ($this->rc->task == 'mail') {
             // message parse/display hooks
             $this->add_hook('message_part_structure', array($this, 'parse_structure'));
@@ -79,7 +81,6 @@ class enigma extends rcube_plugin
             $this->register_action('plugin.enigma', array($this, 'preferences_ui'));
 
             // grab keys/certs management iframe requests
-            $section = get_input_value('_section', RCUBE_INPUT_GET);
             if ($this->rc->action == 'edit-prefs' && preg_match('/^enigma(certs|keys)/', $section)) {
                 $this->load_ui();
                 $this->ui->init($section);
diff --git a/plugins/enigma/lib/enigma_engine.php b/plugins/enigma/lib/enigma_engine.php
index 89cb4b7..2e0e464 100644
--- a/plugins/enigma/lib/enigma_engine.php
+++ b/plugins/enigma/lib/enigma_engine.php
@@ -374,17 +374,15 @@ class enigma_engine
     {
         // @TODO: Handle big bodies using (temp) files
         // @TODO: caching of verification result
-        
-         $sig = $this->pgp_driver->verify($msg_body, $sig_body);
+        $sig = $this->pgp_driver->verify($msg_body, $sig_body);
 
-         if (($sig instanceof enigma_error) && $sig->getCode() != enigma_error::E_KEYNOTFOUND)
-             raise_error(array(
+        if (($sig instanceof enigma_error) && $sig->getCode() != enigma_error::E_KEYNOTFOUND)
+            rcube::raise_error(array(
                 'code' => 600, 'type' => 'php',
                 'file' => __FILE__, 'line' => __LINE__,
-                'message' => "Enigma plugin: " . $error->getMessage()
+                'message' => "Enigma plugin: " . $sig->getMessage()
                 ), true, false);
 
-//print_r($sig);
         return $sig;
     }
 
@@ -399,11 +397,9 @@ class enigma_engine
     {
         // @TODO: Handle big bodies using (temp) files
         // @TODO: caching of verification result
-        
+        $key = ''; $pass = ''; // @TODO
         $result = $this->pgp_driver->decrypt($msg_body, $key, $pass);
 
-//print_r($result);
-
         if ($result instanceof enigma_error) {
             $err_code = $result->getCode();
             if (!in_array($err_code, array(enigma_error::E_KEYNOTFOUND, enigma_error::E_BADPASS)))
@@ -430,7 +426,7 @@ class enigma_engine
     {
         $this->load_pgp_driver();
         $result = $this->pgp_driver->list_keys($pattern);
-    
+
         if ($result instanceof enigma_error) {
             raise_error(array(
                 'code' => 600, 'type' => 'php',
@@ -438,7 +434,7 @@ class enigma_engine
                 'message' => "Enigma plugin: " . $result->getMessage()
                 ), true, false);
         }
-        
+
         return $result;
     }
 
diff --git a/plugins/help/localization/ko_KR.inc b/plugins/help/localization/ko_KR.inc
index a589d0c..836da66 100644
--- a/plugins/help/localization/ko_KR.inc
+++ b/plugins/help/localization/ko_KR.inc
@@ -19,6 +19,6 @@
 $labels = array();
 $labels['help'] = '도움말';
 $labels['about'] = 'ì •ë³´';
-$labels['license'] = '라이센스';
+$labels['license'] = '라이선스';
 
 ?>
diff --git a/plugins/help/localization/zh_CN.inc b/plugins/help/localization/zh_CN.inc
index 5d6272e..5971947 100644
--- a/plugins/help/localization/zh_CN.inc
+++ b/plugins/help/localization/zh_CN.inc
@@ -19,6 +19,6 @@
 $labels = array();
 $labels['help'] = '帮助';
 $labels['about'] = '关于';
-$labels['license'] = '许可协议';
+$labels['license'] = '授权信息';
 
 ?>
diff --git a/plugins/managesieve/localization/az_AZ.inc b/plugins/managesieve/localization/az_AZ.inc
index 35ca871..f272df7 100644
--- a/plugins/managesieve/localization/az_AZ.inc
+++ b/plugins/managesieve/localization/az_AZ.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Göndərən';
 $labels['recipient'] = 'Qəbul edən';
 $labels['vacationaddresses'] = 'Əlavə ünvanlarım üçün siyahı (vergüllər ilə ayrılmış):';
 $labels['vacationdays'] = 'Məktub neçə müddətdən bir göndərilsin (gündə):';
+$labels['vacationinterval'] = 'Məktublar nə qədər sıx göndərilsin:';
+$labels['days'] = 'günlər';
+$labels['seconds'] = 'saniyələr';
 $labels['vacationreason'] = 'Məktubun mətni (səbəb yoxdur):';
 $labels['vacationsubject'] = 'Məktubun mövzusu:';
 $labels['rulestop'] = 'Yerinə yetirməyi dayandır';
@@ -95,9 +98,9 @@ $labels['flagdeleted'] = 'Silindi';
 $labels['flaganswered'] = 'Cavab verilmiÅŸ';
 $labels['flagflagged'] = 'İşarəlilər';
 $labels['flagdraft'] = 'Qaralama';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
+$labels['setvariable'] = 'Dəyişəni təyin et';
+$labels['setvarname'] = 'Dəyişənin adı:';
+$labels['setvarvalue'] = 'Dəyişənin dəyəri:';
 $labels['setvarmodifiers'] = 'Modifikatorlar';
 $labels['varlower'] = 'aşağı registr';
 $labels['varupper'] = 'yuxarı registr';
diff --git a/plugins/managesieve/localization/be_BE.inc b/plugins/managesieve/localization/be_BE.inc
index 47719e8..64f8159 100644
--- a/plugins/managesieve/localization/be_BE.inc
+++ b/plugins/managesieve/localization/be_BE.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Ад каго';
 $labels['recipient'] = 'Каму';
 $labels['vacationaddresses'] = 'Дадатковы спіс атрымальнікаў (праз коску):';
 $labels['vacationdays'] = 'Як часта дасылаць паведамленні (ў днях):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Message body (vacation reason):';
 $labels['vacationsubject'] = 'Message subject:';
 $labels['rulestop'] = 'Stop evaluating rules';
diff --git a/plugins/managesieve/localization/bg_BG.inc b/plugins/managesieve/localization/bg_BG.inc
index f718e3d..28f2ddb 100644
--- a/plugins/managesieve/localization/bg_BG.inc
+++ b/plugins/managesieve/localization/bg_BG.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Подател';
 $labels['recipient'] = 'Получател';
 $labels['vacationaddresses'] = 'Допълнителни e-mail адреси (разделени със запетая):';
 $labels['vacationdays'] = 'Колко често пращате съобщения (в дни):';
+$labels['vacationinterval'] = 'Колко често да праща съобщения:';
+$labels['days'] = 'дни';
+$labels['seconds'] = 'секунди';
 $labels['vacationreason'] = 'Текст на съобщението (причина за ваканцията)';
 $labels['vacationsubject'] = 'Тема на съобщението';
 $labels['rulestop'] = 'Правила за спиране';
diff --git a/plugins/managesieve/localization/bs_BA.inc b/plugins/managesieve/localization/bs_BA.inc
index e12886f..7d21dbd 100644
--- a/plugins/managesieve/localization/bs_BA.inc
+++ b/plugins/managesieve/localization/bs_BA.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Pošiljaoc';
 $labels['recipient'] = 'Primaoc';
 $labels['vacationaddresses'] = 'Moje dodatne email adrese (odvojite zarezima):';
 $labels['vacationdays'] = 'Frekvencija slanja poruka (u danima):';
+$labels['vacationinterval'] = 'Frekvencija slanja poruka:';
+$labels['days'] = 'dana';
+$labels['seconds'] = 'sekundi';
 $labels['vacationreason'] = 'Tijelo poruke (razlog za odmor):';
 $labels['vacationsubject'] = 'Naslov poruke:';
 $labels['rulestop'] = 'Prestani procjenjivati pravila';
diff --git a/plugins/managesieve/localization/ca_ES.inc b/plugins/managesieve/localization/ca_ES.inc
index 2320dfe..e721fcc 100644
--- a/plugins/managesieve/localization/ca_ES.inc
+++ b/plugins/managesieve/localization/ca_ES.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Remitent';
 $labels['recipient'] = 'Destinatari/a';
 $labels['vacationaddresses'] = 'Altres adreces electròniques meves (separades per coma)';
 $labels['vacationdays'] = 'Cada quan enviar un missatge (en dies):';
+$labels['vacationinterval'] = 'Amb quina freqüència enviar missatges:';
+$labels['days'] = 'dies';
+$labels['seconds'] = 'segons';
 $labels['vacationreason'] = 'Cos del missatge (raó de les vacances):';
 $labels['vacationsubject'] = 'Assumpte del missatge:';
 $labels['rulestop'] = 'Deixa d\'avaluar regles';
@@ -95,25 +98,25 @@ $labels['flagdeleted'] = 'Suprimit';
 $labels['flaganswered'] = 'Respost';
 $labels['flagflagged'] = 'Marcat';
 $labels['flagdraft'] = 'Esborrany';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
-$labels['setvarmodifiers'] = 'Modifiers:';
-$labels['varlower'] = 'lower-case';
-$labels['varupper'] = 'upper-case';
-$labels['varlowerfirst'] = 'first character lower-case';
-$labels['varupperfirst'] = 'first character upper-case';
-$labels['varquotewildcard'] = 'quote special characters';
-$labels['varlength'] = 'length';
-$labels['notify'] = 'Send notification';
-$labels['notifyaddress'] = 'To e-mail address:';
-$labels['notifybody'] = 'Notification body:';
-$labels['notifysubject'] = 'Notification subject:';
-$labels['notifyfrom'] = 'Notification sender:';
-$labels['notifyimportance'] = 'Importance:';
-$labels['notifyimportancelow'] = 'low';
+$labels['setvariable'] = 'Ajusta la variable';
+$labels['setvarname'] = 'Nom de la variable:';
+$labels['setvarvalue'] = 'Valor de la variable:';
+$labels['setvarmodifiers'] = 'Modificadors:';
+$labels['varlower'] = 'minúscules';
+$labels['varupper'] = 'majúscules';
+$labels['varlowerfirst'] = 'el primer caràcter és minúscul';
+$labels['varupperfirst'] = 'el primer caràcter és majúscul';
+$labels['varquotewildcard'] = 'engloba els caràcters especials amb cometes';
+$labels['varlength'] = 'llargada';
+$labels['notify'] = 'Envia notificació';
+$labels['notifyaddress'] = 'Per a adreça de correu electrònic:';
+$labels['notifybody'] = 'Cos de la notificació';
+$labels['notifysubject'] = 'Tema de la notificació:';
+$labels['notifyfrom'] = 'Remitent de la notificació:';
+$labels['notifyimportance'] = 'Importànica:';
+$labels['notifyimportancelow'] = 'baixa';
 $labels['notifyimportancenormal'] = 'normal';
-$labels['notifyimportancehigh'] = 'high';
+$labels['notifyimportancehigh'] = 'alta';
 $labels['filtercreate'] = 'Crea filtre';
 $labels['usedata'] = 'Fes servir les següents dades al filtre:';
 $labels['nextstep'] = 'Següent pas';
diff --git a/plugins/managesieve/localization/cs_CZ.inc b/plugins/managesieve/localization/cs_CZ.inc
index 0d7dfb2..26baeff 100644
--- a/plugins/managesieve/localization/cs_CZ.inc
+++ b/plugins/managesieve/localization/cs_CZ.inc
@@ -55,8 +55,11 @@ $labels['add'] = 'Přidej';
 $labels['del'] = 'Smaž';
 $labels['sender'] = 'Odesílatel';
 $labels['recipient'] = 'Příjemce';
-$labels['vacationaddresses'] = 'Seznam příjemců, kterým nebude zpráva odeslána (oddělené čárkou):';
+$labels['vacationaddresses'] = 'Moje další e-mailové adresy (aliasy) spojené s tímto účtem (oddělené čárkou):';
 $labels['vacationdays'] = 'Počet dnů mezi automatickými odpověďmi:';
+$labels['vacationinterval'] = 'Prodleva mezi automatickými odpověďmi:';
+$labels['days'] = 'dnů';
+$labels['seconds'] = 'sekund';
 $labels['vacationreason'] = 'Zpráva (Důvod nepřítomnosti):';
 $labels['vacationsubject'] = 'Předmět zprávy:';
 $labels['rulestop'] = 'Zastavit pravidla';
diff --git a/plugins/managesieve/localization/cy_GB.inc b/plugins/managesieve/localization/cy_GB.inc
index 81f2ca2..52fafe7 100644
--- a/plugins/managesieve/localization/cy_GB.inc
+++ b/plugins/managesieve/localization/cy_GB.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Anfonwr';
 $labels['recipient'] = 'Derbynnwr';
 $labels['vacationaddresses'] = 'Fy chyfeiriadau ebost ychwanegol (gwahanir gyda coma):';
 $labels['vacationdays'] = 'Pa mor aml i ddanfon negeseuon (mewn dyddiau):';
+$labels['vacationinterval'] = 'Pa mor aml i ddanfon negeseuon:';
+$labels['days'] = 'dyddiau';
+$labels['seconds'] = 'eiliadau';
 $labels['vacationreason'] = 'Corff neges (rheswm ar wyliau):';
 $labels['vacationsubject'] = 'Pwnc neges:';
 $labels['rulestop'] = 'Stopio gwerthuso rheolau';
diff --git a/plugins/managesieve/localization/da_DK.inc b/plugins/managesieve/localization/da_DK.inc
index 02aaa1b..cd3deaf 100644
--- a/plugins/managesieve/localization/da_DK.inc
+++ b/plugins/managesieve/localization/da_DK.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Afsender';
 $labels['recipient'] = 'Modtager';
 $labels['vacationaddresses'] = 'Mine alternative e-mailadresser (kommasepareret):';
 $labels['vacationdays'] = 'Hvor tit skal besked sendes (i dage):';
+$labels['vacationinterval'] = 'Hvor tit skal besked sendes:';
+$labels['days'] = 'dage';
+$labels['seconds'] = 'sekunder';
 $labels['vacationreason'] = 'Besked (ved ferie):';
 $labels['vacationsubject'] = 'Besked emne:';
 $labels['rulestop'] = 'Stop behandling af regler';
@@ -95,22 +98,22 @@ $labels['flagdeleted'] = 'Slettede';
 $labels['flaganswered'] = 'Besvaret';
 $labels['flagflagged'] = 'Markeret';
 $labels['flagdraft'] = 'Kladde';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
-$labels['setvarmodifiers'] = 'Modifiers:';
-$labels['varlower'] = 'lower-case';
-$labels['varupper'] = 'upper-case';
-$labels['varlowerfirst'] = 'first character lower-case';
-$labels['varupperfirst'] = 'first character upper-case';
-$labels['varquotewildcard'] = 'quote special characters';
+$labels['setvariable'] = 'Skriv variablen';
+$labels['setvarname'] = 'Variabel navn:';
+$labels['setvarvalue'] = 'Variabel værdi:';
+$labels['setvarmodifiers'] = 'Modifikator';
+$labels['varlower'] = 'små bogstaver';
+$labels['varupper'] = 'store bogstaver';
+$labels['varlowerfirst'] = 'første bogstav lille';
+$labels['varupperfirst'] = 'Første bogstav stort';
+$labels['varquotewildcard'] = 'Sæt specialle tegn i citationstegn ';
 $labels['varlength'] = 'længde';
-$labels['notify'] = 'Send notification';
+$labels['notify'] = 'Send meddelelse';
 $labels['notifyaddress'] = 'Til e-mail adresse:';
-$labels['notifybody'] = 'Notification body:';
-$labels['notifysubject'] = 'Notification subject:';
-$labels['notifyfrom'] = 'Notification sender:';
-$labels['notifyimportance'] = 'Importance:';
+$labels['notifybody'] = 'meddelelses indhold:';
+$labels['notifysubject'] = 'Meddelelses emne:';
+$labels['notifyfrom'] = 'Meddelelses afsender:';
+$labels['notifyimportance'] = 'Vigtighed:';
 $labels['notifyimportancelow'] = 'lav';
 $labels['notifyimportancenormal'] = 'normal';
 $labels['notifyimportancehigh'] = 'høj';
diff --git a/plugins/managesieve/localization/de_CH.inc b/plugins/managesieve/localization/de_CH.inc
index 2074758..b30625f 100644
--- a/plugins/managesieve/localization/de_CH.inc
+++ b/plugins/managesieve/localization/de_CH.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Absender';
 $labels['recipient'] = 'Empfänger';
 $labels['vacationaddresses'] = 'Zusätzliche Liste von Empfängern (Komma getrennt):';
 $labels['vacationdays'] = 'Antwort wird erneut gesendet nach (in Tagen):';
+$labels['vacationinterval'] = 'Wie oft senden:';
+$labels['days'] = 'Tage';
+$labels['seconds'] = 'Sekunden';
 $labels['vacationreason'] = 'Inhalt der Nachricht (Abwesenheitsgrund):';
 $labels['vacationsubject'] = 'Betreff';
 $labels['rulestop'] = 'Regelauswertung anhalten';
diff --git a/plugins/managesieve/localization/de_DE.inc b/plugins/managesieve/localization/de_DE.inc
index 6bd9046..d0cba28 100644
--- a/plugins/managesieve/localization/de_DE.inc
+++ b/plugins/managesieve/localization/de_DE.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Absender';
 $labels['recipient'] = 'Empfänger';
 $labels['vacationaddresses'] = 'Zusätzliche Liste von E-Mail Empfängern (Komma getrennt):';
 $labels['vacationdays'] = 'Wie oft sollen Nachrichten gesendet werden (in Tagen):';
+$labels['vacationinterval'] = 'Wie oft sollen Nachrichten gesendet werden:';
+$labels['days'] = 'Tage';
+$labels['seconds'] = 'Sekunden';
 $labels['vacationreason'] = 'Nachrichteninhalt (Abwesenheitsgrund):';
 $labels['vacationsubject'] = 'Nachrichtenbetreff';
 $labels['rulestop'] = 'Regelauswertung anhalten';
diff --git a/plugins/managesieve/localization/el_GR.inc b/plugins/managesieve/localization/el_GR.inc
index 8504f77..5ef9916 100644
--- a/plugins/managesieve/localization/el_GR.inc
+++ b/plugins/managesieve/localization/el_GR.inc
@@ -34,18 +34,18 @@ $labels['filteris'] = 'είναι ίσο με';
 $labels['filterisnot'] = 'δεν είναι ίσο με';
 $labels['filterexists'] = 'υπάρχει';
 $labels['filternotexists'] = 'δεν υπάρχει';
-$labels['filtermatches'] = 'matches expression';
-$labels['filternotmatches'] = 'not matches expression';
-$labels['filterregex'] = 'matches regular expression';
-$labels['filternotregex'] = 'not matches regular expression';
+$labels['filtermatches'] = 'ταιριάζει με την έκφραση ';
+$labels['filternotmatches'] = 'Δεν ταιριάζει με την έκφραση';
+$labels['filterregex'] = 'ταιριάζει με κανονική έκφραση';
+$labels['filternotregex'] = 'δεν ταιριάζει με κανονική έκφραση';
 $labels['filterunder'] = 'κάτω';
 $labels['filterover'] = 'πάνω';
 $labels['addrule'] = 'Προσθήκη κανόνα';
 $labels['delrule'] = 'Διαγραφή κανόνα';
 $labels['messagemoveto'] = 'Μετακίνηση μηνύματος στο';
 $labels['messageredirect'] = 'Προώθηση μηνύματος στο';
-$labels['messagecopyto'] = 'Copy message to';
-$labels['messagesendcopy'] = 'Send message copy to';
+$labels['messagecopyto'] = 'Αντιγραφη μυνηματος σε';
+$labels['messagesendcopy'] = 'Αποστολη της αντιγραφης μυνηματος σε';
 $labels['messagereply'] = 'Απάντηση με μήνυμα';
 $labels['messagedelete'] = 'Διαγραφή μηνύματος';
 $labels['messagediscard'] = 'Απόρριψη με μήνυμα';
@@ -57,86 +57,89 @@ $labels['sender'] = 'Αποστολέας';
 $labels['recipient'] = 'Παραλήπτης';
 $labels['vacationaddresses'] = 'Πρόσθετη λίστα email παραληπτών (διαχωρισμένη με κόμματα):';
 $labels['vacationdays'] = 'Συχνότητα αποστολής μηνυμάτων (σε ημέρες):';
+$labels['vacationinterval'] = 'Συχνότητα αποστολής μηνυμάτων:';
+$labels['days'] = 'ημερες';
+$labels['seconds'] = 'δευτερόλεπτα';
 $labels['vacationreason'] = 'Σώμα μηνύματος (λόγος απουσίας):';
-$labels['vacationsubject'] = 'Message subject:';
+$labels['vacationsubject'] = 'Θέμα μηνύματος: ';
 $labels['rulestop'] = 'Παύση επαλήθευσης κανόνων';
-$labels['enable'] = 'Enable/Disable';
-$labels['filterset'] = 'Filters set';
-$labels['filtersets'] = 'Filter sets';
-$labels['filtersetadd'] = 'Add filters set';
-$labels['filtersetdel'] = 'Delete current filters set';
-$labels['filtersetact'] = 'Activate current filters set';
-$labels['filtersetdeact'] = 'Deactivate current filters set';
-$labels['filterdef'] = 'Filter definition';
-$labels['filtersetname'] = 'Filters set name';
-$labels['newfilterset'] = 'New filters set';
-$labels['active'] = 'active';
-$labels['none'] = 'none';
-$labels['fromset'] = 'from set';
-$labels['fromfile'] = 'from file';
-$labels['filterdisabled'] = 'Filter disabled';
-$labels['countisgreaterthan'] = 'count is greater than';
-$labels['countisgreaterthanequal'] = 'count is greater than or equal to';
-$labels['countislessthan'] = 'count is less than';
-$labels['countislessthanequal'] = 'count is less than or equal to';
-$labels['countequals'] = 'count is equal to';
-$labels['countnotequals'] = 'count does not equal';
-$labels['valueisgreaterthan'] = 'value is greater than';
-$labels['valueisgreaterthanequal'] = 'value is greater than or equal to';
-$labels['valueislessthan'] = 'value is less than';
-$labels['valueislessthanequal'] = 'value is less than or equal to';
-$labels['valueequals'] = 'value is equal to';
-$labels['valuenotequals'] = 'value does not equal';
-$labels['setflags'] = 'Set flags to the message';
-$labels['addflags'] = 'Add flags to the message';
-$labels['removeflags'] = 'Remove flags from the message';
-$labels['flagread'] = 'Read';
-$labels['flagdeleted'] = 'Deleted';
-$labels['flaganswered'] = 'Answered';
-$labels['flagflagged'] = 'Flagged';
-$labels['flagdraft'] = 'Draft';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
-$labels['setvarmodifiers'] = 'Modifiers:';
-$labels['varlower'] = 'lower-case';
-$labels['varupper'] = 'upper-case';
-$labels['varlowerfirst'] = 'first character lower-case';
-$labels['varupperfirst'] = 'first character upper-case';
-$labels['varquotewildcard'] = 'quote special characters';
-$labels['varlength'] = 'length';
-$labels['notify'] = 'Send notification';
-$labels['notifyaddress'] = 'To e-mail address:';
-$labels['notifybody'] = 'Notification body:';
-$labels['notifysubject'] = 'Notification subject:';
-$labels['notifyfrom'] = 'Notification sender:';
-$labels['notifyimportance'] = 'Importance:';
-$labels['notifyimportancelow'] = 'low';
-$labels['notifyimportancenormal'] = 'normal';
-$labels['notifyimportancehigh'] = 'high';
-$labels['filtercreate'] = 'Create filter';
-$labels['usedata'] = 'Use following data in the filter:';
-$labels['nextstep'] = 'Next Step';
+$labels['enable'] = 'Ενεργοποιηση/Απενεργοποιηση';
+$labels['filterset'] = 'Φίλτρα';
+$labels['filtersets'] = 'Φίλτρο';
+$labels['filtersetadd'] = 'Προσθήκη φίλτρων';
+$labels['filtersetdel'] = 'Διαγραφή φίλτρων';
+$labels['filtersetact'] = 'Ενεργοποιηση φιλτρων';
+$labels['filtersetdeact'] = 'Απενεργοποιηση φιλτρων';
+$labels['filterdef'] = 'Ορισμος φιλτρου';
+$labels['filtersetname'] = 'Ονομασία φίλτρων';
+$labels['newfilterset'] = 'Νεα φιλτρα';
+$labels['active'] = 'ενεργο';
+$labels['none'] = 'κανένα';
+$labels['fromset'] = 'από το σύνολο ';
+$labels['fromfile'] = 'απο αρχειο';
+$labels['filterdisabled'] = 'Απενεργοποιημενο φιλτρο';
+$labels['countisgreaterthan'] = 'αρίθμηση είναι μεγαλύτερη από';
+$labels['countisgreaterthanequal'] = 'η μετρηση είναι μεγαλύτερη ή ίση προς';
+$labels['countislessthan'] = 'η μετρηση είναι μικρότερη απο';
+$labels['countislessthanequal'] = 'η μετρηση είναι μικρότερη ή ίση προς';
+$labels['countequals'] = 'η μέτρηση είναι ίση προς ';
+$labels['countnotequals'] = 'η μέτρηση δεν είναι ίση προς ';
+$labels['valueisgreaterthan'] = 'η τιμη είναι μεγαλύτερη από';
+$labels['valueisgreaterthanequal'] = 'η τιμη είναι μεγαλύτερη ή ίση προς';
+$labels['valueislessthan'] = 'η τιμη είναι μικρότερη απο';
+$labels['valueislessthanequal'] = 'η τιμη είναι μικρότερη ή ίση προς';
+$labels['valueequals'] = 'η τιμη είναι ίση με';
+$labels['valuenotequals'] = 'η τιμη δεν είναι ίση με';
+$labels['setflags'] = 'Ορισμός σημαίων στο μήνυμα';
+$labels['addflags'] = 'Προσθήκη σημαίων στο μήνυμα';
+$labels['removeflags'] = 'Αφαιρέση σημαίων από το μήνυμα';
+$labels['flagread'] = 'Αναγνωση';
+$labels['flagdeleted'] = 'Διεγραμμένο';
+$labels['flaganswered'] = 'Απαντήθηκε ';
+$labels['flagflagged'] = 'Σημειωμένο';
+$labels['flagdraft'] = 'Πρόχειρα';
+$labels['setvariable'] = 'Ορισμός μεταβλητής';
+$labels['setvarname'] = 'Όνομα μεταβλητης:';
+$labels['setvarvalue'] = 'Τιμη μεταβλητης:';
+$labels['setvarmodifiers'] = 'Τροποποιητές: ';
+$labels['varlower'] = 'Μικρογράμματη γραφή';
+$labels['varupper'] = 'κεφαλαία γράμματα ';
+$labels['varlowerfirst'] = 'πρώτος χαρακτήρας πεζός ';
+$labels['varupperfirst'] = 'πρώτος χαρακτήρας κεφαλαία γράμματα';
+$labels['varquotewildcard'] = 'παραθέση ειδικων χαρακτήρων';
+$labels['varlength'] = 'Μήκος';
+$labels['notify'] = 'Αποστολή ειδοποίησης ';
+$labels['notifyaddress'] = 'Σε διεύθυνση email:';
+$labels['notifybody'] = 'Οργανισμός ειδοποιησης:';
+$labels['notifysubject'] = 'Θεμα ειδοποιησης:';
+$labels['notifyfrom'] = 'Αποστολεας ειδοποιησης:';
+$labels['notifyimportance'] = 'Σημασία: ';
+$labels['notifyimportancelow'] = 'Χαμηλή';
+$labels['notifyimportancenormal'] = 'Κανονική';
+$labels['notifyimportancehigh'] = 'Υψηλή';
+$labels['filtercreate'] = 'Δημιουργία φίλτρου';
+$labels['usedata'] = 'Χρησιμοποιηση ακολουθων δεδομενων στο φιλτρο:';
+$labels['nextstep'] = 'Επομενο βημα';
 $labels['...'] = '...';
-$labels['advancedopts'] = 'Advanced options';
-$labels['body'] = 'Body';
-$labels['address'] = 'address';
-$labels['envelope'] = 'envelope';
-$labels['modifier'] = 'modifier:';
-$labels['text'] = 'text';
-$labels['undecoded'] = 'undecoded (raw)';
-$labels['contenttype'] = 'content type';
-$labels['modtype'] = 'type:';
-$labels['allparts'] = 'all';
-$labels['domain'] = 'domain';
-$labels['localpart'] = 'local part';
-$labels['user'] = 'user';
-$labels['detail'] = 'detail';
-$labels['comparator'] = 'comparator:';
-$labels['default'] = 'default';
-$labels['octet'] = 'strict (octet)';
-$labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
-$labels['asciinumeric'] = 'numeric (ascii-numeric)';
+$labels['advancedopts'] = 'Προχωρημένες ρυθμίσεις';
+$labels['body'] = 'Σώμα';
+$labels['address'] = 'Διεύθυνση';
+$labels['envelope'] = 'φάκελος';
+$labels['modifier'] = 'Τροποποιηση: ';
+$labels['text'] = 'κειμενο';
+$labels['undecoded'] = 'αποκωδικοποιημένο (raw)';
+$labels['contenttype'] = 'Τύπος περιεχομένου ';
+$labels['modtype'] = 'τυπος:';
+$labels['allparts'] = 'Όλα';
+$labels['domain'] = 'τομέας';
+$labels['localpart'] = 'τοπικό τμήμα ';
+$labels['user'] = 'χρηστης';
+$labels['detail'] = 'λεπτομερειες';
+$labels['comparator'] = 'σύγκριση:';
+$labels['default'] = 'προεπιλογή';
+$labels['octet'] = 'αυστηρή (οκτάδα) ';
+$labels['asciicasemap'] = 'πεζά ή κεφαλαία (ascii-casemap)';
+$labels['asciinumeric'] = 'αριθμητικό (ascii-αριθμητικο)';
 
 $messages = array();
 $messages['filterunknownerror'] = 'Άγνωστο σφάλμα διακομιστή';
@@ -145,30 +148,30 @@ $messages['filterdeleteerror'] = 'Αδυναμία διαγραφής φίλτρ
 $messages['filterdeleted'] = 'Το φίλτρο διαγράφηκε επιτυχώς';
 $messages['filtersaved'] = 'Το φίλτρο αποθηκεύτηκε επιτυχώς';
 $messages['filtersaveerror'] = 'Αδυναμία αποθήκευσης φίλτρου. Προέκυψε σφάλμα στον διακομιστή';
-$messages['filterdeleteconfirm'] = 'Do you really want to delete selected filter?';
+$messages['filterdeleteconfirm'] = 'Είστε σίγουροι ότι θέλετε να διαγράψετε το επιλεγμένο φίλτρο? ';
 $messages['ruledeleteconfirm'] = 'Θέλετε όντως να διαγράψετε τον επιλεγμένο κανόνα;';
 $messages['actiondeleteconfirm'] = 'Θέλετε όντως να διαγράψετε την επιλεγμένη ενέργεια;';
 $messages['forbiddenchars'] = 'Μη επιτρεπτοί χαρακτήρες στο πεδίο';
 $messages['cannotbeempty'] = 'Το πεδίο δεν μπορεί να είναι κενό';
-$messages['ruleexist'] = 'Filter with specified name already exists.';
-$messages['setactivateerror'] = 'Unable to activate selected filters set. Server error occured.';
-$messages['setdeactivateerror'] = 'Unable to deactivate selected filters set. Server error occured.';
-$messages['setdeleteerror'] = 'Unable to delete selected filters set. Server error occured.';
-$messages['setactivated'] = 'Filters set activated successfully.';
-$messages['setdeactivated'] = 'Filters set deactivated successfully.';
-$messages['setdeleted'] = 'Filters set deleted successfully.';
-$messages['setdeleteconfirm'] = 'Are you sure, you want to delete selected filters set?';
-$messages['setcreateerror'] = 'Unable to create filters set. Server error occured.';
-$messages['setcreated'] = 'Filters set created successfully.';
-$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occured.';
-$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occured.';
-$messages['deactivated'] = 'Filter(s) disabled successfully.';
-$messages['activated'] = 'Filter(s) enabled successfully.';
-$messages['moved'] = 'Filter moved successfully.';
-$messages['moveerror'] = 'Unable to move selected filter. Server error occured.';
-$messages['nametoolong'] = 'Name too long.';
-$messages['namereserved'] = 'Reserved name.';
-$messages['setexist'] = 'Set already exists.';
-$messages['nodata'] = 'At least one position must be selected!';
+$messages['ruleexist'] = 'Φιλτρο με αυτο το όνομα υπάρχει ήδη. ';
+$messages['setactivateerror'] = 'Αδυναμία ενεργοποιησης επιλεγμενων φιλτρων. Προέκυψε σφάλμα στον διακομιστή.';
+$messages['setdeactivateerror'] = 'Αδυναμία απενεργοποιησης επιλεγμενων φιλτρων. Προέκυψε σφάλμα στον διακομιστή.';
+$messages['setdeleteerror'] = 'Αδυναμία διαγραφής φίλτρων. Προέκυψε σφάλμα στον διακομιστή';
+$messages['setactivated'] = 'Φίλτρα ενεργοποιήθηκαν με επιτυχία.';
+$messages['setdeactivated'] = 'Φίλτρα απενεργοποιήθηκαν με επιτυχία.';
+$messages['setdeleted'] = 'Τα φίλτρα διαγράφηκαν επιτυχώς.';
+$messages['setdeleteconfirm'] = 'Θέλετε όντως να διαγράψετε τα επιλεγμένα φιλτρα?';
+$messages['setcreateerror'] = 'Αδυναμία δημιουργιας φιλτρων. Προέκυψε σφάλμα στον διακομιστή.';
+$messages['setcreated'] = 'Τα φιλτρα δημιουργηθηκαν επιτυχως.';
+$messages['activateerror'] = 'Αδυναμία ενεργοποιησης επιλεγμενου φίλτρου(ων). Προέκυψε σφάλμα στον διακομιστή.';
+$messages['deactivateerror'] = 'Αδυναμία απενεργοποιησης επιλεγμενου φίλτρου(ων). Προέκυψε σφάλμα στον διακομιστή.';
+$messages['deactivated'] = 'Το φιλτρο(α) απενεργοποιηθηκαν επιτυχως.';
+$messages['activated'] = 'Το φίλτρο(α) ενεργοποιηθηκαν επιτυχώς.';
+$messages['moved'] = 'Το φίλτρο μετακινηθηκε επιτυχώς.';
+$messages['moveerror'] = 'Αδυναμία μετακινησης επιλεγμενου φίλτρου. Προέκυψε σφάλμα στον διακομιστή.';
+$messages['nametoolong'] = 'Το όνομα είναι πολύ μεγάλο.';
+$messages['namereserved'] = 'Δεσμευμένο όνομα. ';
+$messages['setexist'] = 'Set υπάρχει ήδη. ';
+$messages['nodata'] = 'Τουλάχιστον μία θέση πρέπει να επιλεγεί!';
 
 ?>
diff --git a/plugins/managesieve/localization/en_GB.inc b/plugins/managesieve/localization/en_GB.inc
index 394b6c0..4dd4f7d 100644
--- a/plugins/managesieve/localization/en_GB.inc
+++ b/plugins/managesieve/localization/en_GB.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Sender';
 $labels['recipient'] = 'Recipient';
 $labels['vacationaddresses'] = 'Additional list of recipient e-mails (comma separated):';
 $labels['vacationdays'] = 'How often send messages (in days):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Message body (vacation reason):';
 $labels['vacationsubject'] = 'Message subject:';
 $labels['rulestop'] = 'Stop evaluating rules';
diff --git a/plugins/managesieve/localization/eo.inc b/plugins/managesieve/localization/eo.inc
index b30b08a..3ce49dd 100644
--- a/plugins/managesieve/localization/eo.inc
+++ b/plugins/managesieve/localization/eo.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Sendanto';
 $labels['recipient'] = 'Ricevanto';
 $labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
 $labels['vacationdays'] = 'How often send messages (in days):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Message body (vacation reason):';
 $labels['vacationsubject'] = 'Message subject:';
 $labels['rulestop'] = 'Stop evaluating rules';
diff --git a/plugins/managesieve/localization/es_AR.inc b/plugins/managesieve/localization/es_AR.inc
index 20dee2f..c9c6e70 100644
--- a/plugins/managesieve/localization/es_AR.inc
+++ b/plugins/managesieve/localization/es_AR.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Remitente';
 $labels['recipient'] = 'Destinatario';
 $labels['vacationaddresses'] = 'Lista de direcciones de correo de destinatarios adicionales (separados por comas):';
 $labels['vacationdays'] = 'Cada cuanto enviar mensajes (en días):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Cuerpo del mensaje (razón de vacaciones):';
 $labels['vacationsubject'] = 'Message subject:';
 $labels['rulestop'] = 'Parar de evaluar reglas';
diff --git a/plugins/managesieve/localization/es_ES.inc b/plugins/managesieve/localization/es_ES.inc
index 4300792..69ad9ce 100644
--- a/plugins/managesieve/localization/es_ES.inc
+++ b/plugins/managesieve/localization/es_ES.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Remitente';
 $labels['recipient'] = 'Destinatario';
 $labels['vacationaddresses'] = 'Lista de direcciones de correo de destinatarios adicionales (separados por comas):';
 $labels['vacationdays'] = 'Cada cuánto enviar mensajes (en días):';
+$labels['vacationinterval'] = 'Cada cuánto enviar mensajes:';
+$labels['days'] = 'días';
+$labels['seconds'] = 'segundos';
 $labels['vacationreason'] = 'Cuerpo del mensaje (razón de vacaciones):';
 $labels['vacationsubject'] = 'Asunto del Mensaje:';
 $labels['rulestop'] = 'Parar de evaluar reglas';
diff --git a/plugins/managesieve/localization/et_EE.inc b/plugins/managesieve/localization/et_EE.inc
index 7e70a9d..5688e08 100644
--- a/plugins/managesieve/localization/et_EE.inc
+++ b/plugins/managesieve/localization/et_EE.inc
@@ -55,8 +55,11 @@ $labels['add'] = 'Lisa';
 $labels['del'] = 'Kustuta';
 $labels['sender'] = 'Saatja';
 $labels['recipient'] = 'Saaja';
-$labels['vacationaddresses'] = 'Lisanimekiri saaja e-posti aadressidest (komadega eraldatud):';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
 $labels['vacationdays'] = 'Kui tihti kirju saata (päevades):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Kirja sisu (puhkuse põhjus):';
 $labels['vacationsubject'] = 'Kirja teema:';
 $labels['rulestop'] = 'Peata reeglite otsimine';
diff --git a/plugins/managesieve/localization/fa_IR.inc b/plugins/managesieve/localization/fa_IR.inc
index 7185d80..ebdc453 100644
--- a/plugins/managesieve/localization/fa_IR.inc
+++ b/plugins/managesieve/localization/fa_IR.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'فرستنده';
 $labels['recipient'] = 'گیرنده';
 $labels['vacationaddresses'] = 'آدرس‌های ایمیل دیگر من (جدا شده با ویرگول):';
 $labels['vacationdays'] = 'پیغام ها در چه مواقعی فرستاده شدند (در روزهای):';
+$labels['vacationinterval'] = 'مواقعی که پیغام‌ها ارسال می‌شوند:';
+$labels['days'] = 'روزها';
+$labels['seconds'] = 'ثانیه‌ها';
 $labels['vacationreason'] = 'بدنه پیغام (علت مسافرت):';
 $labels['vacationsubject'] = 'موضوع پیغام:';
 $labels['rulestop'] = 'توقف قوانین ارزیابی';
diff --git a/plugins/managesieve/localization/fi_FI.inc b/plugins/managesieve/localization/fi_FI.inc
index 18cd0c6..f006f6d 100644
--- a/plugins/managesieve/localization/fi_FI.inc
+++ b/plugins/managesieve/localization/fi_FI.inc
@@ -55,8 +55,11 @@ $labels['add'] = 'Lisää';
 $labels['del'] = 'Poista';
 $labels['sender'] = 'Lähettäjä';
 $labels['recipient'] = 'Vastaanottaja';
-$labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
 $labels['vacationdays'] = 'How often send messages (in days):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Message body (vacation reason):';
 $labels['vacationsubject'] = 'Viestin aihe:';
 $labels['rulestop'] = 'Stop evaluating rules';
diff --git a/plugins/managesieve/localization/fr_FR.inc b/plugins/managesieve/localization/fr_FR.inc
index 912c03f..b3f9ec9 100644
--- a/plugins/managesieve/localization/fr_FR.inc
+++ b/plugins/managesieve/localization/fr_FR.inc
@@ -18,7 +18,7 @@
 
 
 $labels['filters'] = 'Filtres';
-$labels['managefilters'] = 'Gestion des filtres sur les mails entrants';
+$labels['managefilters'] = 'Gérer les filtres sur les courriels entrants';
 $labels['filtername'] = 'Nom du filtre';
 $labels['newfilter'] = 'Nouveau filtre';
 $labels['filteradd'] = 'Ajouter un filtre';
@@ -49,14 +49,17 @@ $labels['messagesendcopy'] = 'Envoyer une copie du message à';
 $labels['messagereply'] = 'Répondre avec le message';
 $labels['messagedelete'] = 'Supprimer le message';
 $labels['messagediscard'] = 'Rejeter avec le message';
-$labels['messagesrules'] = 'Pour les mails entrants:';
+$labels['messagesrules'] = 'Pour les courriels entrants :';
 $labels['messagesactions'] = '...exécuter les actions suivantes:';
 $labels['add'] = 'Ajouter';
 $labels['del'] = 'Supprimer';
 $labels['sender'] = 'Expéditeur';
 $labels['recipient'] = 'Destinataire';
-$labels['vacationaddresses'] = 'Liste des destinataires (séparés par une virgule) :';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
 $labels['vacationdays'] = 'Ne pas renvoyer un message avant (jours) :';
+$labels['vacationinterval'] = 'Comment envoyer les messages :';
+$labels['days'] = 'jours';
+$labels['seconds'] = 'secondes';
 $labels['vacationreason'] = 'Corps du message (raison de l\'absence) :';
 $labels['vacationsubject'] = 'Sujet du message:';
 $labels['rulestop'] = 'Arrêter d\'évaluer les prochaines règles';
@@ -162,8 +165,8 @@ $messages['setcreateerror'] = 'Impossible de créer le groupe de filtres. Le ser
 $messages['setcreated'] = 'Le groupe de filtres a bien été créé.';
 $messages['activateerror'] = 'Impossible d\'activer le(s) filtre(s) sélectionné(s). Une erreur serveur s\'est produite.';
 $messages['deactivateerror'] = 'Impossible de désactiver le(s) filtre(s) sélectionné(s). Une erreur serveur s\'est produite.';
-$messages['deactivated'] = 'Filtre(s) activé(s) avec succès';
-$messages['activated'] = 'Filtre(s) désactivé(s) avec succès';
+$messages['deactivated'] = 'Filtre(s) désactivé(s) avec succès.';
+$messages['activated'] = 'Filtre(s) activé(s) avec succès.';
 $messages['moved'] = 'Filtre déplacé avec succès.';
 $messages['moveerror'] = 'Déplacement du filtre sélectionné impossible. Le serveur a renvoyé une erreur.';
 $messages['nametoolong'] = 'Nom trop long.';
diff --git a/plugins/managesieve/localization/gl_ES.inc b/plugins/managesieve/localization/gl_ES.inc
index 4a4ec3d..fef5ed7 100644
--- a/plugins/managesieve/localization/gl_ES.inc
+++ b/plugins/managesieve/localization/gl_ES.inc
@@ -34,10 +34,10 @@ $labels['filteris'] = 'é igual a';
 $labels['filterisnot'] = 'non é igual a';
 $labels['filterexists'] = 'existe';
 $labels['filternotexists'] = 'non existe';
-$labels['filtermatches'] = 'matches expression';
-$labels['filternotmatches'] = 'not matches expression';
-$labels['filterregex'] = 'matches regular expression';
-$labels['filternotregex'] = 'not matches regular expression';
+$labels['filtermatches'] = 'casa coa expresión';
+$labels['filternotmatches'] = 'non casa coa expresión';
+$labels['filterregex'] = 'casa coa expresión regular';
+$labels['filternotregex'] = 'non casa coa expresión regular';
 $labels['filterunder'] = 'baixo';
 $labels['filterover'] = 'sobre';
 $labels['addrule'] = 'Engadir regra';
@@ -57,12 +57,15 @@ $labels['sender'] = 'Remitente';
 $labels['recipient'] = 'Destinatario';
 $labels['vacationaddresses'] = 'Lista de enderezos de correo de destinatarios adicionais (separados por comas):';
 $labels['vacationdays'] = 'Cada canto enviar mensaxes (en días):';
+$labels['vacationinterval'] = 'Con qué frecuencia vanse enviar mensaxes:';
+$labels['days'] = 'días';
+$labels['seconds'] = 'segundos';
 $labels['vacationreason'] = 'Corpo da mensaxe (razón de vacacións):';
-$labels['vacationsubject'] = 'Message subject:';
+$labels['vacationsubject'] = 'Asunto da mensaxe:';
 $labels['rulestop'] = 'Parar de avaliar regras';
 $labels['enable'] = 'Activar/Desactivar';
 $labels['filterset'] = 'Conxunto de filtros';
-$labels['filtersets'] = 'Filter sets';
+$labels['filtersets'] = 'Conxunto de filtros';
 $labels['filtersetadd'] = 'Engadir un conxunto de filtros';
 $labels['filtersetdel'] = 'Eliminar o conxunto de filtros actual';
 $labels['filtersetact'] = 'Activar o conxunto de filtros actual';
@@ -75,68 +78,68 @@ $labels['none'] = 'ningún';
 $labels['fromset'] = 'de conxunto';
 $labels['fromfile'] = 'de arquivo';
 $labels['filterdisabled'] = 'Filtro desactivado';
-$labels['countisgreaterthan'] = 'count is greater than';
-$labels['countisgreaterthanequal'] = 'count is greater than or equal to';
-$labels['countislessthan'] = 'count is less than';
-$labels['countislessthanequal'] = 'count is less than or equal to';
-$labels['countequals'] = 'count is equal to';
-$labels['countnotequals'] = 'count does not equal';
-$labels['valueisgreaterthan'] = 'value is greater than';
-$labels['valueisgreaterthanequal'] = 'value is greater than or equal to';
-$labels['valueislessthan'] = 'value is less than';
-$labels['valueislessthanequal'] = 'value is less than or equal to';
-$labels['valueequals'] = 'value is equal to';
-$labels['valuenotequals'] = 'value does not equal';
+$labels['countisgreaterthan'] = 'a conta é meirande que';
+$labels['countisgreaterthanequal'] = 'a conta é meirande ou igual a';
+$labels['countislessthan'] = 'a conta é menor que';
+$labels['countislessthanequal'] = 'a conta é menor ou igual a';
+$labels['countequals'] = 'a conta é igual a';
+$labels['countnotequals'] = 'a conta non é igual a';
+$labels['valueisgreaterthan'] = 'o valor é meirande que ';
+$labels['valueisgreaterthanequal'] = 'o valor é meirande ou igual a';
+$labels['valueislessthan'] = 'o valor é menor que';
+$labels['valueislessthanequal'] = 'o valor é menor ou igual a';
+$labels['valueequals'] = 'o valor é igual a';
+$labels['valuenotequals'] = 'o valor non é igual a';
 $labels['setflags'] = 'Set flags to the message';
 $labels['addflags'] = 'Add flags to the message';
 $labels['removeflags'] = 'Remove flags from the message';
-$labels['flagread'] = 'Read';
-$labels['flagdeleted'] = 'Deleted';
-$labels['flaganswered'] = 'Answered';
-$labels['flagflagged'] = 'Flagged';
-$labels['flagdraft'] = 'Draft';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
-$labels['setvarmodifiers'] = 'Modifiers:';
-$labels['varlower'] = 'lower-case';
-$labels['varupper'] = 'upper-case';
-$labels['varlowerfirst'] = 'first character lower-case';
-$labels['varupperfirst'] = 'first character upper-case';
+$labels['flagread'] = 'Lidas';
+$labels['flagdeleted'] = 'Eliminadas';
+$labels['flaganswered'] = 'Respostadas';
+$labels['flagflagged'] = 'Marcadas';
+$labels['flagdraft'] = 'Borrador';
+$labels['setvariable'] = 'Establecer variable';
+$labels['setvarname'] = 'Nome da variable:';
+$labels['setvarvalue'] = 'Valor da variable:';
+$labels['setvarmodifiers'] = 'Modificadores:';
+$labels['varlower'] = 'minúscula';
+$labels['varupper'] = 'maiúscula';
+$labels['varlowerfirst'] = 'primeira letra minúscula';
+$labels['varupperfirst'] = 'primeira letra maiúscula';
 $labels['varquotewildcard'] = 'quote special characters';
-$labels['varlength'] = 'length';
-$labels['notify'] = 'Send notification';
-$labels['notifyaddress'] = 'To e-mail address:';
-$labels['notifybody'] = 'Notification body:';
-$labels['notifysubject'] = 'Notification subject:';
-$labels['notifyfrom'] = 'Notification sender:';
-$labels['notifyimportance'] = 'Importance:';
-$labels['notifyimportancelow'] = 'low';
+$labels['varlength'] = 'lonxitude';
+$labels['notify'] = 'Enviar notificación';
+$labels['notifyaddress'] = 'Destinatario:';
+$labels['notifybody'] = 'Corpo da notificación:';
+$labels['notifysubject'] = 'Asunto da notificación:';
+$labels['notifyfrom'] = 'Remitente da notificación:';
+$labels['notifyimportance'] = 'Importancia:';
+$labels['notifyimportancelow'] = 'baixa';
 $labels['notifyimportancenormal'] = 'normal';
-$labels['notifyimportancehigh'] = 'high';
-$labels['filtercreate'] = 'Create filter';
-$labels['usedata'] = 'Use following data in the filter:';
-$labels['nextstep'] = 'Next Step';
+$labels['notifyimportancehigh'] = 'alta';
+$labels['filtercreate'] = 'Crear filtro';
+$labels['usedata'] = 'Usar os seguintes datos no filtro:';
+$labels['nextstep'] = 'Seguinte paso';
 $labels['...'] = '...';
-$labels['advancedopts'] = 'Advanced options';
-$labels['body'] = 'Body';
-$labels['address'] = 'address';
+$labels['advancedopts'] = 'Opcións avanzadas';
+$labels['body'] = 'Corpo';
+$labels['address'] = 'enderezo';
 $labels['envelope'] = 'envelope';
-$labels['modifier'] = 'modifier:';
-$labels['text'] = 'text';
-$labels['undecoded'] = 'undecoded (raw)';
-$labels['contenttype'] = 'content type';
-$labels['modtype'] = 'type:';
-$labels['allparts'] = 'all';
-$labels['domain'] = 'domain';
-$labels['localpart'] = 'local part';
-$labels['user'] = 'user';
-$labels['detail'] = 'detail';
-$labels['comparator'] = 'comparator:';
-$labels['default'] = 'default';
-$labels['octet'] = 'strict (octet)';
-$labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
-$labels['asciinumeric'] = 'numeric (ascii-numeric)';
+$labels['modifier'] = 'modificador:';
+$labels['text'] = 'texto';
+$labels['undecoded'] = 'sen codificar (en bruto)';
+$labels['contenttype'] = 'tipo de contido';
+$labels['modtype'] = 'tipo:';
+$labels['allparts'] = 'todos';
+$labels['domain'] = 'dominio';
+$labels['localpart'] = 'parte local';
+$labels['user'] = 'usuario';
+$labels['detail'] = 'detalle';
+$labels['comparator'] = 'comparador';
+$labels['default'] = 'defecto';
+$labels['octet'] = 'estricto (octeto)';
+$labels['asciicasemap'] = 'non sensible a maiúsculas/minúsculas (ascii-casemap)';
+$labels['asciinumeric'] = 'numérico (ascii-numerico)';
 
 $messages = array();
 $messages['filterunknownerror'] = 'Erro descoñecido servidor';
@@ -150,7 +153,7 @@ $messages['ruledeleteconfirm'] = 'Está seguro de que desexa eliminar a regra se
 $messages['actiondeleteconfirm'] = 'Está seguro de que desexa eliminar a acción seleccionada?';
 $messages['forbiddenchars'] = 'Caracteres non permitidos no campo';
 $messages['cannotbeempty'] = 'O campo non pode estar baleiro';
-$messages['ruleexist'] = 'Filter with specified name already exists.';
+$messages['ruleexist'] = 'Xa existe un filtro con nome especificado.';
 $messages['setactivateerror'] = 'Imposible activar o conxunto de filtros seleccionado. Ocurriu un erro no servidor';
 $messages['setdeactivateerror'] = 'Imposible desactivar o conxunto de filtros seleccionado. Ocurriu un error no servidor';
 $messages['setdeleteerror'] = 'Imposible eliminar o conxunto de filtros seleccionado. Ocurriu un error no servidor';
@@ -160,15 +163,15 @@ $messages['setdeleted'] = 'O Conxunto de filtros borrouse con éxito';
 $messages['setdeleteconfirm'] = 'Está seguro de que desexa eliminar o conxunto de filtros seleccionado?';
 $messages['setcreateerror'] = 'Imposible crear o conxunto de filtros. Ocurriu un error no servidor';
 $messages['setcreated'] = 'Conxunto de filtros creado con éxito';
-$messages['activateerror'] = 'Unable to enable selected filter(s). Server error occured.';
-$messages['deactivateerror'] = 'Unable to disable selected filter(s). Server error occured.';
-$messages['deactivated'] = 'Filter(s) disabled successfully.';
-$messages['activated'] = 'Filter(s) enabled successfully.';
-$messages['moved'] = 'Filter moved successfully.';
-$messages['moveerror'] = 'Unable to move selected filter. Server error occured.';
+$messages['activateerror'] = 'Non foi posible activar o(s) filtro(s) seleccionado(s). Ocurriu un erro no servidor.';
+$messages['deactivateerror'] = 'Non foi posible desactivar o(s) filtro(s) seleccionado(s). Ocurriu un erro no servidor.';
+$messages['deactivated'] = 'Desactiváronse os filtros correctamente.';
+$messages['activated'] = 'Activáronse os filtros correctamente';
+$messages['moved'] = 'Moveuse correctamente o filtro.';
+$messages['moveerror'] = 'Non foi posible mover o(s) filtro(s) seleccionado(s). Ocurriu un erro no servidor.';
 $messages['nametoolong'] = 'Imposible crear o conxunto de filtros. O nome é longo de máis';
-$messages['namereserved'] = 'Reserved name.';
+$messages['namereserved'] = 'Nome reservado';
 $messages['setexist'] = 'Set already exists.';
-$messages['nodata'] = 'At least one position must be selected!';
+$messages['nodata'] = 'É preciso seleccionar polo menos unha posición!';
 
 ?>
diff --git a/plugins/managesieve/localization/he_IL.inc b/plugins/managesieve/localization/he_IL.inc
index 5479131..aa736ac 100644
--- a/plugins/managesieve/localization/he_IL.inc
+++ b/plugins/managesieve/localization/he_IL.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'השולח';
 $labels['recipient'] = 'הנמען';
 $labels['vacationaddresses'] = 'כתובות דוא"ל נוספות שלי (מופרדות ע"י פסיקים)';
 $labels['vacationdays'] = 'באיזו תדירות ( בימים ) לשלוח הודעות:';
+$labels['vacationinterval'] = 'באיזו תדירות לשלוח ההודעה';
+$labels['days'] = 'ימים';
+$labels['seconds'] = 'שניות';
 $labels['vacationreason'] = 'גוף ההודעה (סיבת החופשה):';
 $labels['vacationsubject'] = 'נושא ההודעה:';
 $labels['rulestop'] = 'עצירה של בחינת הכללים';
diff --git a/plugins/managesieve/localization/hr_HR.inc b/plugins/managesieve/localization/hr_HR.inc
index c38ed3e..64b9bef 100644
--- a/plugins/managesieve/localization/hr_HR.inc
+++ b/plugins/managesieve/localization/hr_HR.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Pošiljatelj';
 $labels['recipient'] = 'Primatelj';
 $labels['vacationaddresses'] = 'Dodatna lista primatelja (odvojenih zarezom):';
 $labels['vacationdays'] = 'Koliko često slati poruku (u danima):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Tijelo poruke (razlog odmora):';
 $labels['vacationsubject'] = 'Naslov poruke:';
 $labels['rulestop'] = 'Prekini izvođenje filtera';
diff --git a/plugins/managesieve/localization/hu_HU.inc b/plugins/managesieve/localization/hu_HU.inc
index de4f687..9d39ffa 100644
--- a/plugins/managesieve/localization/hu_HU.inc
+++ b/plugins/managesieve/localization/hu_HU.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Feladó';
 $labels['recipient'] = 'Címzett';
 $labels['vacationaddresses'] = 'További címzettek (vesszővel elválasztva):';
 $labels['vacationdays'] = 'Válaszüzenet küldése ennyi naponként:';
+$labels['vacationinterval'] = 'Milyen gyakran küld üzeneteket:';
+$labels['days'] = 'napok';
+$labels['seconds'] = 'másodpercek';
 $labels['vacationreason'] = 'Levél szövege (automatikus válasz):';
 $labels['vacationsubject'] = 'Üzenet tárgya:';
 $labels['rulestop'] = 'Műveletek végrehajtásának befejezése';
diff --git a/plugins/managesieve/localization/hy_AM.inc b/plugins/managesieve/localization/hy_AM.inc
index a0c1c7c..908175f 100644
--- a/plugins/managesieve/localization/hy_AM.inc
+++ b/plugins/managesieve/localization/hy_AM.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'ÕˆÖ‚Õ²Õ¡Ö€Õ¯Õ¸Õ²';
 $labels['recipient'] = 'Ստացող';
 $labels['vacationaddresses'] = 'Իմ հավելյալ էլփոստի հասցեներ (բաժանված ստորակետներով).';
 $labels['vacationdays'] = 'Ô»Õ¶Õ¹ Õ°Õ¡Õ³Õ¡Õ­Õ¸Ö‚Õ©ÕµÕ¡Õ´Õ¢ Õ¸Ö‚Õ²Õ¡Ö€Õ¯Õ¥Õ¬ Õ°Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶Õ¶Õ¥Ö€Õ¨ (Ö…Ö€Õ¥Ö€)`';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Õ€Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ¢Õ¸Õ¾Õ¡Õ¶Õ¤Õ¡Õ¯Õ¸Ö‚Õ©ÕµÕ¸Ö‚Õ¶ (Õ¡Ö€Õ±Õ¡Õ¯Õ¸Ö‚Ö€Õ¤Õ« ÕºÕ¡Õ¿Õ³Õ¡Õ¼)`';
 $labels['vacationsubject'] = 'Õ€Õ¡Õ²Õ¸Ö€Õ¤Õ¡Õ£Ö€Õ¸Ö‚Õ©ÕµÕ¡Õ¶ Õ¾Õ¥Ö€Õ¶Õ¡Õ£Õ«Ö€`';
 $labels['rulestop'] = 'Ô´Õ¡Õ¤Õ¡Ö€Õ¥Õ¬ ÕºÕ¡ÕµÕ´Õ¡Õ¶Õ¶Õ¥Ö€Õ« Õ½Õ¿Õ¸Ö‚Õ£Õ¸Ö‚Õ´Õ¨';
diff --git a/plugins/managesieve/localization/ia.inc b/plugins/managesieve/localization/ia.inc
index f4ea903..45f6e52 100644
--- a/plugins/managesieve/localization/ia.inc
+++ b/plugins/managesieve/localization/ia.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Sender';
 $labels['recipient'] = 'Recipient';
 $labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
 $labels['vacationdays'] = 'How often send messages (in days):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Message body (vacation reason):';
 $labels['vacationsubject'] = 'Message subject:';
 $labels['rulestop'] = 'Stop evaluating rules';
diff --git a/plugins/managesieve/localization/id_ID.inc b/plugins/managesieve/localization/id_ID.inc
index 0e9245d..a30c2a0 100644
--- a/plugins/managesieve/localization/id_ID.inc
+++ b/plugins/managesieve/localization/id_ID.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Pengirim';
 $labels['recipient'] = 'Penerima';
 $labels['vacationaddresses'] = 'Alamat email tambahan saya (dipisahkan koma):';
 $labels['vacationdays'] = 'Seberapa sering mengirim pesan (dalam hari):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Isi pesan (alasan liburan):';
 $labels['vacationsubject'] = 'Judul pesan:';
 $labels['rulestop'] = 'Berhenti mengevaluasi aturan';
diff --git a/plugins/managesieve/localization/it_IT.inc b/plugins/managesieve/localization/it_IT.inc
index bcbf4d1..0ac4f29 100644
--- a/plugins/managesieve/localization/it_IT.inc
+++ b/plugins/managesieve/localization/it_IT.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Mittente';
 $labels['recipient'] = 'Destinatario';
 $labels['vacationaddresses'] = 'Lista di indirizzi e-mail di destinatari addizionali (separati da virgola):';
 $labels['vacationdays'] = 'Ogni quanti giorni ribadire il messaggio allo stesso mittente';
+$labels['vacationinterval'] = 'Ogni quanto tempo inviare i messaggi:';
+$labels['days'] = 'giorni';
+$labels['seconds'] = 'secondi';
 $labels['vacationreason'] = 'Corpo del messaggio (dettagli relativi all\'assenza):';
 $labels['vacationsubject'] = 'Oggetto del messaggio';
 $labels['rulestop'] = 'Non valutare le regole successive';
diff --git a/plugins/managesieve/localization/ja_JP.inc b/plugins/managesieve/localization/ja_JP.inc
index 715827b..0cd4f44 100644
--- a/plugins/managesieve/localization/ja_JP.inc
+++ b/plugins/managesieve/localization/ja_JP.inc
@@ -57,6 +57,9 @@ $labels['sender'] = '送信者';
 $labels['recipient'] = '宛先';
 $labels['vacationaddresses'] = '電子メールの宛先の(コンマ区切った)追加のリスト:';
 $labels['vacationdays'] = 'メッセージを(1日に)送信する頻度:';
+$labels['vacationinterval'] = 'メッセージを送信する頻度:';
+$labels['days'] = 'æ—¥';
+$labels['seconds'] = '秒';
 $labels['vacationreason'] = 'メッセージ本体(休暇の理由):';
 $labels['vacationsubject'] = 'メッセージの件名:';
 $labels['rulestop'] = 'ルールの評価を停止';
diff --git a/plugins/managesieve/localization/ko_KR.inc b/plugins/managesieve/localization/ko_KR.inc
index 8445c29..5ab4fc2 100644
--- a/plugins/managesieve/localization/ko_KR.inc
+++ b/plugins/managesieve/localization/ko_KR.inc
@@ -19,156 +19,159 @@
 
 $labels['filters'] = 'í•„í„°';
 $labels['managefilters'] = '수신 메일 필터 관리';
-$labels['filtername'] = '필터 이름';
+$labels['filtername'] = '필터명';
 $labels['newfilter'] = '새 필터';
 $labels['filteradd'] = '필터 추가';
 $labels['filterdel'] = '필터 삭제';
 $labels['moveup'] = '위로 이동';
 $labels['movedown'] = '아래로 이동';
-$labels['filterallof'] = '다음에 오는 규칙들 전부와 일치';
-$labels['filteranyof'] = '다음에 오는 규칙들 중 어떠한 것 이라도 일치';
+$labels['filterallof'] = '다음의 모든 규칙과 일치함';
+$labels['filteranyof'] = '다음 규칙 중 하나라도 일치함';
 $labels['filterany'] = '모든 메시지';
-$labels['filtercontains'] = '포함합니다';
-$labels['filternotcontains'] = '포함하지 않습니다';
-$labels['filteris'] = '와 같습니다';
-$labels['filterisnot'] = '와 같지 않습니다';
-$labels['filterexists'] = '존재합니다';
-$labels['filternotexists'] = '존재하지 않습니다';
-$labels['filtermatches'] = '표현식과 일치합니다';
-$labels['filternotmatches'] = '표현식과 일치하지 않습니다';
-$labels['filterregex'] = '정규표현식과 일치합니다';
-$labels['filternotregex'] = '정규 표현식과 일치하지 않습니다';
-$labels['filterunder'] = 'under';
-$labels['filterover'] = 'over';
-$labels['addrule'] = '규칙 더하기';
+$labels['filtercontains'] = '다음을 포함함';
+$labels['filternotcontains'] = '다음을 포함하지 않음';
+$labels['filteris'] = '다음과 같음';
+$labels['filterisnot'] = '다음과 같지 않음';
+$labels['filterexists'] = '다음이 존재함';
+$labels['filternotexists'] = '다음이 존재하지 않음';
+$labels['filtermatches'] = '다음 표현식과 일치함';
+$labels['filternotmatches'] = '다음 표현식과 일치하지 않음';
+$labels['filterregex'] = '다음 정규 표현식과 일치함';
+$labels['filternotregex'] = '다음 정규 표현식과 일치하지 않음';
+$labels['filterunder'] = '다음보다 아래임';
+$labels['filterover'] = '다음보다 위임';
+$labels['addrule'] = '규칙 추가';
 $labels['delrule'] = '규칙 삭제';
-$labels['messagemoveto'] = '메시지 이동';
-$labels['messageredirect'] = '메시지를 Redirect';
-$labels['messagecopyto'] = '메시지를 복사';
-$labels['messagesendcopy'] = '메시지의 복사본 보내기';
-$labels['messagereply'] = '메시지에 회신하기';
-$labels['messagedelete'] = '메시지 삭제';
-$labels['messagediscard'] = 'Discard with message';
-$labels['messagesrules'] = 'For incoming mail:';
-$labels['messagesactions'] = '...execute the following actions:';
+$labels['messagemoveto'] = '메시지를 다음 위치로 이동함';
+$labels['messageredirect'] = '메시지를 다음 주소로 전송함';
+$labels['messagecopyto'] = '메시지를 다음 위치로 복사함';
+$labels['messagesendcopy'] = '메시지의 사본을 다음 위치로 보냄';
+$labels['messagereply'] = '다음 메시지로 회신';
+$labels['messagedelete'] = '메시지를 삭제';
+$labels['messagediscard'] = '다음 메시지와 함께 폐기';
+$labels['messagesrules'] = '해당 받은 메일:';
+$labels['messagesactions'] = '...다음 동작을 실행:';
 $labels['add'] = '추가';
 $labels['del'] = '삭제';
-$labels['sender'] = '보낸 사람';
-$labels['recipient'] = '수신자';
-$labels['vacationaddresses'] = '나의 추가 e-mail 주소(들) (콤마로 구분 됨):';
-$labels['vacationdays'] = 'How often send messages (in days):';
+$labels['sender'] = '발신인';
+$labels['recipient'] = '수신인';
+$labels['vacationaddresses'] = '나의 추가 이메일 주소 (쉼표로 구분됨):';
+$labels['vacationdays'] = '메시지 발신 주기 (일):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = '메시지 본문 (휴가 사유):';
 $labels['vacationsubject'] = '메시지 제목:';
-$labels['rulestop'] = '규칙의 실행을 멈춤';
-$labels['enable'] = '사용/사용안함';
-$labels['filterset'] = '필터 묶음';
-$labels['filtersets'] = '필터 묶음';
-$labels['filtersetadd'] = '필터 묶음 추가';
-$labels['filtersetdel'] = '현재 필터 묶음을 삭제';
+$labels['rulestop'] = '규칙 평가를 중단';
+$labels['enable'] = '활성화/비활성화';
+$labels['filterset'] = '필터 세트';
+$labels['filtersets'] = '필터 세트';
+$labels['filtersetadd'] = '필터 세트 추가';
+$labels['filtersetdel'] = '현재 필터 세트를 삭제';
 $labels['filtersetact'] = '현재 필터 세트를 활성화';
 $labels['filtersetdeact'] = '현재 필터 세트를 비활성화';
 $labels['filterdef'] = '필터 정의';
-$labels['filtersetname'] = '필터 세트 이름';
-$labels['newfilterset'] = '새로운 필터 세트';
+$labels['filtersetname'] = '필터 세트명';
+$labels['newfilterset'] = '새 필터 세트';
 $labels['active'] = '활성';
 $labels['none'] = '없음';
-$labels['fromset'] = '묶음으로 부터';
-$labels['fromfile'] = '파일로 부터';
-$labels['filterdisabled'] = '필터 사용하지 않음';
-$labels['countisgreaterthan'] = '갯수가 큼';
-$labels['countisgreaterthanequal'] = '갯수가 크거나 같음';
-$labels['countislessthan'] = '갯수가 작음';
-$labels['countislessthanequal'] = '갯수가 작거나 같음';
-$labels['countequals'] = '갯수가 같음';
-$labels['countnotequals'] = '갯수가 같지 않음';
-$labels['valueisgreaterthan'] = '값이 큼';
-$labels['valueisgreaterthanequal'] = '값이 크거나 같음';
-$labels['valueislessthan'] = '값이 작음';
-$labels['valueislessthanequal'] = '값이 작거나 같음';
-$labels['valueequals'] = '값이 같음';
-$labels['valuenotequals'] = '값이 같지 않음';
-$labels['setflags'] = '메시지에 플래그를 설정';
-$labels['addflags'] = '메시지에 플래그를 추가';
-$labels['removeflags'] = '메시지에서 플래그를 제거';
+$labels['fromset'] = '세트로부터';
+$labels['fromfile'] = '파일로부터';
+$labels['filterdisabled'] = '필터가 비활성화됨';
+$labels['countisgreaterthan'] = '개수가 다음보다 큼';
+$labels['countisgreaterthanequal'] = '개수가 다음보다 크거나 같음';
+$labels['countislessthan'] = '개수가 다음보다 작음';
+$labels['countislessthanequal'] = '개수가 작거나 같음';
+$labels['countequals'] = '개수가 다음과 같음';
+$labels['countnotequals'] = '개수가 다음과 같지 않음';
+$labels['valueisgreaterthan'] = '값이 다음보다 큼';
+$labels['valueisgreaterthanequal'] = '값이 다음보다 크거나 같음';
+$labels['valueislessthan'] = '값이 다음보다 작음';
+$labels['valueislessthanequal'] = '값이 다음보다 작거나 같음';
+$labels['valueequals'] = '값이 다음과 같음';
+$labels['valuenotequals'] = '값이 다음과 같지 않음';
+$labels['setflags'] = '메시지에 깃발을 설정';
+$labels['addflags'] = '메시지에 깃발을 추가';
+$labels['removeflags'] = '메시지에서 깃발을 제거';
 $labels['flagread'] = '읽음';
 $labels['flagdeleted'] = '삭제됨';
 $labels['flaganswered'] = '응답함';
-$labels['flagflagged'] = '표시함';
+$labels['flagflagged'] = '깃발을 추가함';
 $labels['flagdraft'] = '임시 보관함';
-$labels['setvariable'] = 'Set variable';
-$labels['setvarname'] = 'Variable name:';
-$labels['setvarvalue'] = 'Variable value:';
-$labels['setvarmodifiers'] = 'Modifiers:';
-$labels['varlower'] = 'lower-case';
-$labels['varupper'] = 'upper-case';
-$labels['varlowerfirst'] = 'first character lower-case';
-$labels['varupperfirst'] = 'first character upper-case';
-$labels['varquotewildcard'] = 'quote special characters';
-$labels['varlength'] = 'length';
-$labels['notify'] = 'Send notification';
-$labels['notifyaddress'] = 'To e-mail address:';
-$labels['notifybody'] = 'Notification body:';
-$labels['notifysubject'] = 'Notification subject:';
-$labels['notifyfrom'] = 'Notification sender:';
-$labels['notifyimportance'] = 'Importance:';
-$labels['notifyimportancelow'] = 'low';
-$labels['notifyimportancenormal'] = 'normal';
-$labels['notifyimportancehigh'] = 'high';
+$labels['setvariable'] = '변수 설정';
+$labels['setvarname'] = '변수명:';
+$labels['setvarvalue'] = '변수 값:';
+$labels['setvarmodifiers'] = '수식자:';
+$labels['varlower'] = '소문자';
+$labels['varupper'] = '대문자';
+$labels['varlowerfirst'] = '첫 문자를 소문자로';
+$labels['varupperfirst'] = '첫 문자를 대문자로';
+$labels['varquotewildcard'] = '특수 기호를 인용';
+$labels['varlength'] = '길이';
+$labels['notify'] = '알림 메시지 보내기';
+$labels['notifyaddress'] = '대상 이메일 주소:';
+$labels['notifybody'] = '알림 메시지 본문:';
+$labels['notifysubject'] = '알림 메시지 제목:';
+$labels['notifyfrom'] = '알림 메시지 발신인:';
+$labels['notifyimportance'] = '중요도:';
+$labels['notifyimportancelow'] = '낮음';
+$labels['notifyimportancenormal'] = '보통';
+$labels['notifyimportancehigh'] = '높음';
 $labels['filtercreate'] = '필터 생성';
-$labels['usedata'] = '필터에서 다음에 오는 데이터를 사용';
+$labels['usedata'] = '필터에서 다음 데이터를 사용:';
 $labels['nextstep'] = '다음 단계';
 $labels['...'] = '...';
-$labels['advancedopts'] = '상세 설정';
+$labels['advancedopts'] = '고급 설정';
 $labels['body'] = '본문';
 $labels['address'] = '주소';
-$labels['envelope'] = 'envelope';
-$labels['modifier'] = 'modifier:';
+$labels['envelope'] = '봉투';
+$labels['modifier'] = '수식자:';
 $labels['text'] = '텍스트';
-$labels['undecoded'] = 'undecoded (raw)';
-$labels['contenttype'] = 'content type';
-$labels['modtype'] = 'type:';
-$labels['allparts'] = 'all';
+$labels['undecoded'] = '암호화되지 않음 (원상태)';
+$labels['contenttype'] = '내용 유형';
+$labels['modtype'] = '유형:';
+$labels['allparts'] = '모두';
 $labels['domain'] = '도메인';
-$labels['localpart'] = 'local part';
+$labels['localpart'] = '로컬 부분';
 $labels['user'] = '사용자';
-$labels['detail'] = 'detail';
-$labels['comparator'] = 'comparator:';
-$labels['default'] = '기본값';
-$labels['octet'] = 'strict (octet)';
-$labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
-$labels['asciinumeric'] = 'numeric (ascii-numeric)';
+$labels['detail'] = '세부사항';
+$labels['comparator'] = '비교기:';
+$labels['default'] = '기본';
+$labels['octet'] = '엄격 (8진수)';
+$labels['asciicasemap'] = '대/소문자 구분 (ascii-casemap)';
+$labels['asciinumeric'] = '숫자 (ascii-numeric)';
 
 $messages = array();
-$messages['filterunknownerror'] = '알수 없는 서버 에러.';
-$messages['filterconnerror'] = '서버에 연결할 수 없습니다.';
-$messages['filterdeleteerror'] = '필터를 삭제할 수 없습니다. 서버 에러 발생 함.';
-$messages['filterdeleted'] = '필터를 성공적으로 삭제 함.';
-$messages['filtersaved'] = '필터를 성공적으로 저장 함.';
-$messages['filtersaveerror'] = '필터를 저장할 수 없음. 서버 에러 발생 함.';
-$messages['filterdeleteconfirm'] = '정말로 선택한 필터의 삭제를 원하십니까?';
-$messages['ruledeleteconfirm'] = '선택한 규칙을 삭제하고자 하는 것이 확실합니까?';
-$messages['actiondeleteconfirm'] = '선택한 동작을 삭제하고자 하는 것이 확실합니까?';
-$messages['forbiddenchars'] = '필드에 금지된 문자가 있음.';
-$messages['cannotbeempty'] = '필드는 비어있을 수 없음.';
-$messages['ruleexist'] = '지정한 이름의 필터가 이미 존재 함.';
-$messages['setactivateerror'] = '선택한 필터 묶음을 활성화 할 수 없음. 서버 에러 발생 함.';
-$messages['setdeactivateerror'] = '선택한 필터 묶음을 비활성화 할 수 없음. 서버 에러 발생 함.';
-$messages['setdeleteerror'] = '선택한 필터 묶음을 삭제할 수 없음. 서버 에러 발생 함.';
-$messages['setactivated'] = '필터 묶음을 성공적으로 활성화 하였음.';
-$messages['setdeactivated'] = '필터 묶음을 성공적으로 비활성화 하였음.';
-$messages['setdeleted'] = '필터 묶음을 성공적으로 삭제 함.';
-$messages['setdeleteconfirm'] = '선택한 필터 묶음을 지우고자 하는 것이 확실합니까?';
-$messages['setcreateerror'] = '필터 묶음을 생성할 수 없음. 서버 에러 발생 함.';
-$messages['setcreated'] = '필터 묶음을 성공적으로 생성 함.';
-$messages['activateerror'] = '선택한 필터(들)을 동작하게 할 수 없음. 서버 에러 발생 함.';
-$messages['deactivateerror'] = '선택한 필터(들)을 동작하지 않게 할 수 없음. 서버 에러 발생 함.';
-$messages['deactivated'] = '필터(들)을 동작하게 하는데 성공하였음.';
-$messages['activated'] = '필터(들)을 동작하지 않게 하는데 성공하였음.';
-$messages['moved'] = '필터를 이동하는 데 성공하였음.';
-$messages['moveerror'] = '선택한 필터를 이동할 수 없음. 서버 에러 발생 함.';
+$messages['filterunknownerror'] = '알수 없는 서버 오류.';
+$messages['filterconnerror'] = '서버에 연결할 수 없음.';
+$messages['filterdeleteerror'] = '필터를 삭제할 수 없음. 서버 오류가 발생함.';
+$messages['filterdeleted'] = '필터가 성공적으로 삭제됨.';
+$messages['filtersaved'] = '필터가 성공적으로 저장됨.';
+$messages['filtersaveerror'] = '필터를 저장할 수 없음. 서버 오류가 발생함.';
+$messages['filterdeleteconfirm'] = '정말로 선택한 필터를 삭제하시겠습니까?';
+$messages['ruledeleteconfirm'] = '정말로 선택한 규칙을 삭제하시겠습니까?';
+$messages['actiondeleteconfirm'] = '정말로 선택한 동작을 삭제하시겠습니까?';
+$messages['forbiddenchars'] = '필드에 금지된 문자가 존재함.';
+$messages['cannotbeempty'] = '필드는 비워둘 수 없음.';
+$messages['ruleexist'] = '지정한 이름의 필터가 이미 존재함.';
+$messages['setactivateerror'] = '선택한 필터 세트를 활성화 할 수 없음. 서버 오류가 발생함.';
+$messages['setdeactivateerror'] = '선택한 필터 세트를 비활성화 할 수 없음. 서버 오류가 발생함.';
+$messages['setdeleteerror'] = '선택한 필터 세트를 삭제할 수 없음. 서버 오류가 발생함.';
+$messages['setactivated'] = '필터 세트가 성공적으로 활성화됨.';
+$messages['setdeactivated'] = '필터 세트가 성공적으로 비활성화됨.';
+$messages['setdeleted'] = '필터 세트가 성공적으로 삭제됨.';
+$messages['setdeleteconfirm'] = '정말로 선택한 필터 세트를 삭제하시겠습니까?';
+$messages['setcreateerror'] = '필터 세트를 생성할 수 없음. 서버 오류가 발생함.';
+$messages['setcreated'] = '필터 세트가 성공적으로 생성됨.';
+$messages['activateerror'] = '선택한 필터를 활성화할 수 없음. 서버 오류가 발생함.';
+$messages['deactivateerror'] = '선택한 필터를 비활성화할 수 없음. 서버 오류가 발생함.';
+$messages['deactivated'] = '필터가 성공적으로 비활성화됨.';
+$messages['activated'] = '필터가 성공적으로 활성화됨.';
+$messages['moved'] = '필터가 성공적으로 이동함.';
+$messages['moveerror'] = '선택한 필터를 이동할 수 없음. 서버 오류가 발생함.';
 $messages['nametoolong'] = '이름이 너무 김.';
 $messages['namereserved'] = '예약된 이름.';
-$messages['setexist'] = '묶음이 이미 존재 함.';
-$messages['nodata'] = '적어도 하나의 위치가 선택되어야 함!';
+$messages['setexist'] = '세트가 이미 존재함.';
+$messages['nodata'] = '최소 하나의 위치가 선택되어야 합니다!';
 
 ?>
diff --git a/plugins/managesieve/localization/lt_LT.inc b/plugins/managesieve/localization/lt_LT.inc
index d0a19cc..8fafb6d 100644
--- a/plugins/managesieve/localization/lt_LT.inc
+++ b/plugins/managesieve/localization/lt_LT.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'SiuntÄ—jas';
 $labels['recipient'] = 'GavÄ—jas';
 $labels['vacationaddresses'] = 'Papildomas gavėjų adresų sąrašas (skirti kableliais):';
 $labels['vacationdays'] = 'Kaip dažnai išsiųsti laiškus (dienomis):';
+$labels['vacationinterval'] = 'Kaip dažnai siųsti laiškus:';
+$labels['days'] = 'd.';
+$labels['seconds'] = 'sek.';
 $labels['vacationreason'] = 'Laiško tekstas';
 $labels['vacationsubject'] = 'Laiško tema:';
 $labels['rulestop'] = 'Nutraukti taisyklių vykdymą';
@@ -169,6 +172,6 @@ $messages['moveerror'] = 'Pasirinkto filtro perkelti neįmanoma. Įvyko serverio
 $messages['nametoolong'] = 'Vardas per ilgas.';
 $messages['namereserved'] = 'Rezervuotas vardas.';
 $messages['setexist'] = 'Rinkinys jau yra sukurtas.';
-$messages['nodata'] = 'At least one position must be selected!';
+$messages['nodata'] = 'BÅ«tina pasirinkti bent vienÄ… pozicijÄ…!';
 
 ?>
diff --git a/plugins/managesieve/localization/lv_LV.inc b/plugins/managesieve/localization/lv_LV.inc
index dc0d6fd..f1f85c2 100644
--- a/plugins/managesieve/localization/lv_LV.inc
+++ b/plugins/managesieve/localization/lv_LV.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Sūtītājs';
 $labels['recipient'] = 'Saņēmējs';
 $labels['vacationaddresses'] = 'Ievadiet vienu vai vairākus e-pastu(s), atdalot tos komatu:';
 $labels['vacationdays'] = 'Cik dienu laikā vienam un tam pašam sūtītājam neatbildēt atkārtoti (piem., 7):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Atvaļinājuma paziņojuma teksts:';
 $labels['vacationsubject'] = 'Vēstules tēma:';
 $labels['rulestop'] = 'Apturēt nosacījumu pārbaudi';
diff --git a/plugins/managesieve/localization/ml_IN.inc b/plugins/managesieve/localization/ml_IN.inc
index 88c57da..67cd682 100644
--- a/plugins/managesieve/localization/ml_IN.inc
+++ b/plugins/managesieve/localization/ml_IN.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'അയചയാള്‍';
 $labels['recipient'] = 'സ്വീകര്‍ത്താവ്';
 $labels['vacationaddresses'] = 'സ്വീകര്‍ത്താവിന്റെ ഇമെയില്‍ വിലാസങ്ങളുടെ അധികമുള്ള പട്ടിക (കോമയിട്ട് തിരിച്ച)';
 $labels['vacationdays'] = 'എത്ര ഭിവസം കൂടുമ്പോള്‍ സന്ദേശം അയക്കണം:';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'സന്ദേശത്തിന്റെ ഉള്ളടക്കം (അവധിയുടെ കാരണം):';
 $labels['vacationsubject'] = 'സന്ദേശത്തിന്റെ വിഷയം:';
 $labels['rulestop'] = 'നിയമങ്ങള്‍ വിലയിരുത്തുന്നത് നിര്‍ത്തുക';
diff --git a/plugins/managesieve/localization/mr_IN.inc b/plugins/managesieve/localization/mr_IN.inc
index 20a9999..3339737 100644
--- a/plugins/managesieve/localization/mr_IN.inc
+++ b/plugins/managesieve/localization/mr_IN.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'प्रेषक';
 $labels['recipient'] = 'Recipient';
 $labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
 $labels['vacationdays'] = 'How often send messages (in days):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Message body (vacation reason):';
 $labels['vacationsubject'] = 'Message subject:';
 $labels['rulestop'] = 'Stop evaluating rules';
diff --git a/plugins/managesieve/localization/nb_NO.inc b/plugins/managesieve/localization/nb_NO.inc
index 167283c..c2c17b2 100644
--- a/plugins/managesieve/localization/nb_NO.inc
+++ b/plugins/managesieve/localization/nb_NO.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Avsender';
 $labels['recipient'] = 'Mottaker';
 $labels['vacationaddresses'] = 'Liste med mottakeradresser (adskilt med komma):';
 $labels['vacationdays'] = 'Periode mellom meldinger (i dager):';
+$labels['vacationinterval'] = 'Periode mellom meldinger:';
+$labels['days'] = 'dager';
+$labels['seconds'] = 'sekunder';
 $labels['vacationreason'] = 'Innhold (begrunnelse for fravær)';
 $labels['vacationsubject'] = 'Meldingsemne:';
 $labels['rulestop'] = 'Stopp evaluering av regler';
diff --git a/plugins/managesieve/localization/nl_NL.inc b/plugins/managesieve/localization/nl_NL.inc
index e90eb28..1fd6eee 100644
--- a/plugins/managesieve/localization/nl_NL.inc
+++ b/plugins/managesieve/localization/nl_NL.inc
@@ -18,7 +18,7 @@
 
 
 $labels['filters'] = 'Filters';
-$labels['managefilters'] = 'Beheer inkomende mail filters';
+$labels['managefilters'] = 'Beheer filters voor inkomende e-mail';
 $labels['filtername'] = 'Filternaam';
 $labels['newfilter'] = 'Nieuw filter';
 $labels['filteradd'] = 'Filter toevoegen';
@@ -43,7 +43,7 @@ $labels['filterover'] = 'over';
 $labels['addrule'] = 'Regel toevoegen';
 $labels['delrule'] = 'Regel verwijderen';
 $labels['messagemoveto'] = 'Verplaats bericht naar';
-$labels['messageredirect'] = 'Redirect bericht naar';
+$labels['messageredirect'] = 'Bericht doorsturen naar';
 $labels['messagecopyto'] = 'Kopieer bericht naar';
 $labels['messagesendcopy'] = 'Verstuur een kopie naar';
 $labels['messagereply'] = 'Beantwoord met bericht';
@@ -57,6 +57,9 @@ $labels['sender'] = 'Afzender';
 $labels['recipient'] = 'Ontvanger';
 $labels['vacationaddresses'] = 'Aanvullende lijst van geadresseerden (gescheiden met komma\'s):';
 $labels['vacationdays'] = 'Hoe vaak moet een bericht verstuurd worden (in dagen):';
+$labels['vacationinterval'] = 'Hoe vaak moet een bericht verstuurd worden:';
+$labels['days'] = 'dagen';
+$labels['seconds'] = 'seconden';
 $labels['vacationreason'] = 'Bericht (vakantiereden):';
 $labels['vacationsubject'] = 'Onderwerp:';
 $labels['rulestop'] = 'Stop met regels uitvoeren';
diff --git a/plugins/managesieve/localization/nn_NO.inc b/plugins/managesieve/localization/nn_NO.inc
index 9bb9a7c..18bf8b9 100644
--- a/plugins/managesieve/localization/nn_NO.inc
+++ b/plugins/managesieve/localization/nn_NO.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Avsendar';
 $labels['recipient'] = 'Mottakar';
 $labels['vacationaddresses'] = 'Liste med mottakaradresser (komma-separert):';
 $labels['vacationdays'] = 'Periode mellom meldingar (i dagar):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Innhald (grunngjeving for fråvær)';
 $labels['vacationsubject'] = 'Meldingsemne:';
 $labels['rulestop'] = 'Stopp evaluering av regler';
diff --git a/plugins/managesieve/localization/pl_PL.inc b/plugins/managesieve/localization/pl_PL.inc
index e3a530e..9a6b70d 100644
--- a/plugins/managesieve/localization/pl_PL.inc
+++ b/plugins/managesieve/localization/pl_PL.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Nadawca';
 $labels['recipient'] = 'Odbiorca';
 $labels['vacationaddresses'] = 'Lista dodatkowych adresów odbiorców (oddzielonych przecinkami):';
 $labels['vacationdays'] = 'Częstotliwość wysyłania wiadomości (w dniach):';
+$labels['vacationinterval'] = 'Jak często wysyłać wiadomości:';
+$labels['days'] = 'dni';
+$labels['seconds'] = 'sekundy';
 $labels['vacationreason'] = 'Treść (przyczyna nieobecności):';
 $labels['vacationsubject'] = 'Temat wiadomości:';
 $labels['rulestop'] = 'Przerwij przetwarzanie reguł';
diff --git a/plugins/managesieve/localization/pt_BR.inc b/plugins/managesieve/localization/pt_BR.inc
index a18ef15..9411193 100644
--- a/plugins/managesieve/localization/pt_BR.inc
+++ b/plugins/managesieve/localization/pt_BR.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Remetente';
 $labels['recipient'] = 'Destinatário';
 $labels['vacationaddresses'] = 'Lista adicional de e-mails destinatários (separado por vírgula):';
 $labels['vacationdays'] = 'Enviar mensagens com que frequência (em dias):';
+$labels['vacationinterval'] = 'Como geralmente enviam mensagens:';
+$labels['days'] = 'dias';
+$labels['seconds'] = 'segundos';
 $labels['vacationreason'] = 'Corpo da mensagem (motivo de férias):';
 $labels['vacationsubject'] = 'Título da mensagem:';
 $labels['rulestop'] = 'Parar de avaliar regras';
diff --git a/plugins/managesieve/localization/pt_PT.inc b/plugins/managesieve/localization/pt_PT.inc
index 375277a..bfb3f29 100644
--- a/plugins/managesieve/localization/pt_PT.inc
+++ b/plugins/managesieve/localization/pt_PT.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Remetente';
 $labels['recipient'] = 'Destinatário';
 $labels['vacationaddresses'] = 'Lista adicional de destinatários de e-mails (separados por vírgula):';
 $labels['vacationdays'] = 'Enviar mensagens com que frequência (em dias):';
+$labels['vacationinterval'] = 'Com que frequência envia mensagens:';
+$labels['days'] = 'dias';
+$labels['seconds'] = 'segundos';
 $labels['vacationreason'] = 'Conteúdo da mensagem (motivo da ausência):';
 $labels['vacationsubject'] = 'Assunto da mensagem:';
 $labels['rulestop'] = 'Parar de avaliar regras';
diff --git a/plugins/managesieve/localization/ro_RO.inc b/plugins/managesieve/localization/ro_RO.inc
index a619045..5eb7186 100644
--- a/plugins/managesieve/localization/ro_RO.inc
+++ b/plugins/managesieve/localization/ro_RO.inc
@@ -55,8 +55,11 @@ $labels['add'] = 'Adaugă';
 $labels['del'] = 'Șterge';
 $labels['sender'] = 'Expeditor';
 $labels['recipient'] = 'Destinatar';
-$labels['vacationaddresses'] = 'Adresele mele de e-mail adiționale (împărțite cu virgulă):';
+$labels['vacationaddr'] = 'My additional e-mail addresse(s):';
 $labels['vacationdays'] = 'Cât de des să trimit mesajele (în zile):';
+$labels['vacationinterval'] = 'Cât de des să trimit mesaje:';
+$labels['days'] = 'zile';
+$labels['seconds'] = 'secunde';
 $labels['vacationreason'] = 'Corpul mesajului (motivul vacanţei):';
 $labels['vacationsubject'] = 'Subiectul mesajului:';
 $labels['rulestop'] = 'Nu mai evalua reguli';
diff --git a/plugins/managesieve/localization/ru_RU.inc b/plugins/managesieve/localization/ru_RU.inc
index 47b1399..fb3f113 100644
--- a/plugins/managesieve/localization/ru_RU.inc
+++ b/plugins/managesieve/localization/ru_RU.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Отправитель';
 $labels['recipient'] = 'Получатель';
 $labels['vacationaddresses'] = 'Список моих дополнительных адресов (разделённых запятыми):';
 $labels['vacationdays'] = 'Как часто отправлять сообщения (в днях):';
+$labels['vacationinterval'] = 'Как часто отправлять сообщения:';
+$labels['days'] = 'дней';
+$labels['seconds'] = 'секунд';
 $labels['vacationreason'] = 'Текст сообщения (причина отсутствия):';
 $labels['vacationsubject'] = 'Тема сообщения:';
 $labels['rulestop'] = 'Закончить выполнение';
diff --git a/plugins/managesieve/localization/si_LK.inc b/plugins/managesieve/localization/si_LK.inc
index 8a28563..afc2e38 100644
--- a/plugins/managesieve/localization/si_LK.inc
+++ b/plugins/managesieve/localization/si_LK.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'යවන්නා';
 $labels['recipient'] = 'ලබන්නා';
 $labels['vacationaddresses'] = 'My additional e-mail addresse(s) (comma-separated):';
 $labels['vacationdays'] = 'How often send messages (in days):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Message body (vacation reason):';
 $labels['vacationsubject'] = 'පණිවිඩයේ මාතෘකාව:';
 $labels['rulestop'] = 'Stop evaluating rules';
diff --git a/plugins/managesieve/localization/sk_SK.inc b/plugins/managesieve/localization/sk_SK.inc
index 81caec0..f336cf2 100644
--- a/plugins/managesieve/localization/sk_SK.inc
+++ b/plugins/managesieve/localization/sk_SK.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Odosielateľ';
 $labels['recipient'] = 'Adresát';
 $labels['vacationaddresses'] = 'Dodatoční príjemcovia správy (oddelení čiarkami):';
 $labels['vacationdays'] = 'Počet dní medzi odoslaním správy:';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Dôvod neprítomnosti:';
 $labels['vacationsubject'] = 'Predmet správy:';
 $labels['rulestop'] = 'Koniec pravidiel';
diff --git a/plugins/managesieve/localization/sl_SI.inc b/plugins/managesieve/localization/sl_SI.inc
index eb37f52..d9da8ab 100644
--- a/plugins/managesieve/localization/sl_SI.inc
+++ b/plugins/managesieve/localization/sl_SI.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Pošiljatelj';
 $labels['recipient'] = 'Prejemnik';
 $labels['vacationaddresses'] = 'Dodaten seznam naslovov prejemnikov (ločenih z vejico):';
 $labels['vacationdays'] = 'Kako pogosto naj bodo sporočila poslana (v dnevih):';
+$labels['vacationinterval'] = 'Sporočila pošlji na:';
+$labels['days'] = 'dni';
+$labels['seconds'] = 'sekund';
 $labels['vacationreason'] = 'Vsebina sporočila (vzrok za odsotnost):';
 $labels['vacationsubject'] = 'Zadeva sporočila';
 $labels['rulestop'] = 'Prekini z izvajanjem pravil';
@@ -99,14 +102,14 @@ $labels['setvariable'] = 'Nastavi spremenljivko';
 $labels['setvarname'] = 'Ime spremenljivke:';
 $labels['setvarvalue'] = 'Vrednost spremenljivke:';
 $labels['setvarmodifiers'] = 'Modifikator:';
-$labels['varlower'] = 'lower-case';
-$labels['varupper'] = 'upper-case';
-$labels['varlowerfirst'] = 'first character lower-case';
+$labels['varlower'] = 'majhne črke';
+$labels['varupper'] = 'velike črke';
+$labels['varlowerfirst'] = 'prvi znak velika začetnica';
 $labels['varupperfirst'] = 'prvi znak velika začetnica';
 $labels['varquotewildcard'] = 'citiraj posebne znake';
 $labels['varlength'] = 'dolžina';
 $labels['notify'] = 'Poštlji obvestilo';
-$labels['notifyaddress'] = 'To e-mail address:';
+$labels['notifyaddress'] = 'Na elektronski naslov:';
 $labels['notifybody'] = 'Telo obvestila:';
 $labels['notifysubject'] = 'Zadeva obvestila:';
 $labels['notifyfrom'] = 'Pošiljatelj obvestila:';
diff --git a/plugins/managesieve/localization/sv_SE.inc b/plugins/managesieve/localization/sv_SE.inc
index 50749e6..49d5b12 100644
--- a/plugins/managesieve/localization/sv_SE.inc
+++ b/plugins/managesieve/localization/sv_SE.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Avsändare';
 $labels['recipient'] = 'Mottagare';
 $labels['vacationaddresses'] = 'Ytterligare mottagaradresser (avdelade med kommatecken)';
 $labels['vacationdays'] = 'Antal dagar mellan auto-svar:';
+$labels['vacationinterval'] = 'Tid mellan auto-svar:';
+$labels['days'] = 'Dagar';
+$labels['seconds'] = 'Sekunder';
 $labels['vacationreason'] = 'Meddelande i auto-svar:';
 $labels['vacationsubject'] = 'Meddelandeämne:';
 $labels['rulestop'] = 'Avsluta filtrering';
diff --git a/plugins/managesieve/localization/tr_TR.inc b/plugins/managesieve/localization/tr_TR.inc
index 1c12661..c36869d 100644
--- a/plugins/managesieve/localization/tr_TR.inc
+++ b/plugins/managesieve/localization/tr_TR.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Gönderici';
 $labels['recipient'] = 'Alıcı';
 $labels['vacationaddresses'] = 'İlave e-posta adreslerim(virgül ile ayrılmış)';
 $labels['vacationdays'] = 'Ne sıklıkla mesajlar gönderilir(gün)';
+$labels['vacationinterval'] = 'Ne kadar sıklıkla mesaj gönderirsiniz:';
+$labels['days'] = 'günler';
+$labels['seconds'] = 'saniyeler';
 $labels['vacationreason'] = 'Mesaj gövdesi(tatil sebebi):';
 $labels['vacationsubject'] = 'Mesaj konusu:';
 $labels['rulestop'] = 'Kuralları değerlendirmeyi bitir';
diff --git a/plugins/managesieve/localization/uk_UA.inc b/plugins/managesieve/localization/uk_UA.inc
index 4763418..41623df 100644
--- a/plugins/managesieve/localization/uk_UA.inc
+++ b/plugins/managesieve/localization/uk_UA.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Відправник';
 $labels['recipient'] = 'Отримувач';
 $labels['vacationaddresses'] = 'Додатковий список адрес отримувачів (розділених комою)';
 $labels['vacationdays'] = 'Як часто повторювати (у днях):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Текст повідомлення:';
 $labels['vacationsubject'] = 'Message subject:';
 $labels['rulestop'] = 'Зупинити перевірку правил';
diff --git a/plugins/managesieve/localization/vi_VN.inc b/plugins/managesieve/localization/vi_VN.inc
index fbb39b6..0a4ce6e 100644
--- a/plugins/managesieve/localization/vi_VN.inc
+++ b/plugins/managesieve/localization/vi_VN.inc
@@ -57,6 +57,9 @@ $labels['sender'] = 'Người gửi';
 $labels['recipient'] = 'Người nhận';
 $labels['vacationaddresses'] = 'Địa chỉ email bổ sung của tôi ( phân cách bằng dấu phẩy)';
 $labels['vacationdays'] = 'Số lần gửi thư (trong ngày)';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = 'Nội dung chính';
 $labels['vacationsubject'] = 'Tiêu đề thư';
 $labels['rulestop'] = 'Ngừng đánh giá qui luật';
diff --git a/plugins/managesieve/localization/zh_CN.inc b/plugins/managesieve/localization/zh_CN.inc
index b3b09ec..79b705c 100644
--- a/plugins/managesieve/localization/zh_CN.inc
+++ b/plugins/managesieve/localization/zh_CN.inc
@@ -35,29 +35,32 @@ $labels['filterisnot'] = '不等于';
 $labels['filterexists'] = '存在';
 $labels['filternotexists'] = '不存在';
 $labels['filtermatches'] = '匹配表达式';
-$labels['filternotmatches'] = '无匹配的表达式';
+$labels['filternotmatches'] = '不匹配表达式';
 $labels['filterregex'] = '匹配正则表达式';
-$labels['filternotregex'] = '无匹配的正则表达式';
+$labels['filternotregex'] = '不匹配正则表达式';
 $labels['filterunder'] = '小于';
 $labels['filterover'] = '大于';
-$labels['addrule'] = '添加规则';
+$labels['addrule'] = '新建规则';
 $labels['delrule'] = '删除规则';
 $labels['messagemoveto'] = '将邮件移至';
 $labels['messageredirect'] = '将邮件转发至';
 $labels['messagecopyto'] = '复制邮件至';
 $labels['messagesendcopy'] = '发送复制邮件至';
-$labels['messagereply'] = '回复以下信息';
+$labels['messagereply'] = '回复以下内容';
 $labels['messagedelete'] = '删除邮件';
-$labels['messagediscard'] = '舍弃邮件并回复以下信息';
-$labels['messagesrules'] = '对收取的邮件应用规则:';
-$labels['messagesactions'] = '...执行以下动作:';
+$labels['messagediscard'] = '舍弃邮件并回复以下内容';
+$labels['messagesrules'] = '对新收取的邮件应用规则:';
+$labels['messagesactions'] = '执行以下操作:';
 $labels['add'] = '添加';
 $labels['del'] = '删除';
 $labels['sender'] = '发件人';
 $labels['recipient'] = '收件人';
-$labels['vacationaddresses'] = '收件人地址的附加名单(以逗号分隔)';
-$labels['vacationdays'] = '发送邮件频率(天数):';
-$labels['vacationreason'] = '邮件正文(休假原因)';
+$labels['vacationaddresses'] = '收件人地址的附加名单(以半角逗号分隔)';
+$labels['vacationdays'] = '发送邮件频率(单位:天):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
+$labels['vacationreason'] = '邮件正文(假期原因)';
 $labels['vacationsubject'] = '邮件主题';
 $labels['rulestop'] = '停止评价规则';
 $labels['enable'] = '启用/禁用';
@@ -70,11 +73,11 @@ $labels['filtersetdeact'] = '停用当前的过滤器设置集';
 $labels['filterdef'] = '过滤器定义';
 $labels['filtersetname'] = '过滤器集的名称';
 $labels['newfilterset'] = '新的过滤器集';
-$labels['active'] = '活动';
+$labels['active'] = '启用';
 $labels['none'] = 'æ— ';
-$labels['fromset'] = '从设置';
+$labels['fromset'] = '从设置集';
 $labels['fromfile'] = '从文件';
-$labels['filterdisabled'] = '禁用过滤器';
+$labels['filterdisabled'] = '过滤器已禁用';
 $labels['countisgreaterthan'] = '计数大于';
 $labels['countisgreaterthanequal'] = '计数大于或等于';
 $labels['countislessthan'] = '计数小于';
@@ -90,7 +93,7 @@ $labels['valuenotequals'] = '值不等于';
 $labels['setflags'] = '设定邮件的标识';
 $labels['addflags'] = '增加邮件的标识';
 $labels['removeflags'] = '删除邮件的标识';
-$labels['flagread'] = '阅读';
+$labels['flagread'] = '读取';
 $labels['flagdeleted'] = '删除';
 $labels['flaganswered'] = '已答复';
 $labels['flagflagged'] = '已标记';
@@ -98,26 +101,26 @@ $labels['flagdraft'] = '草稿';
 $labels['setvariable'] = '设置变量';
 $labels['setvarname'] = '变量名:';
 $labels['setvarvalue'] = '值:';
-$labels['setvarmodifiers'] = 'Modifiers:';
-$labels['varlower'] = 'lower-case';
-$labels['varupper'] = 'upper-case';
-$labels['varlowerfirst'] = 'first character lower-case';
-$labels['varupperfirst'] = 'first character upper-case';
-$labels['varquotewildcard'] = 'quote special characters';
+$labels['setvarmodifiers'] = '修改:';
+$labels['varlower'] = '小写';
+$labels['varupper'] = '大写';
+$labels['varlowerfirst'] = '首字母小写';
+$labels['varupperfirst'] = '首字母大写';
+$labels['varquotewildcard'] = '引用特殊字符';
 $labels['varlength'] = '长度';
 $labels['notify'] = '发送通知';
-$labels['notifyaddress'] = 'To e-mail address:';
-$labels['notifybody'] = 'Notification body:';
+$labels['notifyaddress'] = '收件地址:';
+$labels['notifybody'] = '通知正文:';
 $labels['notifysubject'] = '通知主题';
-$labels['notifyfrom'] = 'Notification sender:';
+$labels['notifyfrom'] = '通知的发送人:';
 $labels['notifyimportance'] = '优先级:';
 $labels['notifyimportancelow'] = '低';
 $labels['notifyimportancenormal'] = '中';
 $labels['notifyimportancehigh'] = '高';
-$labels['filtercreate'] = '创建过滤器';
-$labels['usedata'] = '在过滤器中使用以下数据';
+$labels['filtercreate'] = '创建过滤规则';
+$labels['usedata'] = '在过滤器中使用下列数据';
 $labels['nextstep'] = '下一步';
-$labels['...'] = '……';
+$labels['...'] = '...';
 $labels['advancedopts'] = '高级选项';
 $labels['body'] = '正文';
 $labels['address'] = '地址';
@@ -134,41 +137,41 @@ $labels['user'] = '用户';
 $labels['detail'] = '细节';
 $labels['comparator'] = '比较:';
 $labels['default'] = '默认';
-$labels['octet'] = '严格的(字节)';
-$labels['asciicasemap'] = '不区分大小写(ascii字符)';
-$labels['asciinumeric'] = '数字(ascii数字)';
+$labels['octet'] = '严格模式(字节)';
+$labels['asciicasemap'] = '不区分大小写(ascii 字符)';
+$labels['asciinumeric'] = '数字类型(ascii 数字)';
 
 $messages = array();
 $messages['filterunknownerror'] = '未知的服务器错误';
-$messages['filterconnerror'] = '无法连接到 managesieve 服务器';
-$messages['filterdeleteerror'] = '无法删除过滤器。服务器错误';
+$messages['filterconnerror'] = '无法连接至服务器';
+$messages['filterdeleteerror'] = '无法删除过滤器。服务器发生错误';
 $messages['filterdeleted'] = '过滤器已成功删除';
 $messages['filtersaved'] = '过滤器已成功保存。';
-$messages['filtersaveerror'] = '无法保存过滤器。服务器错误';
+$messages['filtersaveerror'] = '无法保存过滤器。服务器发生错误';
 $messages['filterdeleteconfirm'] = '您确定要删除所选择的过滤器吗?';
 $messages['ruledeleteconfirm'] = '您确定要删除所选择的规则吗?';
-$messages['actiondeleteconfirm'] = '您确定要删除所选择的动作吗?';
-$messages['forbiddenchars'] = '内容中包含禁用的字符';
+$messages['actiondeleteconfirm'] = '您确定要删除所选择的操作吗?';
+$messages['forbiddenchars'] = '内容包含禁用字符';
 $messages['cannotbeempty'] = '内容不能为空';
 $messages['ruleexist'] = '指定过滤器名称已存在。';
-$messages['setactivateerror'] = '无法启用指定过滤器,服务器错误。';
-$messages['setdeactivateerror'] = '无法停用指定过滤器,服务器错误。';
-$messages['setdeleteerror'] = '无法删除指定过滤器,服务器错误。';
-$messages['setactivated'] = '过滤器成功启用。';
-$messages['setdeactivated'] = '过滤器成功停用。';
-$messages['setdeleted'] = '过滤器成功删除。';
-$messages['setdeleteconfirm'] = '你确定要删除指定过滤器?';
-$messages['setcreateerror'] = '无法创建过滤器,服务器错误。';
+$messages['setactivateerror'] = '无法启用指定过滤器,服务器发生错误。';
+$messages['setdeactivateerror'] = '无法停用指定过滤器,服务器发生错误。';
+$messages['setdeleteerror'] = '无法删除指定过滤器,服务器发生错误。';
+$messages['setactivated'] = '启用过滤器集成功。';
+$messages['setdeactivated'] = '禁用过滤器集成功。';
+$messages['setdeleted'] = '删除过滤器成功。';
+$messages['setdeleteconfirm'] = '您确定要删除指定的过滤器吗?';
+$messages['setcreateerror'] = '无法创建过滤器,服务器发生错误。';
 $messages['setcreated'] = '过滤器成功创建。';
-$messages['activateerror'] = '无法启用选中的过滤器,因为服务器发生错误。';
-$messages['deactivateerror'] = '无法禁用选中的过滤器,因为服务器发生错误。';
+$messages['activateerror'] = '无法启用选中的过滤器,服务器发生错误。';
+$messages['deactivateerror'] = '无法禁用选中的过滤器,服务器发生错误。';
 $messages['deactivated'] = '启用过滤器成功。';
 $messages['activated'] = '禁用过滤器成功。';
-$messages['moved'] = '过滤器移动成功。';
-$messages['moveerror'] = '无法移动选中的过滤器,因为服务器发生错误。';
-$messages['nametoolong'] = '名称太长。';
-$messages['namereserved'] = 'Reserved name.';
+$messages['moved'] = '移动过滤器成功。';
+$messages['moveerror'] = '无法移动选中的过滤器,服务器发生错误。';
+$messages['nametoolong'] = '无法创建过滤器集,名称太长。';
+$messages['namereserved'] = '保留名称。';
 $messages['setexist'] = '设置已存在。';
-$messages['nodata'] = 'At least one position must be selected!';
+$messages['nodata'] = '至少选择一个位置!';
 
 ?>
diff --git a/plugins/managesieve/localization/zh_TW.inc b/plugins/managesieve/localization/zh_TW.inc
index cee1d1a..3f3fc13 100644
--- a/plugins/managesieve/localization/zh_TW.inc
+++ b/plugins/managesieve/localization/zh_TW.inc
@@ -57,12 +57,15 @@ $labels['sender'] = '寄件者';
 $labels['recipient'] = '收件者';
 $labels['vacationaddresses'] = '其他收件者(用半形逗號隔開):';
 $labels['vacationdays'] = '多久回覆一次(單位:天):';
+$labels['vacationinterval'] = 'How often send messages:';
+$labels['days'] = 'days';
+$labels['seconds'] = 'seconds';
 $labels['vacationreason'] = '信件內容(休假原因):';
 $labels['vacationsubject'] = '訊息主旨:';
 $labels['rulestop'] = '停止評估規則';
 $labels['enable'] = '啟用/停用';
 $labels['filterset'] = '篩選器集合';
-$labels['filtersets'] = 'Filter sets';
+$labels['filtersets'] = '篩選器集合';
 $labels['filtersetadd'] = '加入篩選器集合';
 $labels['filtersetdel'] = '刪除目前的篩選器集合';
 $labels['filtersetact'] = '啟用目前的篩選器集合';
@@ -92,13 +95,13 @@ $labels['addflags'] = '新增標記到訊息';
 $labels['removeflags'] = '移除訊息標記';
 $labels['flagread'] = '讀取';
 $labels['flagdeleted'] = '刪除';
-$labels['flaganswered'] = 'Answered';
+$labels['flaganswered'] = '已經回覆';
 $labels['flagflagged'] = '已加標記的郵件';
 $labels['flagdraft'] = '草稿';
 $labels['setvariable'] = '設定變數';
 $labels['setvarname'] = '變數名稱:';
 $labels['setvarvalue'] = '變數值:';
-$labels['setvarmodifiers'] = 'Modifiers:';
+$labels['setvarmodifiers'] = '修改:';
 $labels['varlower'] = '低於';
 $labels['varupper'] = '高於';
 $labels['varlowerfirst'] = '第一個字低於';
@@ -121,8 +124,8 @@ $labels['...'] = '…';
 $labels['advancedopts'] = '進階選項';
 $labels['body'] = '內文';
 $labels['address'] = '郵件位址';
-$labels['envelope'] = 'envelope';
-$labels['modifier'] = 'modifier:';
+$labels['envelope'] = '信封';
+$labels['modifier'] = '修改:';
 $labels['text'] = '文字';
 $labels['undecoded'] = '未解碼(raw)';
 $labels['contenttype'] = '內容類型';
@@ -134,9 +137,9 @@ $labels['user'] = '使用者';
 $labels['detail'] = '細節';
 $labels['comparator'] = '比較:';
 $labels['default'] = '預設';
-$labels['octet'] = 'strict (octet)';
-$labels['asciicasemap'] = 'case insensitive (ascii-casemap)';
-$labels['asciinumeric'] = 'numeric (ascii-numeric)';
+$labels['octet'] = '嚴謹模式(八位元組)';
+$labels['asciicasemap'] = '不區分大小寫(採用ASCII-Casemap)';
+$labels['asciinumeric'] = '數字類型(ascii-numeric)';
 
 $messages = array();
 $messages['filterunknownerror'] = '未知的伺服器錯誤';
@@ -167,8 +170,8 @@ $messages['activated'] = '篩選器已停用';
 $messages['moved'] = '篩選器已移動';
 $messages['moveerror'] = '無法移動選擇的篩選器。伺服器錯誤';
 $messages['nametoolong'] = '無法建立篩選器集合。 名稱太長';
-$messages['namereserved'] = 'Reserved name.';
+$messages['namereserved'] = '保留名稱.';
 $messages['setexist'] = '設定已存在';
-$messages['nodata'] = 'At least one position must be selected!';
+$messages['nodata'] = '至少要選擇一個位置';
 
 ?>
diff --git a/plugins/managesieve/skins/classic/managesieve.css b/plugins/managesieve/skins/classic/managesieve.css
index 9527b44..b7c6f5d 100644
--- a/plugins/managesieve/skins/classic/managesieve.css
+++ b/plugins/managesieve/skins/classic/managesieve.css
@@ -171,12 +171,12 @@ td.advbutton a
 
 td.advbutton a.show
 {
-  background: url(images/down_small.gif) center no-repeat;
+  background: url(images/down_small.gif?v=8629.106) center no-repeat;
 }
 
 td.advbutton a.hide
 {
-  background: url(images/up_small.gif) center no-repeat;
+  background: url(images/up_small.gif?v=c56c.106) center no-repeat;
 }
 
 td.rowbuttons
@@ -274,7 +274,7 @@ span.sieve.error
 
 a.button.add
 {
-  background: url(images/add.png) no-repeat;
+  background: url(images/add.png?v=a165.280) no-repeat;
   width: 30px;
   height: 20px;
   margin-right: 4px;
@@ -283,7 +283,7 @@ a.button.add
 
 a.button.del
 {
-  background: url(images/del.png) no-repeat;
+  background: url(images/del.png?v=3c27.247) no-repeat;
   width: 30px;
   height: 20px;
   display: inline-block;
diff --git a/plugins/managesieve/skins/classic/managesieve_mail.css b/plugins/managesieve/skins/classic/managesieve_mail.css
index 87a11cc..73cc47b 100644
--- a/plugins/managesieve/skins/classic/managesieve_mail.css
+++ b/plugins/managesieve/skins/classic/managesieve_mail.css
@@ -1,5 +1,5 @@
 #messagemenu li a.filterlink {
-  background-image: url(images/filter.png);
+  background-image: url(images/filter.png?v=b0fe.547);
   background-position: 7px 0;
 }
 
diff --git a/plugins/managesieve/skins/larry/managesieve.css b/plugins/managesieve/skins/larry/managesieve.css
index 49ebe00..bf5910e 100644
--- a/plugins/managesieve/skins/larry/managesieve.css
+++ b/plugins/managesieve/skins/larry/managesieve.css
@@ -145,12 +145,12 @@ td.advbutton a
 
 td.advbutton a.show
 {
-  background: url(images/down_small.gif) center no-repeat;
+  background: url(images/down_small.gif?v=8629.106) center no-repeat;
 }
 
 td.advbutton a.hide
 {
-  background: url(images/up_small.gif) center no-repeat;
+  background: url(images/up_small.gif?v=c56c.106) center no-repeat;
 }
 
 td.rowbuttons
@@ -252,7 +252,7 @@ a.button
 
 a.button.add
 {
-  background: url(images/add.png) no-repeat;
+  background: url(images/add.png?v=a165.280) no-repeat;
   width: 30px;
   height: 20px;
   margin-right: 4px;
@@ -261,7 +261,7 @@ a.button.add
 
 a.button.del
 {
-  background: url(images/del.png) no-repeat;
+  background: url(images/del.png?v=3c27.247) no-repeat;
   width: 30px;
   height: 20px;
   display: inline-block;
diff --git a/plugins/markasjunk/localization/el_GR.inc b/plugins/markasjunk/localization/el_GR.inc
index 78cfaf0..fb16a29 100644
--- a/plugins/markasjunk/localization/el_GR.inc
+++ b/plugins/markasjunk/localization/el_GR.inc
@@ -17,7 +17,7 @@
 */
 
 $labels = array();
-$labels['buttontext'] = 'Junk';
+$labels['buttontext'] = 'Ανεπιθύμητα';
 $labels['buttontitle'] = 'Σήμανση ως Ανεπιθύμητου';
 $labels['reportedasjunk'] = 'Αναφέρθηκε ως Ανεπιθήμητο';
 
diff --git a/plugins/markasjunk/localization/gl_ES.inc b/plugins/markasjunk/localization/gl_ES.inc
index dd0c0ad..d2a9e98 100644
--- a/plugins/markasjunk/localization/gl_ES.inc
+++ b/plugins/markasjunk/localization/gl_ES.inc
@@ -17,7 +17,7 @@
 */
 
 $labels = array();
-$labels['buttontext'] = 'Junk';
+$labels['buttontext'] = 'Correo lixo';
 $labels['buttontitle'] = 'Marcar como correo lixo';
 $labels['reportedasjunk'] = 'Mensaxe marcada como correo lixo';
 
diff --git a/plugins/markasjunk/localization/ro_RO.inc b/plugins/markasjunk/localization/ro_RO.inc
index 03e5824..1186aab 100644
--- a/plugins/markasjunk/localization/ro_RO.inc
+++ b/plugins/markasjunk/localization/ro_RO.inc
@@ -17,8 +17,8 @@
 */
 
 $labels = array();
-$labels['buttontext'] = 'Vechituri';
-$labels['buttontitle'] = 'Marchează ca SPAM';
-$labels['reportedasjunk'] = 'Raportat cu succes ca SPAM';
+$labels['buttontext'] = 'Spam';
+$labels['buttontitle'] = 'Marchează ca Spam';
+$labels['reportedasjunk'] = 'Raportat cu succes ca Spam';
 
 ?>
\ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/ko_KR.inc b/plugins/new_user_dialog/localization/ko_KR.inc
index 82240f3..d9b5194 100644
--- a/plugins/new_user_dialog/localization/ko_KR.inc
+++ b/plugins/new_user_dialog/localization/ko_KR.inc
@@ -17,7 +17,7 @@
 */
 
 $labels = array();
-$labels['identitydialogtitle'] = '수신자의 신원을 채우기 바랍니다.';
-$labels['identitydialoghint'] = '이 박스는 최초로 로그인할 때만 나타납니다.';
+$labels['identitydialogtitle'] = '수신인의 신원을 완성하시기 바랍니다.';
+$labels['identitydialoghint'] = '이 상자는 최초로 로그인할 때만 나타납니다.';
 
 ?>
\ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/nl_NL.inc b/plugins/new_user_dialog/localization/nl_NL.inc
index 4d5d411..c5d392f 100644
--- a/plugins/new_user_dialog/localization/nl_NL.inc
+++ b/plugins/new_user_dialog/localization/nl_NL.inc
@@ -17,7 +17,7 @@
 */
 
 $labels = array();
-$labels['identitydialogtitle'] = 'Vul uw correcte identiteitgegevens in a.u.b.';
-$labels['identitydialoghint'] = 'Dit scherm verschijnt enkel bij uw eerste login.';
+$labels['identitydialogtitle'] = 'Vul alstublieft uw afzendergegevens in.';
+$labels['identitydialoghint'] = 'Dit scherm verschijnt eenmalig bij uw eerste aanmelding.';
 
 ?>
\ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/ro_RO.inc b/plugins/new_user_dialog/localization/ro_RO.inc
index caa8f32..9d16dae 100644
--- a/plugins/new_user_dialog/localization/ro_RO.inc
+++ b/plugins/new_user_dialog/localization/ro_RO.inc
@@ -17,7 +17,7 @@
 */
 
 $labels = array();
-$labels['identitydialogtitle'] = 'Te rog completează identitatea de expeditor.';
-$labels['identitydialoghint'] = 'Această căsuţă apare o data la prima autentificare.';
+$labels['identitydialogtitle'] = 'Te rog completează identitatea expeditorului.';
+$labels['identitydialoghint'] = 'Această căsuţă apare doar la prima autentificare.';
 
 ?>
\ No newline at end of file
diff --git a/plugins/new_user_dialog/localization/zh_CN.inc b/plugins/new_user_dialog/localization/zh_CN.inc
index 99b2de7..ca40173 100644
--- a/plugins/new_user_dialog/localization/zh_CN.inc
+++ b/plugins/new_user_dialog/localization/zh_CN.inc
@@ -17,7 +17,7 @@
 */
 
 $labels = array();
-$labels['identitydialogtitle'] = '请填写发送者标识';
+$labels['identitydialogtitle'] = '请填写发送人身份';
 $labels['identitydialoghint'] = '本提示仅在第一次登录时显示。';
 
 ?>
\ No newline at end of file
diff --git a/plugins/newmail_notifier/localization/gl_ES.inc b/plugins/newmail_notifier/localization/gl_ES.inc
index 6c1129b..8d10553 100644
--- a/plugins/newmail_notifier/localization/gl_ES.inc
+++ b/plugins/newmail_notifier/localization/gl_ES.inc
@@ -16,14 +16,14 @@
  For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/
 */
 
-$labels['basic'] = 'Display browser notifications on new message';
-$labels['desktop'] = 'Display desktop notifications on new message';
-$labels['sound'] = 'Play the sound on new message';
+$labels['basic'] = 'Amosar notificacións no navegador cando entre unha mensaxe nova';
+$labels['desktop'] = 'Amosar notificacións no escritorio cando chegue unha mensaxe nova';
+$labels['sound'] = 'Tocar un son cando chegue unha mensaxe nova';
 $labels['test'] = 'Proba';
 $labels['title'] = 'Novo Correo!';
-$labels['body'] = 'You\'ve received a new message.';
-$labels['testbody'] = 'This is a test notification.';
-$labels['desktopdisabled'] = 'Desktop notifications are disabled in your browser.';
+$labels['body'] = 'Recibiu unha mensaxe nova';
+$labels['testbody'] = 'Esta é unha notificación de proba';
+$labels['desktopdisabled'] = 'As notificacións de escritorio están desactivadas no seu navegador';
 $labels['desktopunsupported'] = 'O teu navegador non soporta notificacións de escritorio.';
 
 ?>
diff --git a/plugins/newmail_notifier/localization/nl_NL.inc b/plugins/newmail_notifier/localization/nl_NL.inc
index e18a6ff..01f97e4 100644
--- a/plugins/newmail_notifier/localization/nl_NL.inc
+++ b/plugins/newmail_notifier/localization/nl_NL.inc
@@ -16,14 +16,14 @@
  For translation see https://www.transifex.com/projects/p/roundcube-webmail/resource/plugin-newmail_notifier/
 */
 
-$labels['basic'] = 'Toon browsermelding bij nieuw bericht';
-$labels['desktop'] = 'Toon desktopmelding bij nieuw bericht';
-$labels['sound'] = 'Speel geluid bij nieuw bericht';
+$labels['basic'] = 'Toon melding in browser bij nieuw bericht';
+$labels['desktop'] = 'Toon melding op bureaublad bij nieuw bericht';
+$labels['sound'] = 'Geluid afspelen bij nieuw bericht';
 $labels['test'] = 'Test';
 $labels['title'] = 'Nieuwe e-mail!';
 $labels['body'] = 'U heeft een nieuw bericht ontvangen.';
 $labels['testbody'] = 'Dit is een testmelding.';
-$labels['desktopdisabled'] = 'Desktopmeldingen zijn uitgeschakeld in uw browser.';
-$labels['desktopunsupported'] = 'Uw browser ondersteunt geen desktopmeldingen.';
+$labels['desktopdisabled'] = 'Bureaubladmeldingen zijn uitgeschakeld in uw browser.';
+$labels['desktopunsupported'] = 'Uw browser ondersteunt geen bureaubladmeldingen.';
 
 ?>
diff --git a/plugins/newmail_notifier/localization/ro_RO.inc b/plugins/newmail_notifier/localization/ro_RO.inc
index c78c7e0..b27e506 100644
--- a/plugins/newmail_notifier/localization/ro_RO.inc
+++ b/plugins/newmail_notifier/localization/ro_RO.inc
@@ -19,11 +19,11 @@
 $labels['basic'] = 'Afişează notificări în browser la mesaj nou.';
 $labels['desktop'] = 'Afişează notificări desktop la mesaj nou.';
 $labels['sound'] = 'Redă un sunet la mesaj nou.';
-$labels['test'] = 'Test';
+$labels['test'] = 'Testează';
 $labels['title'] = 'E-mail nou!';
 $labels['body'] = 'Ai primit un mesaj nou.';
 $labels['testbody'] = 'Aceasta este o notificare de test.';
 $labels['desktopdisabled'] = 'Notificările desktop sunt dezactivate în browser.';
-$labels['desktopunsupported'] = 'Browser-ul nu suportă notificări desktop.';
+$labels['desktopunsupported'] = 'Browser-ul dumneavoastră nu suportă notificări desktop.';
 
 ?>
diff --git a/plugins/password/drivers/pam.php b/plugins/password/drivers/pam.php
index 20524d9..15a802c 100644
--- a/plugins/password/drivers/pam.php
+++ b/plugins/password/drivers/pam.php
@@ -11,7 +11,8 @@ class rcube_pam_password
 {
     function save($currpass, $newpass)
     {
-        $user = $_SESSION['username'];
+        $user  = $_SESSION['username'];
+        $error = '';
 
         if (extension_loaded('pam') || extension_loaded('pam_auth')) {
             if (pam_auth($user, $currpass, $error, false)) {
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php
index b08833d..8c8dc87 100644
--- a/plugins/password/drivers/sql.php
+++ b/plugins/password/drivers/sql.php
@@ -183,7 +183,7 @@ class rcube_sql_password
         $res = $db->query($sql, $sql_vars);
 
         if (!$db->is_error()) {
-            if (strtolower(substr(trim($query),0,6))=='select') {
+            if (strtolower(substr(trim($sql),0,6)) == 'select') {
                 if ($result = $db->fetch_array($res))
                     return PASSWORD_SUCCESS;
             } else {
diff --git a/plugins/password/localization/nl_NL.inc b/plugins/password/localization/nl_NL.inc
index c2c4599..e5b6346 100644
--- a/plugins/password/localization/nl_NL.inc
+++ b/plugins/password/localization/nl_NL.inc
@@ -17,21 +17,21 @@
 */
 
 $labels = array();
-$labels['changepasswd']  = 'Wijzig Wachtwoord';
-$labels['curpasswd']  = 'Huidig Wachtwoord:';
-$labels['newpasswd']  = 'Nieuw Wachtwoord:';
-$labels['confpasswd']  = 'Bevestig Nieuw Wachtwoord:';
+$labels['changepasswd']  = 'Wachtwoord wijzigen';
+$labels['curpasswd']  = 'Huidig wachtwoord:';
+$labels['newpasswd']  = 'Nieuw wachtwoord:';
+$labels['confpasswd']  = 'Bevestig nieuw wachtwoord:';
 
 $messages = array();
-$messages['nopassword'] = 'Vul een wachtwoord in.';
-$messages['nocurpassword'] = 'vul het huidige wachtwoord in.';
+$messages['nopassword'] = 'Vul uw nieuwe wachtwoord in.';
+$messages['nocurpassword'] = 'Vul uw huidige wachtwoord in.';
 $messages['passwordincorrect'] = 'Huidig wachtwoord is onjuist.';
 $messages['passwordinconsistency'] = 'Wachtwoorden komen niet overeen, probeer het opnieuw.';
-$messages['crypterror'] = 'De server mist een functie om uw wachtwoord et beveiligen.';
-$messages['connecterror'] = 'Kan het nieuwe wachtwoord niet opslaan. Verbindingsfout.';
-$messages['internalerror'] = 'Uw wachtwoord kan niet worden opgeslagen.';
+$messages['crypterror'] = 'Nieuwe wachtwoord kan niet opgeslagen worden; de server mist een versleutelfunctie.';
+$messages['connecterror'] = 'Nieuwe wachtwoord kan niet opgeslagen worden; verbindingsfout.';
+$messages['internalerror'] = 'Uw nieuwe wachtwoord kan niet worden opgeslagen.';
 $messages['passwordshort'] = 'Het wachtwoord moet minimaal $length tekens lang zijn.';
-$messages['passwordweak'] = 'Het wachtwoord moet minimaal één nummer en één leesteken bevatten.';
+$messages['passwordweak'] = 'Het wachtwoord moet minimaal één cijfer en één leesteken bevatten.';
 $messages['passwordforbidden'] = 'Het wachtwoord bevat tekens die niet toegestaan zijn.';
 
 ?>
diff --git a/plugins/password/localization/ro_RO.inc b/plugins/password/localization/ro_RO.inc
index 7406efb..17ec31c 100644
--- a/plugins/password/localization/ro_RO.inc
+++ b/plugins/password/localization/ro_RO.inc
@@ -20,18 +20,18 @@ $labels = array();
 $labels['changepasswd']  = 'Schimbați parola';
 $labels['curpasswd']  = 'Parola curentă:';
 $labels['newpasswd']  = 'Parola nouă:';
-$labels['confpasswd']  = 'Confirmați parola nouă:';
+$labels['confpasswd']  = 'Confirmare parola nouă:';
 
 $messages = array();
 $messages['nopassword'] = 'Te rog să introduci noua parolă.';
 $messages['nocurpassword'] = 'Te rog să introduci parola curentă';
 $messages['passwordincorrect'] = 'Parola curentă este incorectă.';
-$messages['passwordinconsistency'] = 'Parolele nu se potrivesc, vă rugăm să mai încercați';
-$messages['crypterror'] = 'Nu am reușit să salvez noua parolă. Lipsa funcției de criptare.';
+$messages['passwordinconsistency'] = 'Parolele nu se potrivesc, te rog să mai încerci';
+$messages['crypterror'] = 'Nu am reușit să salvez noua parolă. Funcția de criptare lipsește.';
 $messages['connecterror'] = 'Nu am reușit să salvez noua parolă. Eroare connexiune.';
 $messages['internalerror'] = 'Nu am reușit să salvez noua parolă.';
-$messages['passwordshort'] = 'Parola trebuie să aibă $length caractere.';
-$messages['passwordweak'] = 'Parola trebuie să conțina cel puțin un număr si un semn de punctuație';
+$messages['passwordshort'] = 'Parola trebuie să aibă minim $length caractere.';
+$messages['passwordweak'] = 'Parola trebuie să conțina cel puțin un număr si un semn de punctuație.';
 $messages['passwordforbidden'] = 'Parola conține caractere nepermise.';
 
 ?>
diff --git a/plugins/password/localization/zh_CN.inc b/plugins/password/localization/zh_CN.inc
index 5a15635..5d14926 100644
--- a/plugins/password/localization/zh_CN.inc
+++ b/plugins/password/localization/zh_CN.inc
@@ -24,13 +24,13 @@ $labels['confpasswd']  = '确认新密码:';
 
 $messages = array();
 $messages['nopassword'] = '请输入新密码。';
-$messages['nocurpassword'] = '请输入正确的密码。';
+$messages['nocurpassword'] = '请输入当前的密码。';
 $messages['passwordincorrect'] = '当前密码不正确。';
 $messages['passwordinconsistency'] = '两次输入的密码不一致,请重试。';
-$messages['crypterror'] = '无法保存新密码,因为加密功能不可用。';
-$messages['connecterror'] = '无法保存新密码,因为连接出错。';
+$messages['crypterror'] = '无法保存新密码,缺少加密功能。';
+$messages['connecterror'] = '无法保存新密码,连接出错。';
 $messages['internalerror'] = '无法保存新密码。';
-$messages['passwordshort'] = '密码必须至少为 $length 位。';
+$messages['passwordshort'] = '密码至少为 $length 位。';
 $messages['passwordweak'] = '密码必须至少包含一个数字和一个标点符号。';
 $messages['passwordforbidden'] = '密码包含禁止使用的字符。';
 
diff --git a/plugins/userinfo/localization/nl_NL.inc b/plugins/userinfo/localization/nl_NL.inc
index 8c636e7..8c46ca6 100644
--- a/plugins/userinfo/localization/nl_NL.inc
+++ b/plugins/userinfo/localization/nl_NL.inc
@@ -19,7 +19,7 @@
 $labels = array();
 $labels['userinfo'] = 'Gebruikersinformatie';
 $labels['created'] = 'Aangemaakt';
-$labels['lastlogin'] = 'Laatste login';
+$labels['lastlogin'] = 'Laatste aanmelding';
 $labels['defaultidentity'] = 'Standaardidentiteit';
 
 ?>
\ No newline at end of file
diff --git a/plugins/userinfo/localization/ro_RO.inc b/plugins/userinfo/localization/ro_RO.inc
index 25c4d10..2f96f84 100755
--- a/plugins/userinfo/localization/ro_RO.inc
+++ b/plugins/userinfo/localization/ro_RO.inc
@@ -17,9 +17,9 @@
 */
 
 $labels = array();
-$labels['userinfo'] = 'Informatii utilisator';
-$labels['created'] = 'Data creatiei';
-$labels['lastlogin'] = 'Ultima conectare';
-$labels['defaultidentity'] = 'Identitate principala';
+$labels['userinfo'] = 'Informații utilizator';
+$labels['created'] = 'Data creării';
+$labels['lastlogin'] = 'Ultima autentificare';
+$labels['defaultidentity'] = 'Identitate principală';
 
 ?>
\ No newline at end of file
diff --git a/plugins/userinfo/localization/zh_CN.inc b/plugins/userinfo/localization/zh_CN.inc
index 265c070..2b06ab2 100644
--- a/plugins/userinfo/localization/zh_CN.inc
+++ b/plugins/userinfo/localization/zh_CN.inc
@@ -18,8 +18,8 @@
 
 $labels = array();
 $labels['userinfo'] = '用户信息';
-$labels['created'] = '创建';
-$labels['lastlogin'] = '最后登录';
+$labels['created'] = '创建于';
+$labels['lastlogin'] = '最近登录';
 $labels['defaultidentity'] = '默认身份';
 
 ?>
\ No newline at end of file
diff --git a/plugins/vcard_attachments/localization/zh_CN.inc b/plugins/vcard_attachments/localization/zh_CN.inc
index 6deb21d..5ff81a8 100644
--- a/plugins/vcard_attachments/localization/zh_CN.inc
+++ b/plugins/vcard_attachments/localization/zh_CN.inc
@@ -17,7 +17,7 @@
 */
 
 $labels = array();
-$labels['addvcardmsg'] = '添加 vCard 到地址簿中';
+$labels['addvcardmsg'] = '添加 vCard 至地址簿中';
 $labels['vcardsavefailed'] = '无法保存 vCard';
 
 ?>
\ No newline at end of file
diff --git a/plugins/virtuser_query/virtuser_query.php b/plugins/virtuser_query/virtuser_query.php
index 073b4e2..a4c8326 100644
--- a/plugins/virtuser_query/virtuser_query.php
+++ b/plugins/virtuser_query/virtuser_query.php
@@ -28,8 +28,8 @@ class virtuser_query extends rcube_plugin
 
     function init()
     {
-	    $this->app = rcmail::get_instance();
-	    $this->config = $this->app->config->get('virtuser_query');
+        $this->app = rcmail::get_instance();
+        $this->config = $this->app->config->get('virtuser_query');
 
         if (!empty($this->config)) {
             if (is_string($this->config)) {
@@ -53,35 +53,36 @@ class virtuser_query extends rcube_plugin
      */
     function user2email($p)
     {
-	    $dbh = $this->app->get_dbh();
-
-	    $sql_result = $dbh->query(preg_replace('/%u/', $dbh->escapeSimple($p['user']), $this->config['email']));
-
-	    while ($sql_arr = $dbh->fetch_array($sql_result)) {
-	        if (strpos($sql_arr[0], '@')) {
-		        if ($p['extended'] && count($sql_arr) > 1) {
-		            $result[] = array(
-			            'email' 	    => rcube_idn_to_ascii($sql_arr[0]),
-            			'name' 		    => $sql_arr[1],
-			            'organization'  => $sql_arr[2],
-            			'reply-to' 	    => rcube_idn_to_ascii($sql_arr[3]),
-			            'bcc' 		    => rcube_idn_to_ascii($sql_arr[4]),
-        			    'signature' 	=> $sql_arr[5],
-		            	'html_signature' => (int)$sql_arr[6],
-    		        );
-		        }
-		        else {
-		            $result[] = $sql_arr[0];
-		        }
-
-		        if ($p['first'])
-		            break;
-	        }
-	    }
-
-	    $p['email'] = $result;
-
-	    return $p;
+        $dbh = $this->app->get_dbh();
+
+        $sql_result = $dbh->query(preg_replace('/%u/', $dbh->escape($p['user']), $this->config['email']));
+
+        while ($sql_arr = $dbh->fetch_array($sql_result)) {
+            if (strpos($sql_arr[0], '@')) {
+                if ($p['extended'] && count($sql_arr) > 1) {
+                    $result[] = array(
+                        'email'         => rcube_idn_to_ascii($sql_arr[0]),
+                        'name'          => $sql_arr[1],
+                        'organization'  => $sql_arr[2],
+                        'reply-to'      => rcube_idn_to_ascii($sql_arr[3]),
+                        'bcc'           => rcube_idn_to_ascii($sql_arr[4]),
+                        'signature'     => $sql_arr[5],
+                        'html_signature' => (int)$sql_arr[6],
+                    );
+                }
+                else {
+                    $result[] = $sql_arr[0];
+                }
+
+                if ($p['first']) {
+                    break;
+                }
+            }
+        }
+
+        $p['email'] = $result;
+
+        return $p;
     }
 
     /**
@@ -91,7 +92,7 @@ class virtuser_query extends rcube_plugin
     {
         $dbh = $this->app->get_dbh();
 
-        $sql_result = $dbh->query(preg_replace('/%m/', $dbh->escapeSimple($p['email']), $this->config['user']));
+        $sql_result = $dbh->query(preg_replace('/%m/', $dbh->escape($p['email']), $this->config['user']));
 
         if ($sql_arr = $dbh->fetch_array($sql_result)) {
             $p['user'] = $sql_arr[0];
@@ -107,7 +108,7 @@ class virtuser_query extends rcube_plugin
     {
         $dbh = $this->app->get_dbh();
 
-        $sql_result = $dbh->query(preg_replace('/%u/', $dbh->escapeSimple($p['user']), $this->config['host']));
+        $sql_result = $dbh->query(preg_replace('/%u/', $dbh->escape($p['user']), $this->config['host']));
 
         if ($sql_arr = $dbh->fetch_array($sql_result)) {
             $p['host'] = $sql_arr[0];
diff --git a/plugins/zipdownload/localization/ro_RO.inc b/plugins/zipdownload/localization/ro_RO.inc
index 7cba54d..ac4a983 100644
--- a/plugins/zipdownload/localization/ro_RO.inc
+++ b/plugins/zipdownload/localization/ro_RO.inc
@@ -17,7 +17,7 @@
 */
 
 $labels = array();
-$labels['downloadall'] = 'Descarca toate atasamentele.';
-$labels['downloadfolder'] = 'Dosar de descărcare';
+$labels['downloadall'] = 'Descarcă toate atașamentele';
+$labels['downloadfolder'] = 'Descarcă dosar';
 
 ?>
\ No newline at end of file
diff --git a/plugins/zipdownload/zipdownload.php b/plugins/zipdownload/zipdownload.php
index de58881..443fef7 100644
--- a/plugins/zipdownload/zipdownload.php
+++ b/plugins/zipdownload/zipdownload.php
@@ -105,7 +105,7 @@ class zipdownload extends rcube_plugin
 		foreach ($message->attachments as $part) {
 			$pid = $part->mime_id;
 			$part = $message->mime_parts[$pid];
-			$disp_name = $this->_convert_filename($part->filename, $part->charset);
+			$disp_name = $this->_convert_filename($part->filename);
 
 			if ($part->body) {
 				$orig_message_raw = $part->body;
@@ -258,9 +258,9 @@ class zipdownload extends rcube_plugin
 	/**
 	 * Helper function to convert filenames to the configured charset
 	 */
-	private function _convert_filename($str, $from = RCMAIL_CHARSET)
+	private function _convert_filename($str)
 	{
-        $str = rcube_charset::convert($str, $from == '' ? RCUBE_CHARSET : $from, $this->charset);
+        $str = rcube_charset::convert($str, RCUBE_CHARSET, $this->charset);
 
 		return strtr($str, array(':'=>'', '/'=>'-'));
 	}
diff --git a/program/include/bc.php b/program/include/bc.php
index 3d9d462..af2e512 100644
--- a/program/include/bc.php
+++ b/program/include/bc.php
@@ -287,7 +287,7 @@ function rcmail_remote_ip()
 
 function rcube_check_referer()
 {
-    return rcmail::check_referer();
+    return rcube_utils::check_referer();
 }
 
 function rcube_timer()
diff --git a/program/include/iniset.php b/program/include/iniset.php
index c2efe01..28a2b76 100644
--- a/program/include/iniset.php
+++ b/program/include/iniset.php
@@ -21,24 +21,9 @@
 */
 
 // application constants
-define('RCMAIL_VERSION', '0.9.0');
+define('RCMAIL_VERSION', '0.9.2');
 define('RCMAIL_START', microtime(true));
 
-$config = array(
-    // Some users are not using Installer, so we'll check some
-    // critical PHP settings here. Only these, which doesn't provide
-    // an error/warning in the logs later. See (#1486307).
-    'suhosin.session.encrypt' => 0,
-    'session.auto_start'      => 0,
-    'file_uploads'            => 1,
-);
-foreach ($config as $optname => $optval) {
-    if ($optval != ini_get($optname) && @ini_set($optname, $optval) === false) {
-        die("ERROR: Wrong '$optname' option value and it wasn't possible to set it to required value ($optval).\n"
-            ."Check your PHP configuration (including php_admin_flag).");
-    }
-}
-
 if (!defined('INSTALL_PATH')) {
     define('INSTALL_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');
 }
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 249bd05..19a89b8 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -98,7 +98,10 @@ class rcmail extends rcube
 
     // reset some session parameters when changing task
     if ($this->task != 'utils') {
-      if ($this->session && $_SESSION['task'] != $this->task)
+      // we reset list page when switching to another task
+      // but only to the main task interface - empty action (#1489076)
+      // this will prevent from unintentional page reset on cross-task requests
+      if ($this->session && $_SESSION['task'] != $this->task && empty($this->action))
         $this->session->remove('page');
       // set current task to session
       $_SESSION['task'] = $this->task;
@@ -225,6 +228,11 @@ class rcmail extends rcube
     }
 
     if (!$contacts) {
+      // there's no default, just return
+      if ($default) {
+        return null;
+      }
+
       self::raise_error(array(
         'code' => 700, 'type' => 'php',
         'file' => __FILE__, 'line' => __LINE__,
diff --git a/program/js/app.js b/program/js/app.js
index 01ff5a9..a22db5e 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1,5 +1,5 @@
 function rcube_webmail(){this.labels={};this.buttons={};this.buttons_sel={};this.gui_objects={};this.gui_containers={};this.commands={};this.command_handlers={};this.onloads=[];this.messages={};this.group2expand={};this.dblclick_time=500;this.message_time=4E3;this.identifier_expr=RegExp("[^0-9a-z-_]","gi");this.env={request_timeout:180,draft_autosave:0,comm_path:"./",blankpage:"program/resources/blank.gif",recipients_separator:",",recipients_delimiter:", "};this.ref="rcmail";var l=this;$.ajaxSetup({cache:!1,
-timeout:1E3*this.env.request_timeout,error:function(a,b,d){l.http_error(a,b,d)},beforeSend:function(a){a.setRequestHeader("X-Roundcube-Request",l.env.request_token)}});$(window).bind("beforeunload",function(){rcmail.unload=!0});this.set_env=function(a,b){if(null!=a&&"object"===typeof a&&!b)for(var d in a)this.env[d]=a[d];else this.env[a]=b};this.add_label=function(a,b){"string"==typeof a?this.labels[a]=b:"object"==typeof a&&$.extend(this.labels,a)};this.register_button=function(a,b,d,e,f,g){b={id:b,
+timeout:1E3*this.env.request_timeout,error:function(a,b,d){l.http_error(a,b,d)},beforeSend:function(a){a.setRequestHeader("X-Roundcube-Request",l.env.request_token)}});$(window).bind("beforeunload",function(){rcmail.unload=!0});this.set_env=function(a,b){if(null==a||"object"!==typeof a||b)this.env[a]=b;else for(var d in a)this.env[d]=a[d]};this.add_label=function(a,b){"string"==typeof a?this.labels[a]=b:"object"==typeof a&&$.extend(this.labels,a)};this.register_button=function(a,b,d,e,f,g){b={id:b,
 type:d};e&&(b.act=e);f&&(b.sel=f);g&&(b.over=g);this.buttons[a]||(this.buttons[a]=[]);this.buttons[a].push(b);this.loaded&&v(a,b)};this.gui_object=function(a,b){this.gui_objects[a]=this.loaded?rcube_find_object(b):b};this.gui_container=function(a,b){this.gui_containers[a]=b};this.add_element=function(a,b){this.gui_containers[b]&&this.gui_containers[b].jquery&&this.gui_containers[b].append(a)};this.register_command=function(a,b,d){this.command_handlers[a]=b;d&&this.enable_command(a,!0)};this.add_onload=
 function(a){this.onloads.push(a)};this.init=function(){var a,b=this;this.task=this.env.task;if(!bw.dom||!bw.xmlhttp_test()||bw.mz&&1.9>bw.vendver)this.goto_url("error","_code=0x199");else{for(a in this.gui_containers)this.gui_containers[a]=$("#"+this.gui_containers[a]);for(a in this.gui_objects)this.gui_objects[a]=rcube_find_object(this.gui_objects[a]);if(this.env.x_frame_options)try{if("deny"==this.env.x_frame_options&&top.location.href!=self.location.href)top.location.href=self.location.href;else if(top.location.hostname!=
 self.location.hostname)throw 1;}catch(d){$("form").each(function(){l.lock_form(this,!0)});this.display_message("Blocked: possible clickjacking attack!","error");return}this.init_buttons();this.is_framed()&&(parent.rcmail.set_busy(!1,null,parent.rcmail.env.frame_lock),parent.rcmail.env.frame_lock=null);this.enable_command("close","logout","mail","addressbook","settings","save-pref","compose","undo","about","switch-task",!0);this.env.permaurl&&this.enable_command("permaurl","extwin",!0);switch(this.task){case "mail":this.enable_command("list",
@@ -10,30 +10,30 @@ rcmail.message_list.blur()}));this.set_button_titles();this.env.message_commands
 _mbox:this.env.mailbox,_search:this.env.search_request},this.display_message("","loading")),this.env.blockedobjects&&(this.gui_objects.remoteobjectsmsg&&(this.gui_objects.remoteobjectsmsg.style.display="block"),this.enable_command("load-images","always-load",!0)),"preview"==this.env.action&&this.is_framed()&&(this.enable_command("compose","add-contact",!1),parent.rcmail.show_contentframe(!0))):"compose"==this.env.action?(this.env.compose_commands="send-attachment remove-attachment send cancel toggle-editor list-adresses search reset-search extwin".split(" "),
 this.env.drafts_mailbox&&this.env.compose_commands.push("savedraft"),this.enable_command(this.env.compose_commands,"identities",!0),$.merge(this.env.compose_commands,["add-recipient","firstpage","previouspage","nextpage","lastpage"]),this.env.spellcheck&&(this.env.spellcheck.spelling_state_observer=function(a){l.spellcheck_state()},this.env.compose_commands.push("spellcheck"),this.enable_command("spellcheck",!0)),document.onmouseup=function(a){return b.doc_mouse_up(a)},this.init_messageform()):"print"==
 this.env.action&&this.env.uid&&(bw.safari?setTimeout("window.print()",10):window.print());this.gui_objects.mailboxlist&&(this.env.unread_counts={},this.gui_objects.folderlist=this.gui_objects.mailboxlist,this.http_request("getunread"));this.gui_objects.contactslist&&(this.contact_list=new rcube_list_widget(this.gui_objects.contactslist,{multiselect:!0,draggable:!1,keyboard:!1}),this.contact_list.addEventListener("select",function(a){l.compose_recipient_select(a)}),this.contact_list.addEventListener("dblclick",
-function(a){l.compose_add_recipient("to")}),this.contact_list.init());this.gui_objects.addressbookslist&&(this.gui_objects.folderlist=this.gui_objects.addressbookslist,this.enable_command("list-adresses",!0));if(this.env.mdn_request&&this.env.uid){a="sendmdn";var e={_uid:this.env.uid,_mbox:this.env.mailbox};confirm(this.get_label("mdnrequest"))||(e._flag="mdnsent",a="mark");this.http_post(a,e)}!this.is_framed()&&!this.env.extwin&&this.browser_capabilities_check();break;case "addressbook":this.gui_objects.folderlist&&
+function(a){l.compose_add_recipient("to")}),this.contact_list.init());this.gui_objects.addressbookslist&&(this.gui_objects.folderlist=this.gui_objects.addressbookslist,this.enable_command("list-adresses",!0));if(this.env.mdn_request&&this.env.uid){a="sendmdn";var e={_uid:this.env.uid,_mbox:this.env.mailbox};confirm(this.get_label("mdnrequest"))||(e._flag="mdnsent",a="mark");this.http_post(a,e)}this.is_framed()||this.env.extwin||this.browser_capabilities_check();break;case "addressbook":this.gui_objects.folderlist&&
 (this.env.contactfolders=$.extend($.extend({},this.env.address_sources),this.env.contactgroups));this.enable_command("add","import",this.env.writable_source);this.enable_command("list","listgroup","listsearch","advanced-search",!0);this.gui_objects.contactslist&&(this.contact_list=new rcube_list_widget(this.gui_objects.contactslist,{multiselect:!0,draggable:this.gui_objects.folderlist?!0:!1,keyboard:!0}),this.contact_list.row_init=function(a){b.triggerEvent("insertrow",{cid:a.uid,row:a})},this.contact_list.addEventListener("keypress",
 function(a){b.contactlist_keypress(a)}),this.contact_list.addEventListener("select",function(a){b.contactlist_select(a)}),this.contact_list.addEventListener("dragstart",function(a){b.drag_start(a)}),this.contact_list.addEventListener("dragmove",function(a){b.drag_move(a)}),this.contact_list.addEventListener("dragend",function(a){b.drag_end(a)}),this.contact_list.init(),this.env.cid&&this.contact_list.highlight_row(this.env.cid),this.gui_objects.contactslist.parentNode.onmousedown=function(a){return b.click_on_list(a)},
 document.onmouseup=function(a){return b.doc_mouse_up(a)},this.gui_objects.qsearchbox&&$(this.gui_objects.qsearchbox).focusin(function(){rcmail.contact_list.blur()}),this.update_group_commands(),this.command("list"));this.set_page_buttons();this.env.cid&&(this.enable_command("show","edit",!0),this.gui_objects.editform&&$("input.groupmember").change(function(){l.group_member_change(this.checked?"add":"del",l.env.cid,l.env.source,this.value)}));this.gui_objects.editform&&(this.enable_command("save",
-!0),("add"==this.env.action||"edit"==this.env.action||"search"==this.env.action)&&this.init_contact_form());this.gui_objects.qsearchbox&&this.enable_command("search","reset-search","moveto",!0);break;case "settings":this.enable_command("preferences","identities","save","folders",!0);"identities"==this.env.action?this.enable_command("add",2>this.env.identities_level):"edit-identity"==this.env.action||"add-identity"==this.env.action?(this.enable_command("save","edit","toggle-editor",!0),this.enable_command("delete",
+!0),"add"!=this.env.action&&"edit"!=this.env.action&&"search"!=this.env.action||this.init_contact_form());this.gui_objects.qsearchbox&&this.enable_command("search","reset-search","moveto",!0);break;case "settings":this.enable_command("preferences","identities","save","folders",!0);"identities"==this.env.action?this.enable_command("add",2>this.env.identities_level):"edit-identity"==this.env.action||"add-identity"==this.env.action?(this.enable_command("save","edit","toggle-editor",!0),this.enable_command("delete",
 2>this.env.identities_level),"add-identity"==this.env.action&&$("input[type='text']").first().select()):"folders"==this.env.action?this.enable_command("subscribe","unsubscribe","create-folder","rename-folder",!0):"edit-folder"==this.env.action&&this.gui_objects.editform&&(this.enable_command("save","folder-size",!0),parent.rcmail.env.messagecount=this.env.messagecount,parent.rcmail.enable_command("purge",this.env.messagecount),$("input[type='text']").first().select());this.gui_objects.identitieslist?
 (this.identity_list=new rcube_list_widget(this.gui_objects.identitieslist,{multiselect:!1,draggable:!1,keyboard:!1}),this.identity_list.addEventListener("select",function(a){b.identity_select(a)}),this.identity_list.init(),this.identity_list.focus(),this.env.iid&&this.identity_list.highlight_row(this.env.iid)):this.gui_objects.sectionslist?(this.sections_list=new rcube_list_widget(this.gui_objects.sectionslist,{multiselect:!1,draggable:!1,keyboard:!1}),this.sections_list.addEventListener("select",
 function(a){b.section_select(a)}),this.sections_list.init(),this.sections_list.focus()):this.gui_objects.subscriptionlist&&this.init_subscription_list();break;case "login":a=$("#rcmloginuser"),a.bind("keyup",function(a){return rcmail.login_user_keyup(a)}),""==a.val()?a.focus():$("#rcmloginpwd").focus(),window.jstz&&!bw.ie6?(a=jstz.determine(),a.name()&&$("#rcmlogintz").val(a.name())):$("#rcmlogintz").val((new Date).getStdTimezoneOffset()/-60),$("form").submit(function(){$("input[type=submit]",this).prop("disabled",
 !0);rcmail.clear_messages();rcmail.display_message("","loading")}),this.enable_command("login",!0)}this.env.contentframe&&!$("#"+this.env.contentframe).is(":visible")&&(this.env.contentframe=null);bw.ie&&$("input[type=file]").keydown(function(a){"13"==a.keyCode&&a.preventDefault()});this.loaded=!0;this.pending_message&&this.display_message(this.pending_message[0],this.pending_message[1],this.pending_message[2]);this.gui_objects.folderlist&&(this.gui_containers.foldertray=$(this.gui_objects.folderlist));
-if(this.gui_objects.filedrop&&this.env.filedrop&&(window.XMLHttpRequest&&XMLHttpRequest.prototype&&XMLHttpRequest.prototype.sendAsBinary||window.FormData))$(document.body).bind("dragover dragleave drop",function(a){return l.document_drag_hover(a,"dragover"==a.type)}),$(this.gui_objects.filedrop).addClass("droptarget").bind("dragover dragleave",function(a){return l.file_drag_hover(a,"dragover"==a.type)}).get(0).addEventListener("drop",function(a){return l.file_dropped(a)},!1);this.triggerEvent("init",
+this.gui_objects.filedrop&&(this.env.filedrop&&(window.XMLHttpRequest&&XMLHttpRequest.prototype&&XMLHttpRequest.prototype.sendAsBinary||window.FormData))&&($(document.body).bind("dragover dragleave drop",function(a){return l.document_drag_hover(a,"dragover"==a.type)}),$(this.gui_objects.filedrop).addClass("droptarget").bind("dragover dragleave",function(a){return l.file_drag_hover(a,"dragover"==a.type)}).get(0).addEventListener("drop",function(a){return l.file_dropped(a)},!1));this.triggerEvent("init",
 {task:this.task,action:this.env.action});for(var f in this.onloads)if("string"===typeof this.onloads[f])eval(this.onloads[f]);else if("function"===typeof this.onloads[f])this.onloads[f]();this.start_refresh();this.start_keepalive()}};this.log=function(a){window.console&&console.log&&console.log(a)};this.command=function(a,b,d,e){var f,g,h,k;d&&d.blur&&d.blur();if(this.busy)return!1;if(d&&(d.href&&0>String(d.href).indexOf("#"))&&rcube_event.get_modifier(e))return!0;if(!this.commands[a])return this.is_framed()&&
 parent.rcmail.command(a,b),!1;if("mail"==this.task&&"compose"==this.env.action&&0>$.inArray(a,this.env.compose_commands)&&this.cmp_hash!=this.compose_field_hash()&&!confirm(this.get_label("notsentwarning")))return!1;if("function"===typeof this.command_handlers[a])return f=this.command_handlers[a](b,d),void 0!==f?f:d?!1:!0;if("string"===typeof this.command_handlers[a])return f=window[this.command_handlers[a]](b,d),void 0!==f?f:d?!1:!0;this.triggerEvent("actionbefore",{props:b,action:a});f=this.triggerEvent("before"+
 a,b);if(void 0!==f){if(!1===f)return!1;b=f}f=void 0;switch(a){case "login":this.gui_objects.loginform&&this.gui_objects.loginform.submit();break;case "mail":case "addressbook":case "settings":case "logout":this.switch_task(a);break;case "about":this.redirect("?_task=settings&_action=about",!1);break;case "permaurl":if(d&&d.href&&d.target)return!0;this.env.permaurl&&(parent.location.href=this.env.permaurl);break;case "extwin":"compose"==this.env.action?($("input[name='_action']",this.gui_objects.messageform).val("compose"),
-this.gui_objects.messageform.action=this.url("mail/compose",{_id:this.env.compose_id,_extwin:1}),this.gui_objects.messageform.target=this.open_window("",1100,900),this.gui_objects.messageform.submit()):this.open_window(this.env.permaurl,900,900);break;case "menu-open":case "menu-save":return this.triggerEvent(a,{props:b}),!1;case "open":if(g=this.get_single_uid())return d.href=this.url("show",{_mbox:this.env.mailbox,_uid:g}),!0;break;case "close":this.env.extwin&&window.close();break;case "list":b&&
-""!=b&&this.reset_qsearch();"compose"==this.env.action&&this.env.extwin?window.close():"mail"==this.task?(this.list_mailbox(b),this.set_button_titles()):"addressbook"==this.task&&this.list_contacts(b);break;case "sort":k=this.env.sort_order;g=!this.env.disabled_sort_col?b:this.env.sort_col;this.env.disabled_sort_order||(k=this.env.sort_col==g&&"ASC"==k?"DESC":"ASC");this.set_list_sorting(g,k);this.list_mailbox("","",g+"_"+k);break;case "nextpage":this.list_page("next");break;case "lastpage":this.list_page("last");
-break;case "previouspage":this.list_page("prev");break;case "firstpage":this.list_page("first");break;case "expunge":this.env.exists&&this.expunge_mailbox(this.env.mailbox);break;case "purge":case "empty-mailbox":this.env.exists&&this.purge_mailbox(this.env.mailbox);break;case "show":if("mail"==this.task){if((g=this.get_single_uid())&&(!this.env.uid||g!=this.env.uid))this.env.mailbox==this.env.drafts_mailbox?this.open_compose_step({_draft_uid:g,_mbox:this.env.mailbox}):this.show_message(g)}else"addressbook"==
-this.task&&(h=b?b:this.get_single_cid())&&!("show"==this.env.action&&h==this.env.cid)&&this.load_contact(h,"show");break;case "add":"addressbook"==this.task?this.load_contact(0,"add"):"settings"==this.task&&(this.identity_list.clear_selection(),this.load_identity(0,"add-identity"));break;case "edit":if("addressbook"==this.task&&(h=this.get_single_cid()))this.load_contact(h,"edit");else if("settings"==this.task&&b)this.load_identity(b,"edit-identity");else if("mail"==this.task&&(h=this.get_single_uid()))k=
-{_mbox:this.env.mailbox},k[this.env.mailbox==this.env.drafts_mailbox&&"new"!=b?"_draft_uid":"_uid"]=h,this.open_compose_step(k);break;case "save":var p;if(k=this.gui_objects.editform){if("search"!=this.env.action)if((p=$("input[name='_pagesize']",k))&&p.length&&isNaN(parseInt(p.val()))){alert(this.get_label("nopagesizewarning"));p.focus();break}else{if("reload"==b)k.action+="?_reload=1";else if("settings"==this.task&&0==this.env.identities_level%2&&(p=$("input[name='_email']",k))&&p.length&&!rcube_check_email(p.val())){alert(this.get_label("noemailwarning"));
+this.gui_objects.messageform.action=this.url("mail/compose",{_id:this.env.compose_id,_extwin:1}),this.gui_objects.messageform.target=this.open_window("",1100),this.gui_objects.messageform.submit()):this.open_window(this.env.permaurl,900);break;case "menu-open":case "menu-save":return this.triggerEvent(a,{props:b}),!1;case "open":if(g=this.get_single_uid())return d.href=this.url("show",{_mbox:this.env.mailbox,_uid:g}),!0;break;case "close":this.env.extwin&&window.close();break;case "list":b&&""!=b&&
+this.reset_qsearch();"compose"==this.env.action&&this.env.extwin?window.close():"mail"==this.task?(this.list_mailbox(b),this.set_button_titles()):"addressbook"==this.task&&this.list_contacts(b);break;case "sort":k=this.env.sort_order;g=this.env.disabled_sort_col?this.env.sort_col:b;this.env.disabled_sort_order||(k=this.env.sort_col==g&&"ASC"==k?"DESC":"ASC");this.set_list_sorting(g,k);this.list_mailbox("","",g+"_"+k);break;case "nextpage":this.list_page("next");break;case "lastpage":this.list_page("last");
+break;case "previouspage":this.list_page("prev");break;case "firstpage":this.list_page("first");break;case "expunge":this.env.exists&&this.expunge_mailbox(this.env.mailbox);break;case "purge":case "empty-mailbox":this.env.exists&&this.purge_mailbox(this.env.mailbox);break;case "show":"mail"==this.task?(g=this.get_single_uid(),!g||this.env.uid&&g==this.env.uid||(this.env.mailbox==this.env.drafts_mailbox?this.open_compose_step({_draft_uid:g,_mbox:this.env.mailbox}):this.show_message(g))):"addressbook"==
+this.task&&(h=b?b:this.get_single_cid(),!h||"show"==this.env.action&&h==this.env.cid||this.load_contact(h,"show"));break;case "add":"addressbook"==this.task?this.load_contact(0,"add"):"settings"==this.task&&(this.identity_list.clear_selection(),this.load_identity(0,"add-identity"));break;case "edit":"addressbook"==this.task&&(h=this.get_single_cid())?this.load_contact(h,"edit"):"settings"==this.task&&b?this.load_identity(b,"edit-identity"):"mail"==this.task&&(h=this.get_single_uid())&&(k={_mbox:this.env.mailbox},
+k[this.env.mailbox==this.env.drafts_mailbox&&"new"!=b?"_draft_uid":"_uid"]=h,this.open_compose_step(k));break;case "save":var p;if(k=this.gui_objects.editform){if("search"!=this.env.action)if((p=$("input[name='_pagesize']",k))&&p.length&&isNaN(parseInt(p.val()))){alert(this.get_label("nopagesizewarning"));p.focus();break}else{if("reload"==b)k.action+="?_reload=1";else if("settings"==this.task&&0==this.env.identities_level%2&&(p=$("input[name='_email']",k))&&p.length&&!rcube_check_email(p.val())){alert(this.get_label("noemailwarning"));
 p.focus();break}$("input.placeholder").each(function(){this.value==this._placeholder&&(this.value="")})}parent.rcmail&&parent.rcmail.env.source&&(k.action=this.add_url(k.action,"_orig_source",parent.rcmail.env.source));k.submit()}break;case "delete":"mail"==this.task?this.delete_messages(e):"addressbook"==this.task?this.delete_contacts():"settings"==this.task&&this.delete_identity();break;case "move":case "moveto":"mail"==this.task?this.move_messages(b):"addressbook"==this.task&&this.drag_active&&
 this.copy_contact(null,b);break;case "copy":"mail"==this.task&&this.copy_messages(b);break;case "mark":b&&this.mark_message(b);break;case "toggle_status":if(b&&!b._row)break;k="read";b._row.uid&&(g=b._row.uid,this.message_list.rows[g].deleted?k="undelete":this.message_list.rows[g].unread||(k="unread"));this.mark_message(k,g);break;case "toggle_flag":if(b&&!b._row)break;k="flagged";b._row.uid&&(g=b._row.uid,this.message_list.rows[g].flagged&&(k="unflagged"));this.mark_message(k,g);break;case "always-load":if(this.env.uid&&
 this.env.sender){this.add_contact(this.env.sender);setTimeout(function(){l.command("load-images")},300);break}case "load-images":this.env.uid&&this.show_message(this.env.uid,!0,"preview"==this.env.action);break;case "load-attachment":k="_mbox="+urlencode(this.env.mailbox)+"&_uid="+this.env.uid+"&_part="+b.part;if(this.env.uid&&b.mimetype&&this.env.mimetypes&&0<=$.inArray(b.mimetype,this.env.mimetypes)){var m=window.open(this.env.comm_path+"&_action=get&"+k+"&_frame=1",this.html_identifier("rcubemailattachment"+
 this.env.uid+b.part));if(m){setTimeout(function(){m.focus()},10);break}}this.goto_url("get",k+"&_download=1",!1);break;case "select-all":this.select_all_mode=b?!1:!0;this.dummy_select=!0;"invert"==b?this.message_list.invert_selection():this.message_list.select_all("page"==b?"":b);this.dummy_select=null;break;case "select-none":this.select_all_mode=!1;this.message_list.clear_selection();break;case "expand-all":this.env.autoexpand_threads=1;this.message_list.expand_all();break;case "expand-unread":this.env.autoexpand_threads=
 2;this.message_list.collapse_all();this.expand_unread();break;case "collapse-all":this.env.autoexpand_threads=0;this.message_list.collapse_all();break;case "nextmessage":this.env.next_uid&&this.show_message(this.env.next_uid,!1,"preview"==this.env.action);break;case "lastmessage":this.env.last_uid&&this.show_message(this.env.last_uid);break;case "previousmessage":this.env.prev_uid&&this.show_message(this.env.prev_uid,!1,"preview"==this.env.action);break;case "firstmessage":this.env.first_uid&&this.show_message(this.env.first_uid);
-break;case "compose":k={};if("mail"==this.task)k._mbox=this.env.mailbox,b&&(k._to=b),this.env.search_request&&(k._search=this.env.search_request);else if("addressbook"==this.task)if(b&&0<b.indexOf("@"))k._to=b;else{h=[];if(b)h.push(b);else if(this.contact_list){p=this.contact_list.get_selection();k=0;for(g=p.length;k<g;k++)h.push(p[k])}h.length?this.http_post("mailto",{_cid:h.join(","),_source:this.env.source},!0):this.env.group&&this.http_post("mailto",{_gid:this.env.group,_source:this.env.source},
+break;case "compose":k={};if("mail"==this.task)k._mbox=this.env.mailbox,b&&(k._to=b),this.env.search_request&&(k._search=this.env.search_request);else if("addressbook"==this.task)if(b&&0<b.indexOf("@"))k._to=b;else{h=[];if(b)h.push(b);else if(this.contact_list)for(p=this.contact_list.get_selection(),k=0,g=p.length;k<g;k++)h.push(p[k]);h.length?this.http_post("mailto",{_cid:h.join(","),_source:this.env.source},!0):this.env.group&&this.http_post("mailto",{_gid:this.env.group,_source:this.env.source},
 !0);break}else b&&(k._to=b);this.open_compose_step(k);break;case "spellcheck":this.spellcheck_state()?this.stop_spellchecking():window.tinyMCE&&tinyMCE.get(this.env.composebody)?tinyMCE.execCommand("mceSpellCheck",!0):this.env.spellcheck&&this.env.spellcheck.spellCheck&&this.env.spellcheck.spellCheck();this.spellcheck_state();break;case "savedraft":clearTimeout(this.save_timer);if(this.env.draft_id&&this.cmp_hash==this.compose_field_hash()){this.auto_save_start();break}this.submit_messageform(!0);
 break;case "send":if(!b.nocheck&&!this.check_compose_input(a))break;clearTimeout(this.save_timer);this.submit_messageform();break;case "send-attachment":clearTimeout(this.save_timer);this.upload_file(b||this.gui_objects.uploadform);break;case "insert-sig":this.change_identity($("[name='_from']")[0],!0);break;case "list-adresses":this.list_contacts(b);this.enable_command("add-recipient",!1);break;case "add-recipient":this.compose_add_recipient(b);break;case "reply-all":case "reply-list":case "reply":if(g=
 this.get_single_uid())k={_reply_uid:g,_mbox:this.env.mailbox},"reply-all"==a?k._all=!b&&this.commands["reply-list"]?"list":"all":"reply-list"==a&&(k._all="list"),this.open_compose_step(k);break;case "forward-attachment":case "forward-inline":case "forward":g=this.env.uid?[this.env.uid]:this.message_list?this.message_list.get_selection():[];if(g.length){k={_forward_uid:this.uids_to_list(g),_mbox:this.env.mailbox};if("forward-attachment"==a||!b&&this.env.forward_attachment||1<g.length)k._attachment=
@@ -42,183 +42,183 @@ setTimeout(function(){l.sourcewin.focus()},20);break;case "download":(g=this.get
 1);else if(g&&"addressbook"==this.task){if(""==this.env.source){for(k in this.env.address_sources)break;this.env.source=k;this.env.group=""}this.list_contacts(this.env.source,this.env.group,1)}break;case "listgroup":this.reset_qsearch();this.list_contacts(b.source,b.id);break;case "import":if("import"==this.env.action&&this.gui_objects.importform){if((k=document.getElementById("rcmimportfile"))&&!k.value){alert(this.get_label("selectimportfile"));break}this.gui_objects.importform.submit();this.set_busy(!0,
 "importwait");this.lock_form(this.gui_objects.importform,!0)}else this.goto_url("import",this.env.source?"_target="+urlencode(this.env.source)+"&":"");break;case "export":0<this.contact_list.rowcount&&this.goto_url("export",{_source:this.env.source,_gid:this.env.group,_search:this.env.search_request});break;case "upload-photo":this.upload_contact_photo(b||this.gui_objects.uploadform);break;case "delete-photo":this.replace_contact_photo("-del-");break;case "preferences":case "identities":case "folders":this.goto_url("settings/"+
 a);break;case "undo":this.http_request("undo","",this.display_message("","loading"));break;default:k=a.replace(/-/g,"_"),this[k]&&"function"===typeof this[k]&&(f=this[k](b,d))}!1===this.triggerEvent("after"+a,b)&&(f=!1);this.triggerEvent("actionafter",{props:b,action:a});return!1===f?!1:d?!1:!0};this.enable_command=function(){var a,b,d=Array.prototype.slice.call(arguments),e=d.pop(),f;for(b=0;b<d.length;b++)if(f=d[b],"string"===typeof f)this.commands[f]=e,this.set_button(f,e?"act":"pas");else for(a in f)d.push(f[a])};
-this.set_busy=function(a,b,d){a&&b?(d=this.get_label(b),d==b&&(d="Loading..."),d=this.display_message(d,"loading")):!a&&d&&this.hide_message(d);this.busy=a;this.gui_objects.editform&&this.lock_form(this.gui_objects.editform,a);return d};this.gettext=this.get_label=function(a,b){return b&&this.labels[b+"."+a]?this.labels[b+"."+a]:this.labels[a]?this.labels[a]:a};this.switch_task=function(a){if(!(this.task===a&&"mail"!=a)){var b=this.get_task_url(a);"mail"==a&&(b+="&_mbox=INBOX");this.redirect(b)}};
-this.get_task_url=function(a,b){b||(b=this.env.comm_path);return b.replace(/_task=[a-z]+/,"_task="+a)};this.reload=function(a){this.is_framed()?parent.rcmail.reload(a):a?setTimeout(function(){rcmail.reload()},a):window.location&&(location.href=this.env.comm_path+(this.env.action?"&_action="+this.env.action:""))};this.add_url=function(a,b,d){d=urlencode(d);if(/(\?.*)$/.test(a)){var e=RegExp.$1,f=RegExp("((\\?|&)"+RegExp.escape(b)+"=[^&]*)"),e=f.test(e)?e.replace(f,RegExp.$2+b+"="+d):e+("&"+b+"="+d);
-return a.replace(/(\?.*)$/,e)}return a+"?"+b+"="+d};this.is_framed=function(){return this.env.framed&&parent.rcmail&&parent.rcmail!=this&&parent.rcmail.command};this.save_pref=function(a){var b={_name:a.name,_value:a.value};a.session&&(b._session=a.session);a.env&&(this.env[a.env]=a.value);this.http_post("save-pref",b)};this.html_identifier=function(a,b){a=String(a);return b?Base64.encode(a).replace(/=+$/,"").replace(/\+/g,"-").replace(/\//g,"_"):a.replace(this.identifier_expr,"_")};this.html_identifier_decode=
-function(a){for(a=String(a).replace(/-/g,"+").replace(/_/g,"/");a.length%4;)a+="=";return Base64.decode(a)};this.drag_menu=function(a,b){var d=rcube_event.get_modifier(a),e=this.gui_objects.message_dragmenu;return e&&d==SHIFT_KEY&&this.commands.copy?(d=rcube_event.get_mouse_pos(a),this.env.drag_target=b,$(e).css({top:d.y-10+"px",left:d.x-10+"px"}).show(),!0):!1};this.drag_menu_action=function(a){var b=this.gui_objects.message_dragmenu;b&&$(b).hide();this.command(a,this.env.drag_target);this.env.drag_target=
-null};this.drag_start=function(a){var b="mail"==this.task?this.env.mailboxes:this.env.contactfolders;this.drag_active=!0;this.preview_timer&&clearTimeout(this.preview_timer);this.preview_read_timer&&clearTimeout(this.preview_read_timer);if(this.gui_objects.folderlist&&b){this.initialBodyScrollTop=bw.ie?0:window.pageYOffset;this.initialListScrollTop=this.gui_objects.folderlist.parentNode.scrollTop;var d;a=$(this.gui_objects.folderlist);pos=a.offset();this.env.folderlist_coords={x1:pos.left,y1:pos.top,
-x2:pos.left+a.width(),y2:pos.top+a.height()};this.env.folder_coords=[];for(d in b)if(a=this.get_folder_li(d))if(b=a.firstChild.offsetHeight)pos=$(a.firstChild).offset(),this.env.folder_coords[d]={x1:pos.left,y1:pos.top,x2:pos.left+a.firstChild.offsetWidth,y2:pos.top+b,on:0}}};this.drag_end=function(a){this.drag_active=!1;this.env.last_folder_target=null;this.folder_auto_timer&&(clearTimeout(this.folder_auto_timer),this.folder_auto_expand=this.folder_auto_timer=null);if(this.gui_objects.folderlist&&
-this.env.folder_coords)for(var b in this.env.folder_coords)this.env.folder_coords[b].on&&$(this.get_folder_li(b)).removeClass("droptarget")};this.drag_move=function(a){if(this.gui_objects.folderlist&&this.env.folder_coords){var b,d,e,f,g;d="draglayernormal";a=rcube_event.get_mouse_pos(a);f=this.env.folderlist_coords;e=bw.ie?-document.documentElement.scrollTop:this.initialBodyScrollTop;var h=this.initialListScrollTop-this.gui_objects.folderlist.parentNode.scrollTop;this.contact_list&&this.contact_list.draglayer&&
-(g=this.contact_list.draglayer.attr("class"));a.y+=-h-e;if(a.x<f.x1||a.x>=f.x2||a.y<f.y1||a.y>=f.y2)this.env.last_folder_target&&($(this.get_folder_li(this.env.last_folder_target)).removeClass("droptarget"),this.env.folder_coords[this.env.last_folder_target].on=0,this.env.last_folder_target=null);else for(b in this.env.folder_coords)f=this.env.folder_coords[b],a.x>=f.x1&&a.x<f.x2&&a.y>=f.y1&&a.y<f.y2?(f=this.check_droptarget(b))?(d=this.get_folder_li(b),e=$(d.getElementsByTagName("div")[0]),e.hasClass("collapsed")?
-(this.folder_auto_timer&&clearTimeout(this.folder_auto_timer),this.folder_auto_expand=this.env.mailboxes[b].id,this.folder_auto_timer=setTimeout(function(){rcmail.command("collapse-folder",rcmail.folder_auto_expand);rcmail.drag_start(null)},1E3)):this.folder_auto_timer&&(clearTimeout(this.folder_auto_timer),this.folder_auto_expand=this.folder_auto_timer=null),$(d).addClass("droptarget"),this.env.folder_coords[b].on=1,this.env.last_folder_target=b,d="draglayer"+(1<f?"copy":"normal")):this.env.last_folder_target=
-null:f.on&&($(this.get_folder_li(b)).removeClass("droptarget"),this.env.folder_coords[b].on=0);d!=g&&(this.contact_list&&this.contact_list.draglayer)&&this.contact_list.draglayer.attr("class",d)}};this.collapse_folder=function(a){var b=this.get_folder_li(a,"",!0),d=$("div:first",b),e=$("ul:first",b);if(d.hasClass("collapsed"))e.show(),d.removeClass("collapsed").addClass("expanded"),d=RegExp("&"+urlencode(a)+"&"),this.env.collapsed_folders=this.env.collapsed_folders.replace(d,"");else if(d.hasClass("expanded"))e.hide(),
-d.removeClass("expanded").addClass("collapsed"),this.env.collapsed_folders=this.env.collapsed_folders+"&"+urlencode(a)+"&",0==this.env.mailbox.indexOf(a+this.env.delimiter)&&!$(b).hasClass("virtual")&&this.command("list",a);else return;if(bw.ie6||bw.ie7)if((d=b.nextSibling?b.nextSibling.getElementsByTagName("ul"):null)&&d.length&&(b=d[0])&&b.style&&"none"!=b.style.display)b.style.display="none",b.style.display="";this.command("save-pref",{name:"collapsed_folders",value:this.env.collapsed_folders});
-this.set_unread_count_display(a,!1)};this.doc_mouse_up=function(a){var b,d,e;if(!$(rcube_event.get_target(a)).closest(".ui-dialog, .ui-widget-overlay").length&&((d=this.message_list)?b=this.env.mailboxes:(d=this.contact_list)?b=this.env.contactfolders:this.ksearch_value&&this.ksearch_blur(),d&&!rcube_mouse_is_over(a,d.list.parentNode)&&d.blur(),this.drag_active&&(b&&this.env.last_folder_target)&&(b=b[this.env.last_folder_target],$(this.get_folder_li(this.env.last_folder_target)).removeClass("droptarget"),
-this.env.last_folder_target=null,d.draglayer.hide(),this.drag_menu(a,b)||this.command("moveto",b)),this.buttons_sel)){for(e in this.buttons_sel)"function"!==typeof e&&this.button_out(this.buttons_sel[e],e);this.buttons_sel={}}};this.click_on_list=function(a){this.gui_objects.qsearchbox&&this.gui_objects.qsearchbox.blur();this.message_list?this.message_list.focus():this.contact_list&&this.contact_list.focus();return!0};this.msglist_select=function(a){this.preview_timer&&clearTimeout(this.preview_timer);
-this.preview_read_timer&&clearTimeout(this.preview_read_timer);var b=a.get_single_selection();this.enable_command(this.env.message_commands,null!=b);b&&(this.env.mailbox==this.env.drafts_mailbox?this.enable_command("reply","reply-all","reply-list","forward","forward-attachment","forward-inline",!1):this.env.messages[b].ml||this.enable_command("reply-list",!1));this.enable_command("delete","moveto","copy","mark","forward","forward-attachment",0<a.selection.length);if(b||a.selection.length&&a.selection.length!=
-a.rowcount)this.select_all_mode=!1;b&&this.env.contentframe&&!a.multi_selecting&&!this.dummy_select?this.preview_timer=setTimeout(function(){l.msglist_get_preview()},200):this.env.contentframe&&this.show_contentframe(!1)};this.msglist_click=function(a){if(!a.multi_selecting&&this.env.contentframe&&!a.get_single_selection()&&(a=this.get_frame_window(this.env.contentframe))&&0<=a.location.href.indexOf(this.env.blankpage))this.preview_timer&&clearTimeout(this.preview_timer),this.preview_read_timer&&
-clearTimeout(this.preview_read_timer),this.preview_timer=setTimeout(function(){l.msglist_get_preview()},200)};this.msglist_dbl_click=function(a){this.preview_timer&&clearTimeout(this.preview_timer);this.preview_read_timer&&clearTimeout(this.preview_read_timer);(a=a.get_single_selection())&&this.env.mailbox==this.env.drafts_mailbox?this.open_compose_step({_draft_uid:a,_mbox:this.env.mailbox}):a&&this.show_message(a,!1,!1)};this.msglist_keypress=function(a){a.modkey!=CONTROL_KEY&&(a.key_pressed==a.ENTER_KEY?
-this.command("show"):a.key_pressed==a.DELETE_KEY||a.key_pressed==a.BACKSPACE_KEY?this.command("delete"):33==a.key_pressed?this.command("previouspage"):34==a.key_pressed&&this.command("nextpage"))};this.msglist_get_preview=function(){var a=this.get_single_uid();a&&this.env.contentframe&&!this.drag_active?this.show_message(a,!1,!0):this.env.contentframe&&this.show_contentframe(!1)};this.msglist_expand=function(a){this.env.messages[a.uid]&&(this.env.messages[a.uid].expanded=a.expanded);$(a.obj)[a.expanded?
-"addClass":"removeClass"]("expanded")};this.msglist_set_coltypes=function(a){var b,d=a.list.tHead.rows[0].cells;this.env.coltypes=[];for(a=0;a<d.length;a++)d[a].id&&d[a].id.match(/^rcm/)&&(b=d[a].id.replace(/^rcm/,""),this.env.coltypes.push(b));if(0<=(a=$.inArray("flag",this.env.coltypes)))this.env.flagged_col=a;if(0<=(a=$.inArray("subject",this.env.coltypes)))this.env.subject_col=a;this.command("save-pref",{name:"list_cols",value:this.env.coltypes,session:"list_attrib/columns"})};this.check_droptarget=
-function(a){if("mail"==this.task)return this.env.mailboxes[a]&&this.env.mailboxes[a].id!=this.env.mailbox&&!this.env.mailboxes[a].virtual?1:0;if("settings"==this.task)return a!=this.env.mailbox?1:0;if("addressbook"==this.task&&a!=this.env.source&&this.env.contactfolders[a])if("group"==this.env.contactfolders[a].type){var b=this.env.contactfolders[a].source;if(this.env.contactfolders[a].id!=this.env.group&&!this.env.contactfolders[b].readonly)return 1<this.env.selection_sources.length||-1==$.inArray(b,
-this.env.selection_sources)?2:1}else if(!this.env.contactfolders[a].readonly)return 1<this.env.selection_sources.length||-1==$.inArray(a,this.env.selection_sources)?2:0;return 0};this.open_window=function(a,b,d){b=Math.min(b,screen.width-10);d=Math.min(d,screen.height-100);var e=(screen.width-b)/2+(screen.left||0),f=Math.max(0,(screen.height-d)/2+(screen.top||0)-20),g="rcmextwin"+(new Date).getTime(),h=window.open(a+(a.match(/\?/)?"&":"?")+"_extwin=1",g,"width="+b+",height="+d+",top="+f+",left="+
-e+",resizable=yes,toolbar=no,status=no,location=no");!a&&h.document&&h.document.write("<html><body>"+this.get_label("loading")+"</body></html>");window.setTimeout(function(){h.focus()},10);window.setTimeout(function(){h.moveTo(e,f)},bw.chrome?100:10);return g};this.init_message_row=function(a){var b,d=this,e=a.uid,f=(null!=this.env.status_col?"status":"msg")+"icn"+a.uid;e&&this.env.messages[e]&&$.extend(a,this.env.messages[e]);if(a.icon=document.getElementById(f))a.icon._row=a.obj,a.icon.onmousedown=
-function(a){d.command("toggle_status",this);rcube_event.cancel(a)};a.msgicon=null!=this.env.status_col?document.getElementById("msgicn"+a.uid):a.icon;if(null!=this.env.flagged_col&&(a.flagicon=document.getElementById("flagicn"+a.uid)))a.flagicon._row=a.obj,a.flagicon.onmousedown=function(a){d.command("toggle_flag",this);rcube_event.cancel(a)};if(!a.depth&&a.has_children&&(b=document.getElementById("rcmexpando"+a.uid)))a.expando=b,b.onmousedown=function(a){return d.expand_message_row(a,e)};this.triggerEvent("insertrow",
-{uid:e,row:a})};this.add_message_row=function(a,b,d,e){if(!this.gui_objects.messagelist||!this.message_list||d.mbox!=this.env.mailbox&&!d.skip_mbox_check)return!1;this.env.messages[a]||(this.env.messages[a]={});$.extend(this.env.messages[a],{deleted:d.deleted?1:0,replied:d.answered?1:0,unread:!d.seen?1:0,forwarded:d.forwarded?1:0,flagged:d.flagged?1:0,has_children:d.has_children?1:0,depth:d.depth?d.depth:0,unread_children:d.unread_children?d.unread_children:0,parent_uid:d.parent_uid?d.parent_uid:
-0,selected:this.select_all_mode||this.message_list.in_selection(a),ml:d.ml?1:0,ctype:d.ctype,flags:d.extra_flags});var f,g,h,k="",l="",m=this.message_list;h=m.rows;var n=this.env.messages[a],q="message"+(!d.seen?" unread":"")+(d.deleted?" deleted":"")+(d.flagged?" flagged":"")+(d.unread_children&&d.seen&&!this.env.autoexpand_threads?" unroot":"")+(n.selected?" selected":""),s=document.createElement("tr");s.id="rcmrow"+a;f="msgicon";null===this.env.status_col&&(f+=" status",d.deleted?f+=" deleted":
-d.seen?0<d.unread_children&&(f+=" unreadchildren"):f+=" unread");d.answered&&(f+=" replied");d.forwarded&&(f+=" forwarded");n.selected&&!m.in_selection(a)&&m.selection.push(a);if(this.env.threading)if(n.depth)k+='<span id="rcmtab'+a+'" class="branch" style="width:'+15*n.depth+'px;">&nbsp;&nbsp;</span>',h[n.parent_uid]&&!1===h[n.parent_uid].expanded||(0==this.env.autoexpand_threads||2==this.env.autoexpand_threads)&&(!h[n.parent_uid]||!h[n.parent_uid].expanded)?(s.style.display="none",n.expanded=!1):
-n.expanded=!0,q+=" thread expanded";else if(n.has_children){if(void 0===n.expanded&&(1==this.env.autoexpand_threads||2==this.env.autoexpand_threads&&n.unread_children))n.expanded=!0;l='<div id="rcmexpando'+a+'" class="'+(n.expanded?"expanded":"collapsed")+'">&nbsp;&nbsp;</div>';q+=" thread"+(n.expanded?" expanded":"")}k+='<span id="msgicn'+a+'" class="'+f+'">&nbsp;</span>';s.className=q;!bw.ie&&b.subject&&(h=d.mbox==this.env.drafts_mailbox?"_draft_uid":"_uid",b.subject='<a href="./?_task=mail&_action='+
-(d.mbox==this.env.drafts_mailbox?"compose":"show")+"&_mbox="+urlencode(d.mbox)+"&"+h+"="+a+'" onclick="return rcube_event.cancel(event)" onmouseover="rcube_webmail.long_subject_title(this,'+(n.depth+1)+')">'+b.subject+"</a>");for(g in this.env.coltypes)f=this.env.coltypes[g],h=document.createElement("td"),h.className=String(f).toLowerCase(),"flag"==f?(f=d.flagged?"flagged":"unflagged",f='<span id="flagicn'+a+'" class="'+f+'">&nbsp;</span>'):"attachment"==f?f=/application\/|multipart\/(m|signed)/.test(d.ctype)?
-'<span class="attachment">&nbsp;</span>':/multipart\/report/.test(d.ctype)?'<span class="report">&nbsp;</span>':"&nbsp;":"status"==f?(f=d.deleted?"deleted":d.seen?0<d.unread_children?"unreadchildren":"msgicon":"unread",f='<span id="statusicn'+a+'" class="'+f+'">&nbsp;</span>'):"threads"==f?f=l:"subject"==f?(bw.ie&&(h.onmouseover=function(){rcube_webmail.long_subject_title_ie(this,n.depth+1)},bw.ie8&&(k="<span></span>"+k)),f=k+b[f]):f="priority"==f?0<d.prio&&6>d.prio?'<span class="prio'+d.prio+'">&nbsp;</span>':
-"&nbsp;":b[f],h.innerHTML=f,s.appendChild(h);m.insert_row(s,e);e&&(this.env.pagesize&&m.rowcount>this.env.pagesize)&&(a=m.get_last_row(),m.remove_row(a),m.clear_selection(a))};this.set_list_sorting=function(a,b){$("#rcm"+this.env.sort_col).removeClass("sorted"+this.env.sort_order.toUpperCase());a&&$("#rcm"+a).addClass("sorted"+b);this.env.sort_col=a;this.env.sort_order=b};this.set_list_options=function(a,b,d,e){var f,g={};void 0===b&&(b=this.env.sort_col);d||(d=this.env.sort_order);if(this.env.sort_col!=
-b||this.env.sort_order!=d)f=1,this.set_list_sorting(b,d);this.env.threading!=e&&(f=1,g._threads=e);if(a&&a.length){var h,k,l=[],m=this.env.coltypes;for(e=0;e<m.length;e++)k=m[e],h=$.inArray(k,a),-1!=h&&(l.push(k),delete a[h]);for(e=0;e<a.length;e++)a[e]&&l.push(a[e]);l.join()!=m.join()&&(f=1,g._cols=l.join(","))}f&&this.list_mailbox("","",b+"_"+d,g)};this.show_message=function(a,b,d){if(a){var e,f=window,g="&_action="+(d?"preview":"show")+"&_uid="+a+"&_mbox="+urlencode(this.env.mailbox);if(d&&(e=
-this.get_frame_window(this.env.contentframe)))f=e,g+="&_framed=1";b&&(g+="&_safe=1");this.env.search_request&&(g+="&_search="+this.env.search_request);g+="&_caps="+urlencode(this.browser_capabilities());this.env.extwin&&(g+="&_extwin=1");d&&0<=String(f.location.href).indexOf(g)?this.show_contentframe(!0):(!d&&this.env.message_extwin&&!this.env.extwin?this.open_window(this.env.comm_path+g,1E3,1200):this.location_href(this.env.comm_path+g,f,!0),d&&(this.message_list&&this.message_list.rows[a]&&this.message_list.rows[a].unread&&
-0<=this.env.preview_pane_mark_read)&&(this.preview_read_timer=setTimeout(function(){l.set_message(a,"unread",!1);l.update_thread_root(a,"read");l.env.unread_counts[l.env.mailbox]&&(l.env.unread_counts[l.env.mailbox]-=1,l.set_unread_count(l.env.mailbox,l.env.unread_counts[l.env.mailbox],"INBOX"==l.env.mailbox));0<l.env.preview_pane_mark_read&&l.http_post("mark",{_uid:a,_flag:"read",_quiet:1})},1E3*this.env.preview_pane_mark_read)))}};this.show_contentframe=function(a){var b,d,e=this.env.contentframe;
-if(e&&(b=this.get_frame_element(e)))if(!a&&(d=this.get_frame_window(e)))d.location&&0>d.location.href.indexOf(this.env.blankpage)&&(d.location.href=this.env.blankpage);else if(!bw.safari&&!bw.konq)$(b)[a?"show":"hide"]();!a&&this.busy&&this.set_busy(!1,null,this.env.frame_lock)};this.get_frame_element=function(a){var b;if(a&&(b=document.getElementById(a)))return b};this.get_frame_window=function(a){if((a=this.get_frame_element(a))&&a.name&&window.frames)return window.frames[a.name]};this.lock_frame=
-function(){this.env.frame_lock||((this.is_framed()?parent.rcmail:this).env.frame_lock=this.set_busy(!0,"loading"))};this.list_page=function(a){"next"==a?a=this.env.current_page+1:"last"==a?a=this.env.pagecount:"prev"==a&&1<this.env.current_page?a=this.env.current_page-1:"first"==a&&1<this.env.current_page&&(a=1);0<a&&a<=this.env.pagecount&&(this.env.current_page=a,"addressbook"==this.task||this.contact_list?this.list_contacts(this.env.source,this.env.group,a):"mail"==this.task&&this.list_mailbox(this.env.mailbox,
-a))};this.checkmail=function(){var a=this.set_busy(!0,"checkingmail"),b=this.check_recent_params();this.http_request("check-recent",b,a)};this.filter_mailbox=function(a){var b=this.set_busy(!0,"searching");this.clear_message_list();this.env.current_page=1;this.http_request("search",this.search_params(!1,a),b)};this.list_mailbox=function(a,b,d,e){var f=window;"object"!=typeof e&&(e={});a||(a=this.env.mailbox?this.env.mailbox:"INBOX");d&&(e._sort=d);this.env.search_request&&(e._search=this.env.search_request);
-this.env.mailbox!=a&&(b=1,this.env.current_page=b,this.select_all_mode=!1);this.clear_message_list();if(a!=this.env.mailbox||a==this.env.mailbox&&!b&&!d)e._refresh=1;this.select_folder(a,"",!0);this.unmark_folder(a,"recent","",!0);this.env.mailbox=a;if(this.gui_objects.messagelist)this.list_mailbox_remote(a,b,e);else{if(d=this.get_frame_window(this.env.contentframe))f=d,e._framed=1;a&&(this.set_busy(!0,"loading"),e._mbox=a,b&&(e._page=b),this.location_href(e,f))}};this.clear_message_list=function(){this.env.messages=
-{};this.last_selected=0;this.show_contentframe(!1);this.message_list&&this.message_list.clear(!0)};this.list_mailbox_remote=function(a,b,d){this.message_list.clear();var e=this.set_busy(!0,"loading");"object"!=typeof d&&(d={});d._mbox=a;b&&(d._page=b);this.http_request("list",d,e)};this.update_selection=function(){var a=this.message_list.selection,b=this.message_list.rows,d,e=[];for(d in a)b[a[d]]&&e.push(a[d]);this.message_list.selection=e};this.expand_unread=function(){for(var a,b=this.gui_objects.messagelist.tBodies[0].firstChild;b;){if(1==
-b.nodeType&&(a=this.message_list.rows[b.uid])&&a.unread_children)this.message_list.expand_all(a),this.set_unread_children(a.uid);b=b.nextSibling}return!1};this.expand_message_row=function(a,b){var d=this.message_list.rows[b];d.expanded=!d.expanded;this.set_unread_children(b);d.expanded=!d.expanded;this.message_list.expand_row(a,b)};this.expand_threads=function(){if(this.env.threading&&this.env.autoexpand_threads&&this.message_list)switch(this.env.autoexpand_threads){case 2:this.expand_unread();break;
-case 1:this.message_list.expand_all()}};this.init_threads=function(a,b){if(b&&b!=this.env.mailbox)return!1;for(var d=0,e=a.length;d<e;d++)this.add_tree_icons(a[d]);this.expand_threads()};this.add_tree_icons=function(a){var b,d,e,f,g=[],h=[],k,l=this.message_list.rows;for(k=a?l[a]?l[a].obj:null:this.message_list.list.tBodies[0].firstChild;k;){if(1==k.nodeType&&(d=l[k.uid]))if(d.depth){for(b=g.length-1;0<=b&&!(e=g[b].length,e>d.depth?(f=e-d.depth,g[b][f]&2||(g[b][f]=g[b][f]?g[b][f]+2:2)):e==d.depth&&
-(g[b][0]&2||(g[b][0]+=2)),d.depth>e);b--);g.push(Array(d.depth));g[g.length-1][0]=1;h.push(d.uid)}else{if(g.length){for(b in g)this.set_tree_icons(h[b],g[b]);g=[];h=[]}if(a&&k!=l[a].obj)break}k=k.nextSibling}if(g.length)for(b in g)this.set_tree_icons(h[b],g[b])};this.set_tree_icons=function(a,b){var d,e=[],f="",g=b.length;for(d=0;d<g;d++)2<b[d]?e.push({"class":"l3",width:15}):1<b[d]?e.push({"class":"l2",width:15}):0<b[d]?e.push({"class":"l1",width:15}):e.length&&!e[e.length-1]["class"]?e[e.length-
-1].width+=15:e.push({"class":null,width:15});for(d=e.length-1;0<=d;d--)f=e[d]["class"]?f+('<div class="tree '+e[d]["class"]+'" />'):f+('<div style="width:'+e[d].width+'px" />');f&&$("#rcmtab"+a).html(f)};this.update_thread_root=function(a,b){if(this.env.threading){var d=this.message_list.find_root(a);if(a!=d){var e=this.message_list.rows[d];if("read"==b&&e.unread_children)e.unread_children--;else if("unread"==b&&e.has_children)e.unread_children=e.unread_children?e.unread_children+1:1;else return;
-this.set_message_icon(d);this.set_unread_children(d)}}};this.update_thread=function(a){if(!this.env.threading)return 0;var b,d=0,e=this.message_list.rows,f=e[a],g=e[a].depth,h=[];f.depth?f.unread&&(a=this.message_list.find_root(a),e[a].unread_children--,this.set_unread_children(a)):d--;a=f.parent_uid;for(f=f.obj.nextSibling;f;){if(1==f.nodeType&&(b=e[f.uid])){if(!b.depth||b.depth<=g)break;b.depth--;$("#rcmtab"+b.uid).width(15*b.depth).html("");b.depth?(b.depth==g&&(b.parent_uid=a),b.unread&&h.length&&
-h[h.length-1].unread_children++):(d++,b.parent_uid=0,b.has_children&&($("#rcmrow"+b.uid+" .leaf:first").attr("id","rcmexpando"+b.uid).attr("class","none"!=b.obj.style.display?"expanded":"collapsed").bind("mousedown",{uid:b.uid,p:this},function(a){return a.data.p.expand_message_row(a,a.data.uid)}),b.unread_children=0,h.push(b)),"none"==b.obj.style.display&&$(b.obj).show())}f=f.nextSibling}for(b=0;b<h.length;b++)this.set_unread_children(h[b].uid);return d};this.delete_excessive_thread_rows=function(){for(var a=
-this.message_list.rows,b=this.message_list.list.tBodies[0].firstChild,d=this.env.pagesize+1;b;){if(1==b.nodeType&&(r=a[b.uid]))!r.depth&&d&&d--,d||this.message_list.remove_row(b.uid);b=b.nextSibling}};this.set_message_icon=function(a){var b=this.message_list.rows[a];if(!b)return!1;b.icon&&(a="msgicon",b.deleted?a+=" deleted":b.unread?a+=" unread":b.unread_children&&(a+=" unreadchildren"),b.msgicon==b.icon&&(b.replied&&(a+=" replied"),b.forwarded&&(a+=" forwarded"),a+=" status"),b.icon.className=a);
-b.msgicon&&b.msgicon!=b.icon&&(a="msgicon",!b.unread&&b.unread_children&&(a+=" unreadchildren"),b.replied&&(a+=" replied"),b.forwarded&&(a+=" forwarded"),b.msgicon.className=a);b.flagicon&&(a=b.flagged?"flagged":"unflagged",b.flagicon.className=a)};this.set_message_status=function(a,b,d){a=this.message_list.rows[a];if(!a)return!1;"unread"==b?a.unread=d:"deleted"==b?a.deleted=d:"replied"==b?a.replied=d:"forwarded"==b?a.forwarded=d:"flagged"==b&&(a.flagged=d)};this.set_message=function(a,b,d){var e=
-this.message_list&&this.message_list.rows[a];if(!e)return!1;b&&this.set_message_status(a,b,d);b=$(e.obj);e.unread&&!b.hasClass("unread")?b.addClass("unread"):!e.unread&&b.hasClass("unread")&&b.removeClass("unread");e.deleted&&!b.hasClass("deleted")?b.addClass("deleted"):!e.deleted&&b.hasClass("deleted")&&b.removeClass("deleted");e.flagged&&!b.hasClass("flagged")?b.addClass("flagged"):!e.flagged&&b.hasClass("flagged")&&b.removeClass("flagged");this.set_unread_children(a);this.set_message_icon(a)};
-this.set_unread_children=function(a){a=this.message_list.rows[a];a.parent_uid||(!a.unread&&a.unread_children&&!a.expanded?$(a.obj).addClass("unroot"):$(a.obj).removeClass("unroot"))};this.copy_messages=function(a){a&&"object"===typeof a&&(a=a.id);a&&a!=this.env.mailbox&&(a=this.selection_post_data({_target_mbox:a}),a._uid&&this.http_post("copy",a,this.display_message(this.get_label("copyingmessage"),"loading")))};this.move_messages=function(a){a&&"object"===typeof a&&(a=a.id);if(a&&a!=this.env.mailbox){var b=
-!1;a=this.selection_post_data({_target_mbox:a});a._uid&&("show"==this.env.action?b=this.set_busy(!0,"movingmessage"):this.show_contentframe(!1),this.enable_command(this.env.message_commands,!1),this._with_selected_messages("moveto",a,b))}};this.delete_messages=function(a){var b,d,e,f=this.env.trash_mailbox,g=this.message_list,h=g?g.get_selection():[];if(this.env.uid||h.length){d=0;for(e=h.length;d<e;d++)b=h[d],g.rows[b].has_children&&!g.rows[b].expanded&&g.select_children(b);if(this.env.flag_for_deletion)return this.mark_message("delete"),
-!1;!f||this.env.mailbox==f?this.permanently_remove_messages():this.env.delete_junk&&this.env.junk_mailbox&&this.env.mailbox==this.env.junk_mailbox?this.permanently_remove_messages():g&&g.modkey==SHIFT_KEY||a&&rcube_event.get_modifier(a)==SHIFT_KEY?confirm(this.get_label("deletemessagesconfirm"))&&this.permanently_remove_messages():this.move_messages(f);return!0}};this.permanently_remove_messages=function(){var a=this.selection_post_data();a._uid&&(this.show_contentframe(!1),this._with_selected_messages("delete",
-a))};this._with_selected_messages=function(a,b,d){var e=0;if(this.message_list){var f,g,h,k=[],l=this.message_list.get_selection();f=0;for(len=l.length;f<len;f++)g=l[f],this.env.threading&&(e+=this.update_thread(g),h=this.message_list.find_root(g),h!=g&&0>$.inArray(h,k)&&k.push(h)),this.message_list.remove_row(g,this.env.display_next&&f==l.length-1);this.env.display_next||this.message_list.clear_selection();f=0;for(len=k.length;f<len;f++)this.add_tree_icons(k[f])}this.env.display_next&&this.env.next_uid&&
-(b._next_uid=this.env.next_uid);0>e?b._count=-1*e:0<e&&this.delete_excessive_thread_rows();d||(d=this.display_message(this.get_label("moveto"==a?"movingmessage":"deletingmessage"),"loading"));this.http_post(a,b,d)};this.selection_post_data=function(a){"object"!=typeof a&&(a={});a._mbox=this.env.mailbox;if(!a._uid){var b=this.env.uid?[this.env.uid]:this.message_list.get_selection();a._uid=this.uids_to_list(b)}this.env.action&&(a._from=this.env.action);this.env.search_request&&(a._search=this.env.search_request);
-return a};this.mark_message=function(a,b){var d=[],e=[],f,g,h,k=this.message_list;b?d[0]=b:this.env.uid?d[0]=this.env.uid:k&&(d=k.get_selection());if(k){k.focus();g=0;for(f=d.length;g<f;g++)h=d[g],("read"==a&&k.rows[h].unread||"unread"==a&&!k.rows[h].unread||"delete"==a&&!k.rows[h].deleted||"undelete"==a&&k.rows[h].deleted||"flagged"==a&&!k.rows[h].flagged||"unflagged"==a&&k.rows[h].flagged)&&e.push(h)}else e=d;if(e.length||this.select_all_mode)switch(a){case "read":case "unread":this.toggle_read_status(a,
-e);break;case "delete":case "undelete":this.toggle_delete_status(e);break;case "flagged":case "unflagged":this.toggle_flagged_status(a,d)}};this.toggle_read_status=function(a,b){var d,e=b.length,f=this.selection_post_data({_uid:this.uids_to_list(b),_flag:a}),g=this.display_message(this.get_label("markingmessage"),"loading");for(d=0;d<e;d++)this.set_message(b[d],"unread","unread"==a?!0:!1);this.http_post("mark",f,g);for(d=0;d<e;d++)this.update_thread_root(b[d],a)};this.toggle_flagged_status=function(a,
-b){var d,e=b.length,f=this.selection_post_data({_uid:this.uids_to_list(b),_flag:a}),g=this.display_message(this.get_label("markingmessage"),"loading");for(d=0;d<e;d++)this.set_message(b[d],"flagged","flagged"==a?!0:!1);this.http_post("mark",f,g)};this.toggle_delete_status=function(a){var b=a.length,d,e,f=!0,g=this.message_list?this.message_list.rows:[];if(1==b)return!g.length||g[a[0]]&&!g[a[0]].deleted?this.flag_as_deleted(a):this.flag_as_undeleted(a),!0;for(d=0;d<b;d++)if(e=a[d],g[e]&&!g[e].deleted){f=
-!1;break}f?this.flag_as_undeleted(a):this.flag_as_deleted(a);return!0};this.flag_as_undeleted=function(a){var b,d=a.length,e=this.selection_post_data({_uid:this.uids_to_list(a),_flag:"undelete"}),f=this.display_message(this.get_label("markingmessage"),"loading");for(b=0;b<d;b++)this.set_message(a[b],"deleted",!1);this.http_post("mark",e,f)};this.flag_as_deleted=function(a){for(var b=[],d=this.selection_post_data({_uid:this.uids_to_list(a),_flag:"delete"}),e=this.display_message(this.get_label("markingmessage"),
-"loading"),f=this.message_list?this.message_list.rows:[],g=0,h=0,k=a.length;h<k;h++)uid=a[h],f[uid]&&(f[uid].unread&&(b[b.length]=uid),this.env.skip_deleted?(g+=this.update_thread(uid),this.message_list.remove_row(uid,this.env.display_next&&h==this.message_list.selection.length-1)):this.set_message(uid,"deleted",!0));this.env.skip_deleted&&this.message_list&&(this.env.display_next||this.message_list.clear_selection(),0>g?d._count=-1*g:0<g&&this.delete_excessive_thread_rows());b.length&&(d._ruid=this.uids_to_list(b));
-this.env.skip_deleted&&(this.env.display_next&&this.env.next_uid)&&(d._next_uid=this.env.next_uid);this.http_post("mark",d,e)};this.flag_deleted_as_read=function(a){var b,d,e,f=this.message_list?this.message_list.rows:[];a=String(a).split(",");d=0;for(e=a.length;d<e;d++)b=a[d],f[b]&&this.set_message(b,"unread",!1)};this.uids_to_list=function(a){return this.select_all_mode?"*":a.join(",")};this.set_button_titles=function(){var a="deletemessage";if(!this.env.flag_for_deletion&&this.env.trash_mailbox&&
-this.env.mailbox!=this.env.trash_mailbox&&(!this.env.delete_junk||!this.env.junk_mailbox||this.env.mailbox!=this.env.junk_mailbox))a="movemessagetotrash";this.set_alttext("delete",a)};this.expunge_mailbox=function(a){var b,d={_mbox:a};a==this.env.mailbox&&(b=this.set_busy(!0,"loading"),d._reload=1,this.env.search_request&&(d._search=this.env.search_request));this.http_post("expunge",d,b)};this.purge_mailbox=function(a){var b,d={_mbox:a};if(!confirm(this.get_label("purgefolderconfirm")))return!1;a==
-this.env.mailbox&&(b=this.set_busy(!0,"loading"),d._reload=1);this.http_post("purge",d,b)};this.purge_mailbox_test=function(){return this.env.exists&&(this.env.mailbox==this.env.trash_mailbox||this.env.mailbox==this.env.junk_mailbox||this.env.mailbox.match("^"+RegExp.escape(this.env.trash_mailbox)+RegExp.escape(this.env.delimiter))||this.env.mailbox.match("^"+RegExp.escape(this.env.junk_mailbox)+RegExp.escape(this.env.delimiter)))};this.login_user_keyup=function(a){var b=rcube_event.get_keycode(a),
-d=$("#rcmloginpwd");return 13==b&&d.length&&!d.val()?(d.focus(),rcube_event.cancel(a)):!0};this.open_compose_step=function(a){a=this.url("mail/compose",a);this.env.compose_extwin&&!this.env.extwin?this.open_window(a,1150,900):(this.redirect(a),window.resizeTo(Math.max(1150,$(window).width()),Math.max(900,$(window).height())))};this.init_messageform=function(){if(!this.gui_objects.messageform)return!1;var a=$("[name='_from']"),b=$("[name='_to']"),d=$("input[name='_subject']"),e=$("[name='_message']").get(0),
-f="1"==$("input[name='_is_html']").val(),g=["cc","bcc","replyto","followupto"],h,k=this.opener();k&&"compose"==k.env.action&&(setTimeout(function(){opener.history.back()},100),this.env.opened_extwin=!0);0<this.env.autocomplete_threads&&(h={threads:this.env.autocomplete_threads,sources:this.env.autocomplete_sources});this.init_address_input_events(b,h);for(var l in g)this.init_address_input_events($("[name='_"+g[l]+"']"),h);f||(this.set_caret_pos(e,this.env.top_posting?0:$(e).val().length),"select-one"==
-a.prop("type")&&!this.env.opened_extwin&&this.change_identity(a[0]));""==b.val()?b.focus():""==d.val()?d.focus():e&&e.focus();this.env.compose_focus_elem=document.activeElement;this.compose_field_hash(!0);this.auto_save_start()};this.init_address_input_events=function(a,b){this.env.recipients_delimiter=this.env.recipients_separator+" ";a[bw.ie||bw.safari||bw.chrome?"keydown":"keypress"](function(a){return l.ksearch_keydown(a,this,b)}).attr("autocomplete","off")};this.submit_messageform=function(a){var b=
-this.gui_objects.messageform;if(b){var d=this.set_busy(!0,a?"savingmessage":"sendingmessage"),e=this.spellcheck_lang(),f=[];$("li",this.gui_objects.attachmentlist).each(function(){f.push(this.id.replace(/^rcmfile/,""))});$('input[name="_attachments"]',b).val(f.join());b.target="savetarget";b._draft.value=a?"1":"";b.action=this.add_url(b.action,"_unlock",d);b.action=this.add_url(b.action,"_lang",e);this.submit_timer=setTimeout(function(){l.set_busy(!1,null,d);l.display_message(l.get_label("requesttimedout"),
-"error")},1E3*this.env.request_timeout);b.submit()}};this.compose_recipient_select=function(a){this.enable_command("add-recipient",0<a.selection.length)};this.compose_add_recipient=function(a){var b=[],d=$("#_"+a);if(this.contact_list&&this.contact_list.selection.length)for(var e,f=0;f<this.contact_list.selection.length;f++)if((e=this.contact_list.selection[f])&&this.env.contactdata[e])if(b.push(this.env.contactdata[e]),"E"==e.charAt(0)&&0>this.env.contactdata[e].indexOf("@")&&d.length){var g=e.substr(1);
-this.group2expand[g]={name:this.env.contactdata[e],input:d.get(0)};this.http_request("group-expand",{_source:this.env.source,_gid:g},!1)}b.length&&d.length&&(e=d.val(),d.val((e?e+this.env.recipients_delimiter:"")+b.join(this.env.recipients_delimiter)),this.triggerEvent("add-recipient",{field:a,recipients:b}))};this.check_compose_input=function(a){var b,d=$("[name='_to']"),e=$("[name='_cc']"),f=$("[name='_bcc']"),g=$("[name='_from']"),h=$("[name='_subject']"),k=$("[name='_message']");if("text"==g.prop("type")&&
-!rcube_check_email(g.val(),!0))return alert(this.get_label("nosenderwarning")),g.focus(),!1;e=d.val()?d.val():e.val()?e.val():f.val();if(!rcube_check_email(e.replace(/^\s+/,"").replace(/[\s,;]+$/,""),!0))return alert(this.get_label("norecipientwarning")),d.focus(),!1;for(var p in this.env.attachments)if("object"===typeof this.env.attachments[p]&&!this.env.attachments[p].complete)return alert(this.get_label("notuploadedwarning")),!1;if(""==h.val()){b=$('<div class="prompt">').html('<div class="message">'+
-this.get_label("nosubjectwarning")+"</div>").appendTo(document.body);var m=$("<input>").attr("type","text").attr("size",30).appendTo(b).val(this.get_label("nosubject")),d={};d[this.get_label("cancel")]=function(){h.focus();$(this).dialog("close")};d[this.get_label("sendmessage")]=function(){h.val(m.val());$(this).dialog("close");l.command(a,{nocheck:!0})};b.dialog({modal:!0,resizable:!1,buttons:d,close:function(a,b){$(this).remove()}});m.select();return!1}this.stop_spellchecking();window.tinyMCE&&
-(b=tinyMCE.get(this.env.composebody));if(!b&&""==k.val()&&!confirm(this.get_label("nobodywarning")))return k.focus(),!1;if(b){if(!b.getContent()&&!confirm(this.get_label("nobodywarning")))return b.focus(),!1;tinyMCE.triggerSave()}return!0};this.toggle_editor=function(a){this.stop_spellchecking();if("html"==a.mode)this.plain2html($("#"+a.id).val(),a.id),tinyMCE.execCommand("mceAddControl",!1,a.id),this.env.default_font&&setTimeout(function(){$(tinyMCE.get(a.id).getBody()).css("font-family",rcmail.env.default_font)},
-500);else{var b;if(b=tinyMCE.get(a.id).getContent()){if(!confirm(this.get_label("editorwarning")))return!1;this.html2plain(b,a.id)}tinyMCE.execCommand("mceRemoveControl",!1,a.id)}return!0};this.stop_spellchecking=function(){var a;window.tinyMCE&&(a=tinyMCE.get(this.env.composebody))?a.plugins&&(a.plugins.spellchecker&&a.plugins.spellchecker.active)&&a.execCommand("mceSpellCheck"):(a=this.env.spellcheck)&&a.state&&("ready"!=a.state&&"no_error_found"!=a.state)&&$(a.spell_span).trigger("click");this.spellcheck_state()};
-this.spellcheck_state=function(){var a,b;if(window.tinyMCE&&(a=tinyMCE.get(this.env.composebody))&&a.plugins&&a.plugins.spellchecker)b=a.plugins.spellchecker.active;else if((a=this.env.spellcheck)&&a.state)b="ready"!=a.state&&"no_error_found"!=a.state;if(rcmail.buttons.spellcheck)$("#"+rcmail.buttons.spellcheck[0].id)[b?"addClass":"removeClass"]("selected");return b};this.spellcheck_lang=function(){var a;if(window.tinyMCE&&(a=tinyMCE.get(this.env.composebody))&&a.plugins&&a.plugins.spellchecker)return a.plugins.spellchecker.selectedLang;
-if(this.env.spellcheck)return GOOGIE_CUR_LANG};this.spellcheck_lang_set=function(a){var b;window.tinyMCE&&(b=tinyMCE.get(this.env.composebody))&&b.plugins?b.plugins.spellchecker.selectedLang=a:this.env.spellcheck&&this.env.spellcheck.setCurrentLanguage(a)};this.spellcheck_resume=function(a,b){if(a){var d=tinyMCE.get(this.env.composebody),e=d.plugins.spellchecker;e.active=1;e._markWords(b);d.nodeChanged()}else{var e=this.env.spellcheck;e.prepare(!1,!0);e.processData(b)}this.spellcheck_state()};this.set_draft_id=
-function(a){var b;!this.env.draft_id&&a&&(b=this.opener())&&"mail"==b.env.task&&(""==b.env.action&&b.env.mailbox==this.env.drafts_mailbox)&&b.command("checkmail");this.env.draft_id=a;$("input[name='_draft_saveid']").val(a)};this.auto_save_start=function(){this.env.draft_autosave&&(this.save_timer=setTimeout(function(){l.command("savedraft")},1E3*this.env.draft_autosave));this.busy=!1};this.compose_field_hash=function(a){var b,d,e,f="",g=["to","cc","bcc","subject"];for(d=0;d<g.length;d++)if(e=$('[name="_'+
-g[d]+'"]').val())f+=e+":";f=window.tinyMCE&&(b=tinyMCE.get(this.env.composebody))?f+b.getContent():f+$("[name='_message']").val();if(this.env.attachments)for(var h in this.env.attachments)f+=h;a&&(this.cmp_hash=f);return f};this.change_identity=function(a,b){if(!a||!a.options)return!1;b||(b=this.env.show_sig);var d;d=-1;var e=a.options[a.selectedIndex].value,f=$("[name='_message']"),g=f.val(),h="1"==$("input[name='_is_html']").val(),k=this.env.identity;this.env.signatures&&this.env.signatures[e]?
-(this.enable_command("insert-sig",!0),this.env.compose_commands.push("insert-sig")):this.enable_command("insert-sig",!1);h?b&&this.env.signatures&&(d=tinyMCE.get(this.env.composebody),f=d.dom.get("_rc_sig"),f||(g=d.getBody(),k=d.getDoc(),f=k.createElement("div"),f.setAttribute("id","_rc_sig"),this.env.top_posting?(d.getWin().focus(),d=d.selection.getNode(),"BODY"==d.nodeName?(g.insertBefore(f,g.firstChild),g.insertBefore(k.createElement("br"),g.firstChild)):(g.insertBefore(f,d.nextSibling),g.insertBefore(k.createElement("br"),
-d.nextSibling))):(bw.ie&&g.appendChild(k.createElement("br")),g.appendChild(f))),this.env.signatures[e]&&(f.innerHTML=this.env.signatures[e].html)):(b&&(k&&this.env.signatures&&this.env.signatures[k])&&(k=this.env.signatures[k].text,k=k.replace(/\r\n/g,"\n"),d=this.env.top_posting?g.indexOf(k):g.lastIndexOf(k),0<=d&&(g=g.substring(0,d)+g.substring(d+k.length,g.length))),b&&this.env.signatures&&this.env.signatures[e]?(k=this.env.signatures[e].text,k=k.replace(/\r\n/g,"\n"),this.env.top_posting?0<=
-d?(g=g.substring(0,d)+k+g.substring(d,g.length),d-=1):g?(pos=this.get_caret_pos(f.get(0)))?(g=g.substring(0,pos)+"\n"+k+"\n\n"+g.substring(pos,g.length),d=pos):(d=0,g="\n\n"+k+"\n\n"+g.replace(/^[\r\n]+/,"")):(d=0,g="\n\n"+k):(g=g.replace(/[\r\n]+$/,""),d=!this.env.top_posting&&g.length?g.length+1:0,g+="\n\n"+k)):d=this.env.top_posting?0:g.length,f.val(g),this.set_caret_pos(f.get(0),d));this.env.identity=e;return!0};this.upload_file=function(a){if(!a)return!1;var b=0,d=0;$("input[type=file]",a).each(function(a,
-e){var f=e.files?e.files.length:e.value?1:0;if(e.files)for(a=0;a<f;a++)b+=e.files[a].size;d+=f});if(d){if(this.env.max_filesize&&this.env.filesizeerror&&b>this.env.max_filesize){this.display_message(this.env.filesizeerror,"error");return}var e=this.async_upload_form(a,"upload",function(a){var b,d="";try{this.contentDocument?b=this.contentDocument:this.contentWindow&&(b=this.contentWindow.document),d=b.childNodes[0].innerHTML}catch(e){}if(!d.match(/add2attachment/)&&(!bw.opera||rcmail.env.uploadframe&&
-rcmail.env.uploadframe==a.data.ts))d.match(/display_message/)||rcmail.display_message(rcmail.get_label("fileuploaderror"),"error"),rcmail.remove_from_attachment_list(a.data.ts);bw.opera&&(rcmail.env.uploadframe=a.data.ts)}),f="<span>"+this.get_label("uploading"+(1<d?"many":""))+"</span>",g=e.replace(/^rcmupload/,"");this.add2attachment_list(g,{name:"",html:f,classname:"uploading",frame:e,complete:!1});this.env.upload_progress_time&&this.upload_progress_start("upload",g)}this.gui_objects.attachmentform=
-a;return!0};this.add2attachment_list=function(a,b,d){if(!this.gui_objects.attachmentlist)return!1;!b.complete&&l.env.loadingicon&&(b.html='<img src="'+l.env.loadingicon+'" alt="" class="uploading" />'+b.html);!b.complete&&b.frame&&(b.html='<a title="'+this.get_label("cancel")+'" onclick="return rcmail.cancel_attachment_upload(\''+a+"', '"+b.frame+'\');" href="#cancelupload" class="cancelupload">'+(this.env.cancelicon?'<img src="'+this.env.cancelicon+'" alt="" />':this.get_label("cancel"))+"</a>"+
-b.html);var e,f=$("<li>").attr("id",a).addClass(b.classname).html(b.html);d&&(e=document.getElementById(d))?f.replaceAll(e):f.appendTo(this.gui_objects.attachmentlist);d&&this.env.attachments[d]&&delete this.env.attachments[d];this.env.attachments[a]=b;return!0};this.remove_from_attachment_list=function(a){delete this.env.attachments[a];$("#"+a).remove()};this.remove_attachment=function(a){a&&this.env.attachments[a]&&this.http_post("remove-attachment",{_id:this.env.compose_id,_file:a});return!0};
-this.cancel_attachment_upload=function(a,b){if(!a||!b)return!1;this.remove_from_attachment_list(a);$("iframe[name='"+b+"']").remove();return!1};this.upload_progress_start=function(a,b){setTimeout(function(){rcmail.http_request(a,{_progress:b})},1E3*this.env.upload_progress_time)};this.upload_progress_update=function(a){var b=$("#"+a.name+"> span");b.length&&a.text&&(b.text(a.text),a.done||this.upload_progress_start(a.action,a.name))};this.add_contact=function(a){a&&this.http_post("addcontact",{_address:a});
-return!0};this.qsearch=function(a){if(""!=a){var b=this.set_busy(!0,"searching");a=this.search_params(a);this.message_list?this.clear_message_list():this.contact_list&&this.list_contacts_clear();this.env.source&&(a._source=this.env.source);this.env.group&&(a._gid=this.env.group);this.env.current_page=1;a=this.http_request("compose"==this.env.action&&this.contact_list?"search-contacts":"search",a,b);this.env.qsearch={lock:b,request:a}}};this.search_params=function(a,b){var d,e={},f=[],g=this.env.search_mods,
-h=this.env.mailbox;!b&&this.gui_objects.search_filter&&(b=this.gui_objects.search_filter.value);!a&&this.gui_objects.qsearchbox&&(a=this.gui_objects.qsearchbox.value);b&&(e._filter=b);if(a&&(e._q=a,g&&this.message_list&&(g=g[h]?g[h]:g["*"]),g)){for(d in g)f.push(d);e._headers=f.join(",")}h&&(e._mbox=h);return e};this.reset_qsearch=function(){this.gui_objects.qsearchbox&&(this.gui_objects.qsearchbox.value="");this.env.qsearch&&this.abort_request(this.env.qsearch);this.env.qsearch=null;this.env.search_request=
-null;this.env.search_id=null};this.sent_successfully=function(a,b,d){this.display_message(b,a);if(this.env.extwin){var e=this.opener();this.lock_form(this.gui_objects.messageform);e&&(e.display_message(b,a),d&&("mail"==e.env.task&&""==e.env.action&&e.env.mailbox==d)&&e.command("checkmail"));setTimeout(function(){window.close()},1E3)}else setTimeout(function(){l.list_mailbox()},500)};this.ksearch_keydown=function(a,b,d){this.ksearch_timer&&clearTimeout(this.ksearch_timer);var e=rcube_event.get_keycode(a),
-f=rcube_event.get_modifier(a);switch(e){case 38:case 40:if(!this.ksearch_visible())break;e=38==e?1:0;b=document.getElementById("rcmksearchSelected");b||(b=this.ksearch_pane.__ul.firstChild);b&&this.ksearch_select(e?b.previousSibling:b.nextSibling);return rcube_event.cancel(a);case 9:if(f==SHIFT_KEY||!this.ksearch_visible()){this.ksearch_hide();return}case 13:if(!this.ksearch_visible())return!1;this.insert_recipient(this.ksearch_selected);this.ksearch_hide();return rcube_event.cancel(a);case 27:this.ksearch_hide();
-return;case 37:case 39:if(f!=SHIFT_KEY)return}this.ksearch_timer=setTimeout(function(){l.ksearch_get_results(d)},200);this.ksearch_input=b;return!0};this.ksearch_visible=function(){return null!==this.ksearch_selected&&void 0!==this.ksearch_selected&&this.ksearch_value};this.ksearch_select=function(a){var b=$("#rcmksearchSelected");b[0]&&a&&b.removeAttr("id").removeClass("selected");a&&($(a).attr("id","rcmksearchSelected").addClass("selected"),this.ksearch_selected=a._rcm_id)};this.insert_recipient=
-function(a){if(!(null===a||!this.env.contacts[a]||!this.ksearch_input)){var b=this.ksearch_input.value,d=this.get_caret_pos(this.ksearch_input),d=b.lastIndexOf(this.ksearch_value,d),e=!1,f="",g=b.substring(0,d),b=b.substring(d+this.ksearch_value.length,b.length);this.ksearch_destroy();"object"===typeof this.env.contacts[a]&&this.env.contacts[a].id?(f+=this.env.contacts[a].name+this.env.recipients_delimiter,this.group2expand[this.env.contacts[a].id]=$.extend({input:this.ksearch_input},this.env.contacts[a]),
-this.http_request("mail/group-expand",{_source:this.env.contacts[a].source,_gid:this.env.contacts[a].id},!1)):"string"===typeof this.env.contacts[a]&&(f=this.env.contacts[a]+this.env.recipients_delimiter,e=!0);this.ksearch_input.value=g+f+b;d+=f.length;this.ksearch_input.setSelectionRange&&this.ksearch_input.setSelectionRange(d,d);e&&this.triggerEvent("autocomplete_insert",{field:this.ksearch_input,insert:f})}};this.replace_group_recipients=function(a,b){this.group2expand[a]&&(this.group2expand[a].input.value=
-this.group2expand[a].input.value.replace(this.group2expand[a].name,b),this.triggerEvent("autocomplete_insert",{field:this.group2expand[a].input,insert:b}),this.group2expand[a]=null)};this.ksearch_get_results=function(a){var b=this.ksearch_input?this.ksearch_input.value:null;if(null!==b){this.ksearch_pane&&this.ksearch_pane.is(":visible")&&this.ksearch_pane.hide();var d=this.get_caret_pos(this.ksearch_input),e=b.lastIndexOf(this.env.recipients_separator,d-1),b=b.substring(e+1,d),e=this.env.autocomplete_min_length,
-d=this.ksearch_data,b=$.trim(b);if(b!=this.ksearch_value)if(this.ksearch_destroy(),b.length&&b.length<e)this.ksearch_info||(this.ksearch_info=this.display_message(this.get_label("autocompletechars").replace("$min",e)));else if(e=this.ksearch_value,this.ksearch_value=b,b.length&&(!e||!e.length||!(0==b.indexOf(e)&&(!d||0>=d.num)&&this.env.contacts&&!this.env.contacts.length))){var f,g,e=(new Date).getTime(),b={_search:b,_id:e},d=a&&a.threads?a.threads:1;f=a&&a.sources?a.sources:[];a=a&&a.action?a.action:
-"mail/autocomplete";this.ksearch_data={id:e,sources:f.slice(),action:a,locks:[],requests:[],num:f.length};for(e=0;e<d;e++){f=this.ksearch_data.sources.shift();if(1<d&&void 0===f)break;b._source=f?f:"";f=this.display_message(this.get_label("searching"),"loading");g=this.http_post(a,b,f);this.ksearch_data.locks.push(f);this.ksearch_data.requests.push(g)}}}};this.ksearch_query_results=function(a,b,d){if(this.ksearch_value&&!(this.ksearch_input&&b!=this.ksearch_value)){var e,f,g,h,k,p=this.ksearch_value;
-b=this.ksearch_data;var m=this.env.autocomplete_max?this.env.autocomplete_max:15;this.ksearch_pane||(g=$("<ul>"),this.ksearch_pane=$("<div>").attr("id","rcmKSearchpane").css({position:"absolute","z-index":3E4}).append(g).appendTo(document.body),this.ksearch_pane.__ul=g[0]);g=this.ksearch_pane.__ul;d&&this.ksearch_pane.data("reqid")==d?m-=g.childNodes.length:(this.ksearch_pane.data("reqid",d),g.innerHTML="",this.env.contacts=[],e=$(this.ksearch_input).offset(),this.ksearch_pane.css({left:e.left+"px",
-top:e.top+this.ksearch_input.offsetHeight+"px",display:"none"}));if(a&&(f=a.length))for(e=0;e<f&&0<m;e++)k="object"===typeof a[e]?a[e].name:a[e],h=document.createElement("LI"),h.innerHTML=k.replace(RegExp("("+RegExp.escape(p)+")","ig"),"##$1%%").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/##([^%]+)%%/g,"<b>$1</b>"),h.onmouseover=function(){l.ksearch_select(this)},h.onmouseup=function(){l.ksearch_click(this)},h._rcm_id=this.env.contacts.length+e,g.appendChild(h),m-=1;g.childNodes.length&&(this.ksearch_pane.show(),
-this.env.contacts.length||($("li:first",g).attr("id","rcmksearchSelected").addClass("selected"),this.ksearch_selected=0));f&&(this.env.contacts=this.env.contacts.concat(a));if(b.id==d)if(b.num--,0<m&&b.sources.length){if(a=b.sources.shift())a={_search:p,_id:d,_source:a},d=this.display_message(this.get_label("searching"),"loading"),b=this.http_post(b.action,a,d),this.ksearch_data.locks.push(d),this.ksearch_data.requests.push(b)}else m||(this.ksearch_msg||(this.ksearch_msg=this.display_message(this.get_label("autocompletemore"))),
-this.ksearch_abort())}};this.ksearch_click=function(a){this.ksearch_input&&this.ksearch_input.focus();this.insert_recipient(a._rcm_id);this.ksearch_hide()};this.ksearch_blur=function(){this.ksearch_timer&&clearTimeout(this.ksearch_timer);this.ksearch_input=null;this.ksearch_hide()};this.ksearch_hide=function(){this.ksearch_selected=null;this.ksearch_value="";this.ksearch_pane&&this.ksearch_pane.hide();this.ksearch_destroy()};this.ksearch_destroy=function(){this.ksearch_abort();this.ksearch_info&&
-this.hide_message(this.ksearch_info);this.ksearch_msg&&this.hide_message(this.ksearch_msg);this.ksearch_msg=this.ksearch_info=this.ksearch_data=null};this.ksearch_abort=function(){var a,b,d=this.ksearch_data;if(d){a=0;for(b=d.locks.length;a<b;a++)this.abort_request({request:d.requests[a],lock:d.locks[a]})}};this.contactlist_keypress=function(a){a.key_pressed==a.DELETE_KEY&&this.command("delete")};this.contactlist_select=function(a){this.preview_timer&&clearTimeout(this.preview_timer);var b,d,e,f=
-this,g=!1;e=this.env.source?this.env.address_sources[this.env.source]:null;(d=a.get_single_selection())?this.preview_timer=setTimeout(function(){f.load_contact(d,"show")},200):this.env.contentframe&&this.show_contentframe(!1);if(a.selection.length)if(this.env.selection_sources=[],e)this.env.selection_sources.push(this.env.source),g=!e.readonly;else{for(b in a.selection)if((e=String(a.selection[b]).replace(/^[^-]+-/,""))&&this.env.address_sources[e])g=g||!this.env.address_sources[e].readonly,this.env.selection_sources.push(e);
-this.env.selection_sources=$.unique(this.env.selection_sources)}this.enable_command("group-remove-selected",this.env.group&&0<a.selection.length);this.enable_command("compose",this.env.group||0<a.selection.length);this.enable_command("edit",d&&g);this.enable_command("delete",a.selection.length&&g);return!1};this.list_contacts=function(a,b,d){var e,f={},g=window;a||(a=this.env.source);if(d&&this.current_page==d&&a==this.env.source&&b==this.env.group)return!1;a!=this.env.source?(d=this.env.current_page=
-1,this.reset_qsearch()):b!=this.env.group&&(d=this.env.current_page=1);this.env.search_id?e="S"+this.env.search_id:this.env.search_request||(e=b?"G"+a+b:a);this.select_folder(e);this.env.source=a;this.env.group=b;if(this.gui_objects.contactslist)this.list_contacts_remote(a,b,d);else{if(e=this.get_frame_window(this.env.contentframe))g=e,f._framed=1;b&&(f._gid=b);d&&(f._page=d);a&&(f._source=a);this.env.search_request&&(f._search=this.env.search_request);this.set_busy(!0,"loading");this.location_href(f,
-g)}};this.list_contacts_remote=function(a,b,d){this.list_contacts_clear();var e={},f=this.set_busy(!0,"loading");a&&(e._source=a);d&&(e._page=d);b&&(e._gid=b);this.env.source=a;this.env.group=b;this.env.search_request&&(e._search=this.env.search_request);this.http_request("mail"==this.env.task?"list-contacts":"list",e,f)};this.list_contacts_clear=function(){this.contact_list.clear(!0);this.show_contentframe(!1);this.enable_command("delete",!1);this.enable_command("compose",this.env.group?!0:!1)};
-this.load_contact=function(a,b,d){var e,f={},g=window;if(e=this.get_frame_window(this.env.contentframe))f._framed=1,g=e,this.show_contentframe(!0),a||(this.contact_list.clear_selection(),this.enable_command("delete","compose",!1));else if(d)return!1;if(b&&(a||"add"==b)&&!this.drag_active)this.env.group&&(f._gid=this.env.group),f._action=b,f._source=this.env.source,f._cid=a,this.location_href(f,g,!0);return!0};this.group_member_change=function(a,b,d,e){a="add"==a?"add":"del";var f=this.get_label("add"==
-a?"addingmember":"removingmember"),f=this.display_message(f,"loading");this.http_post("group-"+a+"members",{_cid:b,_source:d,_gid:e},f)};this.copy_contact=function(a,b){var d="group"==b.type?b.source:b.id,e=this.env.source,f=this.env.group?this.env.group:"";a||(a=this.contact_list.get_selection().join(","));a&&(this.env.address_sources[d]&&!this.env.address_sources[d].readonly)&&(""==e&&1==this.env.selection_sources.length&&(e=this.env.selection_sources[0]),"group"==b.type?d==e?this.group_member_change("add",
-a,d,b.id):(e=this.display_message(this.get_label("copyingcontact"),"loading"),d={_cid:a,_source:this.env.source,_to:d,_togid:b.id,_gid:f},this.http_post("copy",d,e)):b.id!=e&&(e=this.display_message(this.get_label("copyingcontact"),"loading"),d={_cid:a,_source:this.env.source,_to:b.id,_gid:f},this.http_post("copy",d,e)))};this.delete_contacts=function(){var a=this.contact_list.get_selection(),b=this.env.source&&this.env.address_sources[this.env.source].undelete;if(!(!a.length&&!this.env.cid||!b&&
-!confirm(this.get_label("deletecontactconfirm")))){var d,e=[],f={_source:this.env.source,_from:this.env.action?this.env.action:""},g=this.display_message(this.get_label("contactdeleting"),"loading");if(this.env.cid)e.push(this.env.cid);else{for(d=0;d<a.length;d++)b=a[d],e.push(b),this.contact_list.remove_row(b,d==a.length-1);1==a.length&&this.show_contentframe(!1)}f._cid=e.join(",");this.env.group&&(f._gid=this.env.group);this.env.search_request&&(f._search=this.env.search_request);this.http_post("delete",
-f,g);return!0}};this.update_contact_row=function(a,b,d,e){var f,g=this.contact_list;a=this.html_identifier(a);g.rows[a]||(a=a+"-"+e,d&&(d=d+"-"+e));if(g.rows[a]&&(f=g.rows[a].obj)){for(e=0;e<b.length;e++)f.cells[e]&&$(f.cells[e]).html(b[e]);d&&(d=this.html_identifier(d),f.id="rcmrow"+d,g.remove_row(a),g.init_row(f),g.selection[0]=d,f.style.display="")}};this.add_contact_row=function(a,b,d){if(!this.gui_objects.contactslist)return!1;var e,f=this.contact_list,g=document.createElement("tr");g.id="rcmrow"+
-this.html_identifier(a);g.className="contact "+(d||"");f.in_selection(a)&&(g.className+=" selected");for(e in b)a=document.createElement("td"),a.className=String(e).toLowerCase(),a.innerHTML=b[e],g.appendChild(a);f.insert_row(g);this.enable_command("export",0<f.rowcount)};this.init_contact_form=function(){var a=this,b;if(this.env.coltypes)for(b in this.set_photo_actions($("#ff_photo").val()),this.env.coltypes)this.init_edit_field(b,null);$(".contactfieldgroup .row a.deletebutton").click(function(){a.delete_edit_field(this);
-return!1});$("select.addfieldmenu").change(function(b){a.insert_edit_field($(this).val(),$(this).attr("rel"),this);this.selectedIndex=0});$.datepicker&&this.env.date_format&&($.datepicker.setDefaults({dateFormat:this.env.date_format,changeMonth:!0,changeYear:!0,yearRange:"-100:+10",showOtherMonths:!0,selectOtherMonths:!0,onSelect:function(a){$(this).focus().val(a)}}),$("input.datepicker").datepicker());$("input[type='text']:visible").first().focus();"search"==this.env.action&&$(this.gui_objects.editform).append($('<input type="submit">').hide()).submit(function(){$("input.mainaction").click();
-return!1})};this.group_create=function(){this.add_input_row("contactgroup")};this.group_rename=function(){if(this.env.group&&this.gui_objects.folderlist){if(!this.name_input){this.enable_command("list","listgroup",!1);this.name_input=$("<input>").attr("type","text").val(this.env.contactgroups["G"+this.env.source+this.env.group].name);this.name_input.bind("keydown",function(a){return rcmail.add_input_keydown(a)});this.env.group_renaming=!0;var a,b=this.get_folder_li(this.env.source+this.env.group,
-"rcmliG");b&&(a=b.firstChild)&&$(a).hide().before(this.name_input)}this.name_input.select().focus()}};this.group_delete=function(){if(this.env.group&&confirm(this.get_label("deletegroupconfirm"))){var a=this.set_busy(!0,"groupdeleting");this.http_post("group-delete",{_source:this.env.source,_gid:this.env.group},a)}};this.remove_group_item=function(a){var b,d="G"+a.source+a.id;if(b=this.get_folder_li(d))this.triggerEvent("group_delete",{source:a.source,id:a.id,li:b}),b.parentNode.removeChild(b),delete this.env.contactfolders[d],
-delete this.env.contactgroups[d];this.list_contacts(a.source,0)};this.add_input_row=function(a){this.gui_objects.folderlist&&(this.name_input||(this.name_input=$("<input>").attr("type","text").data("tt",a),this.name_input.bind("keydown",function(a){return rcmail.add_input_keydown(a)}),this.name_input_li=$("<li>").addClass(a).append(this.name_input),a="contactsearch"==a?$("li:last",this.gui_objects.folderlist):this.get_folder_li(this.env.source),this.name_input_li.insertAfter(a)),this.name_input.select().focus())};
-this.group_remove_selected=function(){l.http_post("group-delmembers",{_cid:this.contact_list.selection,_source:this.env.source,_gid:this.env.group})};this.remove_group_contacts=function(a){if("undefined"!=typeof this.env.group&&this.env.group===a.gid){var b=this.contact_list.get_selection();for(a=0;a<b.length;a++)id=b[a],this.contact_list.remove_row(id,a==b.length-1)}};this.add_input_keydown=function(a){var b=rcube_event.get_keycode(a),d=$(a.target);a=d.data("tt");if(13==b){if(b=d.val())d=this.set_busy(!0,
-"loading"),"contactsearch"==a?this.http_post("search-create",{_search:this.env.search_request,_name:b},d):this.env.group_renaming?this.http_post("group-rename",{_source:this.env.source,_gid:this.env.group,_name:b},d):this.http_post("group-create",{_source:this.env.source,_name:b},d);return!1}27==b&&this.reset_add_input();return!0};this.reset_add_input=function(){this.name_input&&(this.env.group_renaming&&(this.name_input.parent().children().last().show(),this.env.group_renaming=!1),this.name_input.remove(),
-this.name_input_li&&this.name_input_li.remove(),this.name_input=this.name_input_li=null);this.enable_command("list","listgroup",!0)};this.insert_contact_group=function(a){this.reset_add_input();a.type="group";var b="G"+a.source+a.id,d=$("<a>").attr("href","#").attr("rel",a.source+":"+a.id).click(function(){return rcmail.command("listgroup",a,this)}).html(a.name),d=$("<li>").attr({id:"rcmli"+this.html_identifier(b),"class":"contactgroup"}).append(d);this.env.contactfolders[b]=this.env.contactgroups[b]=
-a;this.add_contact_group_row(a,d);this.triggerEvent("group_insert",{id:a.id,source:a.source,name:a.name,li:d[0]})};this.update_contact_group=function(a){this.reset_add_input();var b="G"+a.source+a.id,d=this.get_folder_li(b),e;if(d&&a.newid){e="G"+a.source+a.newid;var f=$.extend({},a);d.id="rcmli"+this.html_identifier(e);this.env.contactfolders[e]=this.env.contactfolders[b];this.env.contactfolders[e].id=a.newid;this.env.group=a.newid;delete this.env.contactfolders[b];delete this.env.contactgroups[b];
-f.id=a.newid;f.type="group";e=$("<a>").attr("href","#").attr("rel",a.source+":"+a.newid).click(function(){return rcmail.command("listgroup",f,this)}).html(a.name);$(d).children().replaceWith(e)}else if(d&&(e=d.firstChild)&&"a"==e.tagName.toLowerCase())e.innerHTML=a.name;this.env.contactfolders[b].name=this.env.contactgroups[b].name=a.name;this.add_contact_group_row(a,$(d),!0);this.triggerEvent("group_update",{id:a.id,source:a.source,name:a.name,li:d[0],newid:a.newid})};this.add_contact_group_row=
-function(a,b,d){var e=a.name.toUpperCase(),f=this.get_folder_li(a.source);a="rcmliG"+this.html_identifier(a.source);d?(d=b.clone(!0),b.remove()):d=b;$('li[id^="'+a+'"]',this.gui_objects.folderlist).each(function(a,b){if(e>=$(this).text().toUpperCase())f=b;else return!1});d.insertAfter(f)};this.update_group_commands=function(){var a=""!=this.env.source?this.env.address_sources[this.env.source]:null;this.enable_command("group-create",a&&a.groups&&!a.readonly);this.enable_command("group-rename","group-delete",
-a&&a.groups&&this.env.group&&!a.readonly)};this.init_edit_field=function(a,b){var d=this.env.coltypes[a].label;b||(b=$(".ff_"+a));d&&b.placeholder(d)};this.insert_edit_field=function(a,b,d){var e=$("#ff_"+a);if(e.length)e.show().focus(),$(d).children('option[value="'+a+'"]').prop("disabled",!0);else{$(".ff_"+a);e=$("#contactsection"+b+" .contactcontroller"+a);if(!e.length){b=$("#contactsection"+b);var f=$(".contactfieldgroup",b).last(),e=$("<fieldset>").addClass("contactfieldgroup contactcontroller"+
-a);f.length?e.insertAfter(f):b.prepend(e)}if(e.length&&"FIELDSET"==e.get(0).nodeName){var g;b=this.env.coltypes[a];var f=$("<div>").addClass("row"),h=$("<div>").addClass("contactfieldcontent data"),k=$("<div>").addClass("contactfieldlabel label");b.subtypes_select?k.html(b.subtypes_select):k.html(b.label);var p=1!=b.limit?"[]":"";if("text"==b.type||"date"==b.type)g=$("<input>").addClass("ff_"+a).attr({type:"text",name:"_"+a+p,size:b.size}).appendTo(h),this.init_edit_field(a,g),"date"==b.type&&$.datepicker&&
-g.datepicker();else if("textarea"==b.type)g=$("<textarea>").addClass("ff_"+a).attr({name:"_"+a+p,cols:b.size,rows:b.rows}).appendTo(h),this.init_edit_field(a,g);else if("composite"==b.type){var m,n,q=[],s=[];if(g=this.env[a+"_template"])for(m=0;m<g.length;m++)q.push(g[m][1]),s.push(g[m][2]);else for(m in b.childs)q.push(m);for(var t=0;t<q.length;t++)m=q[t],g=b.childs[m],g=$("<input>").addClass("ff_"+m).attr({type:"text",name:"_"+m+p,size:g.size}).appendTo(h),h.append(s[t]||" "),this.init_edit_field(m,
-g),n||(n=g);g=n}else if("select"==b.type){g=$("<select>").addClass("ff_"+a).attr("name","_"+a+p).appendTo(h);var u=g.attr("options");u[u.length]=new Option("---","");b.options&&$.each(b.options,function(a,b){u[u.length]=new Option(b,a)})}g&&($('<a href="#del"></a>').addClass("contactfieldbutton deletebutton").attr({title:this.get_label("delete"),rel:a}).html(this.env.delbutton).click(function(){l.delete_edit_field(this);return!1}).appendTo(h),f.append(k).append(h).appendTo(e.show()),g.first().focus(),
-b.count||(b.count=0),++b.count==b.limit&&b.limit&&$(d).children('option[value="'+a+'"]').prop("disabled",!0))}}};this.delete_edit_field=function(a){var b=$(a).attr("rel"),d=this.env.coltypes[b],e=$(a).parents("fieldset.contactfieldgroup"),f=e.parent().find("select.addfieldmenu");0>=--d.count&&d.visible?$(a).parent().children("input").val("").blur():($(a).parents("div.row").remove(),e.children("div.row").length||e.hide());f.length&&(a=f.children('option[value="'+b+'"]'),a.length?a.prop("disabled",
-!1):$("<option>").attr("value",b).html(d.label).appendTo(f),f.show())};this.upload_contact_photo=function(a){a&&a.elements._photo.value&&(this.async_upload_form(a,"upload-photo",function(a){rcmail.set_busy(!1,null,rcmail.file_upload_id)}),this.file_upload_id=this.set_busy(!0,"uploading"))};this.replace_contact_photo=function(a){var b="-del-"==a?this.env.photo_placeholder:this.env.comm_path+"&_action=photo&_source="+this.env.source+"&_cid="+this.env.cid+"&_photo="+a;this.set_photo_actions(a);$(this.gui_objects.contactphoto).children("img").attr("src",
-b)};this.photo_upload_end=function(){this.set_busy(!1,null,this.file_upload_id);delete this.file_upload_id};this.set_photo_actions=function(a){var b,d=this.buttons["upload-photo"];for(b=0;d&&b<d.length;b++)$("a#"+d[b].id).html(this.get_label("-del-"==a?"addphoto":"replacephoto"));$("#ff_photo").val(a);this.enable_command("upload-photo",this.env.coltypes.photo?!0:!1);this.enable_command("delete-photo",this.env.coltypes.photo&&"-del-"!=a)};this.advanced_search=function(){var a,b={_form:1,_action:"search"},
-d=window;if(a=this.get_frame_window(this.env.contentframe))b._framed=1,d=a,this.contact_list.clear_selection();this.location_href(b,d,!0);return!0};this.unselect_directory=function(){this.select_folder("");this.enable_command("search-delete",!1)};this.insert_saved_search=function(a,b){this.reset_add_input();var d="S"+b,e=$("<a>").attr("href","#").attr("rel",b).click(function(){return rcmail.command("listsearch",b,this)}).html(a),d=$("<li>").attr({id:"rcmli"+this.html_identifier(d),"class":"contactsearch"}).append(e),
-e={name:a,id:b,li:d[0]};this.add_saved_search_row(e,d);this.select_folder("S"+b);this.enable_command("search-delete",!0);this.env.search_id=b;this.triggerEvent("abook_search_insert",e)};this.add_saved_search_row=function(a,b,d){var e,f=a.name.toUpperCase();d?(a=b.clone(!0),b.remove()):a=b;$('li[class~="contactsearch"]',this.gui_objects.folderlist).each(function(a,b){e||(e=this.previousSibling);if(f>=$(this).text().toUpperCase())e=b;else return!1});e?a.insertAfter(e):a.appendTo(this.gui_objects.folderlist)};
-this.search_create=function(){this.add_input_row("contactsearch")};this.search_delete=function(){if(this.env.search_request){var a=this.set_busy(!0,"savedsearchdeleting");this.http_post("search-delete",{_sid:this.env.search_id},a)}};this.remove_search_item=function(a){var b;if(b=this.get_folder_li("S"+a))this.triggerEvent("search_delete",{id:a,li:b}),b.parentNode.removeChild(b);this.env.search_id=null;this.env.search_request=null;this.list_contacts_clear();this.reset_qsearch();this.enable_command("search-delete",
-"search-create",!1)};this.listsearch=function(a){var b=this.set_busy(!0,"searching");this.contact_list&&this.list_contacts_clear();this.reset_qsearch();this.select_folder("S"+a);this.env.current_page=1;this.http_request("search",{_sid:a},b)};this.section_select=function(a){var b;b=a.get_single_selection();a=window;var d={_action:"edit-prefs",_section:b};if(b){if(b=this.get_frame_window(this.env.contentframe))d._framed=1,a=b;this.location_href(d,a,!0)}return!0};this.identity_select=function(a){var b;
-if(b=a.get_single_selection())this.enable_command("delete",1<a.rowcount&&2>this.env.identities_level),this.load_identity(b,"edit-identity")};this.load_identity=function(a,b){if("edit-identity"==b&&(!a||a==this.env.iid))return!1;var d,e=window,f={_action:b,_iid:a};if(d=this.get_frame_window(this.env.contentframe))f._framed=1,e=d;if(b&&(a||"add-identity"==b))this.set_busy(!0),this.location_href(f,e);return!0};this.delete_identity=function(a){var b=this.identity_list.get_selection();if(b.length||this.env.iid)return a||
-(a=this.env.iid?this.env.iid:b[0]),confirm(this.get_label("deleteidentityconfirm"))&&this.goto_url("delete-identity",{_iid:a,_token:this.env.request_token},!0),!0};this.update_identity_row=function(a,b,d){var e,f=this.identity_list;a=this.html_identifier(a);f.rows[a]&&(e=f.rows[a].obj)?$(e.cells[0]).html(b):d&&(e=$("<tr>").attr("id","rcmrow"+a).get(0),$("<td>").addClass("mail").html(b).appendTo(e),f.insert_row(e),f.select(a))};this.init_subscription_list=function(){var a=this;this.subscription_list=
-new rcube_list_widget(this.gui_objects.subscriptionlist,{multiselect:!1,draggable:!0,keyboard:!1,toggleselect:!0});this.subscription_list.addEventListener("select",function(b){a.subscription_select(b)});this.subscription_list.addEventListener("dragstart",function(b){a.drag_active=!0});this.subscription_list.addEventListener("dragend",function(b){a.subscription_move_folder(b)});this.subscription_list.row_init=function(b){b.obj.onmouseover=function(){a.focus_subscription(b.id)};b.obj.onmouseout=function(){a.unfocus_subscription(b.id)}};
-this.subscription_list.init();$("#mailboxroot").mouseover(function(){a.focus_subscription(this.id)}).mouseout(function(){a.unfocus_subscription(this.id)})};this.focus_subscription=function(a){var b,d,e=RegExp.escape(this.env.delimiter),e=RegExp("["+e+"]?[^"+e+"]+$");if(this.drag_active&&this.env.mailbox&&(b=document.getElementById(a)))if(this.env.subscriptionrows[a]&&null!==(d=this.env.subscriptionrows[a][0])&&this.check_droptarget(d)&&!this.env.subscriptionrows[this.get_folder_row_id(this.env.mailbox)][2]&&
-d!=this.env.mailbox.replace(e,"")&&!d.match(RegExp("^"+RegExp.escape(this.env.mailbox+this.env.delimiter))))this.env.dstfolder=d,$(b).addClass("droptarget")};this.unfocus_subscription=function(a){var b=$("#"+a);this.env.dstfolder=null;this.env.subscriptionrows[a]&&b[0]?b.removeClass("droptarget"):$(this.subscription_list.frame).removeClass("droptarget")};this.subscription_select=function(a){var b,d;a&&(b=a.get_single_selection())&&(d=this.env.subscriptionrows["rcmrow"+b])?(this.env.mailbox=d[0],this.show_folder(d[0]),
-this.enable_command("delete-folder",!d[2])):(this.env.mailbox=null,this.show_contentframe(!1),this.enable_command("delete-folder","purge",!1))};this.subscription_move_folder=function(a){a=RegExp.escape(this.env.delimiter);var b=RegExp("["+a+"]?[^"+a+"]+$");this.env.mailbox&&(null!==this.env.dstfolder&&this.env.dstfolder!=this.env.mailbox&&this.env.dstfolder!=this.env.mailbox.replace(b,""))&&(b=RegExp("[^"+a+"]*["+a+"]","g"),a=this.env.mailbox.replace(b,""),a=""===this.env.dstfolder?a:this.env.dstfolder+
-this.env.delimiter+a,a!=this.env.mailbox&&(this.http_post("rename-folder",{_folder_oldname:this.env.mailbox,_folder_newname:a},this.set_busy(!0,"foldermoving")),this.subscription_list.draglayer.hide()));this.drag_active=!1;this.unfocus_subscription(this.get_folder_row_id(this.env.dstfolder))};this.create_folder=function(){this.show_folder("",this.env.mailbox)};this.delete_folder=function(a){a=this.get_folder_row_id(a?a:this.env.mailbox);if((a=this.env.subscriptionrows[a][0])&&confirm(this.get_label("deletefolderconfirm"))){var b=
-this.set_busy(!0,"folderdeleting");this.http_post("delete-folder",{_mbox:a},b)}};this.add_folder_row=function(a,b,d,e,f,g){if(!this.gui_objects.subscriptionlist)return!1;var h,k,l,m,n,q=[],s=[],t=this.gui_objects.subscriptionlist.tBodies[0];h=$("tr",t).get(1);var u="rcmrow"+(new Date).getTime();if(!h)return this.goto_url("folders"),!1;h=$(h).clone(!0);h.attr("id",u);h.attr("class",g);h.find("td:first").html(b);$('input[name="_subscribed[]"]',h).val(a).prop({checked:e?!0:!1,disabled:d?!0:!1});this.env.subscriptionrows[u]=
-[a,b,0];m=[];$.each(this.env.subscriptionrows,function(a,b){m.push(b)});m.sort(function(a,b){return a[0]<b[0]?-1:a[0]>b[0]?1:0});for(k in m)m[k][2]?(b=m[k][0]+this.env.delimiter,b!=this.env.prefix_ns&&(s.push(m[k][0]),l=b)):l&&0==m[k][0].indexOf(l)?s.push(m[k][0]):(q.push(m[k][0]),l=null);for(k=0;k<s.length;k++)0==a.indexOf(s[k]+this.env.delimiter)&&(n=this.get_folder_row_id(s[k]));for(k=0;!n&&k<q.length;k++)k&&q[k]==a&&(n=this.get_folder_row_id(q[k-1]));n?$("#"+n).after(h):h.appendTo(t);this.subscription_list.clear_selection();
-f||this.init_subscription_list();h=h.get(0);h.scrollIntoView&&h.scrollIntoView();return h};this.replace_folder_row=function(a,b,d,e,f){if(!this.gui_objects.subscriptionlist)return!1;var g,h,k,l,m=this.get_folder_row_id(a),n=RegExp("^"+RegExp.escape(a));g=$('input[name="_subscribed[]"]',$("#"+m)).prop("checked");var q=this.get_subfolders(a);this._remove_folder_row(m);e=$(this.add_folder_row(b,d,e,g,!0,f));if(d=q.length)l=a.split(this.env.delimiter).length-b.split(this.env.delimiter).length;for(a=0;a<
-d;a++)if(m=q[a],g=this.env.subscriptionrows[m][0],f=this.env.subscriptionrows[m][1],h=$("#"+m),k=h.clone(!0),h.remove(),e.after(k),e=k,g=g.replace(n,b),$('input[name="_subscribed[]"]',e).val(g),this.env.subscriptionrows[m][0]=g,0!=l){if(0<l)for(g=l;0<g;g--)f=f.replace(/^&nbsp;&nbsp;&nbsp;&nbsp;/,"");else for(g=l;0>g;g++)f="&nbsp;&nbsp;&nbsp;&nbsp;"+f;e.find("td:first").html(f);this.env.subscriptionrows[m][1]=f}this.init_subscription_list()};this.remove_folder_row=function(a,b){var d,e,f=[];d=this.get_folder_row_id(a);
-b&&(f=this.get_subfolders(a));this._remove_folder_row(d);d=0;for(e=f.length;d<e;d++)this._remove_folder_row(f[d])};this._remove_folder_row=function(a){this.subscription_list.remove_row(a.replace(/^rcmrow/,""));$("#"+a).remove();delete this.env.subscriptionrows[a]};this.get_subfolders=function(a){for(var b=[],d=RegExp("^"+RegExp.escape(a)+RegExp.escape(this.env.delimiter)),e=$("#"+this.get_folder_row_id(a)).get(0);e=e.nextSibling;)if(e.id)if(a=this.env.subscriptionrows[e.id][0],d.test(a))b.push(e.id);
-else break;return b};this.subscribe=function(a){if(a){var b=this.display_message(this.get_label("foldersubscribing"),"loading");this.http_post("subscribe",{_mbox:a},b)}};this.unsubscribe=function(a){if(a){var b=this.display_message(this.get_label("folderunsubscribing"),"loading");this.http_post("unsubscribe",{_mbox:a},b)}};this.get_folder_row_id=function(a){var b,d=this.env.subscriptionrows;for(b in d)if(d[b]&&d[b][0]==a)break;return b};this.show_folder=function(a,b,d){var e=window;a="&_action=edit-folder&_mbox="+
-urlencode(a);b&&(a+="&_path="+urlencode(b));if(b=this.get_frame_window(this.env.contentframe))e=b,a+="&_framed=1";0<=String(e.location.href).indexOf(a)&&!d?this.show_contentframe(!0):this.location_href(this.env.comm_path+a,e,!0)};this.disable_subscription=function(a){(a=this.get_folder_row_id(a))&&$('input[name="_subscribed[]"]',$("#"+a)).prop("disabled",!0)};this.folder_size=function(a){var b=this.set_busy(!0,"loading");this.http_post("folder-size",{_mbox:a},b)};this.folder_size_update=function(a){$("#folder-size").replaceWith(a)};
-var v=function(a,b){var d=document.getElementById(b.id);if(d){var e=!1;"image"==b.type&&(d=d.parentNode,e=!0);d._command=a;d._id=b.id;b.sel&&(d.onmousedown=function(a){return rcmail.button_sel(this._command,this._id)},d.onmouseup=function(a){return rcmail.button_out(this._command,this._id)},e&&((new Image).src=b.sel));b.over&&(d.onmouseover=function(a){return rcmail.button_over(this._command,this._id)},d.onmouseout=function(a){return rcmail.button_out(this._command,this._id)},e&&((new Image).src=
-b.over))}};this.init_buttons=function(){for(var a in this.buttons)if("string"===typeof a)for(var b=0;b<this.buttons[a].length;b++)v(a,this.buttons[a][b]);this.set_button(this.task,"sel")};this.set_button=function(a,b){var d,e,f,g=this.buttons[a],h=g?g.length:0;for(d=0;d<h;d++)if(e=g[d],f=document.getElementById(e.id))"image"==e.type&&!e.status?(e.pas=f._original_src?f._original_src:f.src,f.runtimeStyle&&(f.runtimeStyle.filter&&f.runtimeStyle.filter.match(/src=['"]([^'"]+)['"]/))&&(e.pas=RegExp.$1)):
-e.status||(e.pas=String(f.className)),"image"==e.type&&e[b]?(e.status=b,f.src=e[b]):void 0!==e[b]&&(e.status=b,f.className=e[b]),"input"==e.type&&(e.status=b,f.disabled=!b)};this.set_alttext=function(a,b){var d,e,f,g,h=this.buttons[a],k=h?h.length:0;for(d=0;d<k;d++)e=h[d],f=document.getElementById(e.id),"image"==e.type&&f?(f.setAttribute("alt",this.get_label(b)),(g=f.parentNode)&&"a"==g.tagName.toLowerCase()&&g.setAttribute("title",this.get_label(b))):f&&f.setAttribute("title",this.get_label(b))};
-this.button_over=function(a,b){var d,e,f,g=this.buttons[a],h=g?g.length:0;for(d=0;d<h;d++)if(e=g[d],e.id==b&&"act"==e.status&&(f=document.getElementById(e.id))&&e.over)"image"==e.type?f.src=e.over:f.className=e.over};this.button_sel=function(a,b){var d,e,f,g=this.buttons[a],h=g?g.length:0;for(d=0;d<h;d++)if(e=g[d],e.id==b&&"act"==e.status){if((f=document.getElementById(e.id))&&e.sel)"image"==e.type?f.src=e.sel:f.className=e.sel;this.buttons_sel[b]=a}};this.button_out=function(a,b){var d,e,f,g=this.buttons[a],
-h=g?g.length:0;for(d=0;d<h;d++)if(e=g[d],e.id==b&&"act"==e.status&&(f=document.getElementById(e.id))&&e.act)"image"==e.type?f.src=e.act:f.className=e.act};this.set_pagetitle=function(a){a&&document.title&&(document.title=a)};this.display_message=function(a,b,d){if(this.is_framed())return parent.rcmail.display_message(a,b,d);if(!this.gui_objects.message)return"loading"!=b&&(this.pending_message=[a,b,d]),1;b=b?b:"notice";var e=this,f=this.html_identifier(a),g=b+(new Date).getTime();d||(d=this.message_time*
-("error"==b||"warning"==b?2:1));"loading"==b&&(f="loading",d=1E3*this.env.request_timeout,a||(a=this.get_label("loading")));if(this.messages[f])return this.messages[f].obj&&this.messages[f].obj.html(a),"loading"==b&&this.messages[f].labels.push({id:g,msg:a}),this.messages[f].elements.push(g),setTimeout(function(){e.hide_message(g,"loading"==b)},d),g;var h=$("<div>").addClass(b).html(a).data("key",f);$(this.gui_objects.message).append(h).show();this.messages[f]={obj:h,elements:[g]};"loading"==b?this.messages[f].labels=
-[{id:g,msg:a}]:h.click(function(){return e.hide_message(h)});this.triggerEvent("message",{message:a,type:b,timeout:d,object:h});0<d&&setTimeout(function(){e.hide_message(g,"loading"==b)},d);return g};this.hide_message=function(a,b){if(this.is_framed())return parent.rcmail.hide_message(a,b);if(this.gui_objects.message){var d,e,f,g,h=this.messages;if("object"===typeof a)$(a)[b?"fadeOut":"hide"](),g=$(a).data("key"),this.messages[g]&&delete this.messages[g];else for(d in h)for(e in h[d].elements)if(h[d]&&
-h[d].elements[e]==a)if(h[d].elements.splice(e,1),h[d].elements.length){if("loading"==d)for(f in h[d].labels)h[d].labels[f].id==a?delete h[d].labels[f]:g=h[d].labels[f].msg,h[d].obj.html(g)}else h[d].obj[b?"fadeOut":"hide"](),delete h[d]}};this.clear_messages=function(){if(this.is_framed())return parent.rcmail.clear_messages();var a,b,d=this.messages;for(a in d)for(b in d[a].elements)d[a].obj&&d[a].obj.hide();this.messages={}};this.show_popup_dialog=function(a,b){if(this.is_framed())parent.rcmail.show_popup_dialog(a,
-b);else{var d=$('<div class="popup">').html(a).dialog({title:b,modal:!0,resizable:!0,width:580,close:function(a,b){$(this).remove()}}),e=$(window),f=e.width(),e=e.height(),g=d.width(),h=d.height();d.dialog("option",{height:Math.min(e-40,h+50),width:Math.min(f-20,g+50)}).dialog("option","position",["center","center"])}};this.set_page_buttons=function(){this.enable_command("nextpage","lastpage",this.env.pagecount>this.env.current_page);this.enable_command("previouspage","firstpage",1<this.env.current_page)};
-this.select_folder=function(a,b,d){if(this.gui_objects.folderlist){var e,f;(e=$("li.selected",this.gui_objects.folderlist))&&e.removeClass("selected").addClass("unfocused");(f=this.get_folder_li(a,b,d))&&$(f).removeClass("unfocused").addClass("selected");this.triggerEvent("selectfolder",{folder:a,prefix:b})}};this.mark_folder=function(a,b,d,e){$(this.get_folder_li(a,d,e)).addClass(b)};this.unmark_folder=function(a,b,d,e){$(this.get_folder_li(a,d,e)).removeClass(b)};this.get_folder_li=function(a,b,
-d){b||(b="rcmli");return this.gui_objects.folderlist?(a=this.html_identifier(a,d),document.getElementById(b+a)):null};this.set_message_coltypes=function(a,b,d){var e=this.message_list,f=e?e.list.tHead:null,g,h,k;this.env.coltypes=a;if(f){if(b){g=document.createElement("thead");k=document.createElement("tr");c=0;for(h=b.length;c<h;c++)a=document.createElement("td"),a.innerHTML=b[c].html,b[c].id&&(a.id=b[c].id),b[c].className&&(a.className=b[c].className),k.appendChild(a);g.appendChild(k);f.parentNode.replaceChild(g,
-f);f=g}g=0;for(h=this.env.coltypes.length;g<h;g++)if(b=this.env.coltypes[g],(a=f.rows[0].cells[g])&&("from"==b||"to"==b||"fromto"==b))a.id="rcm"+b,$("span,a",a).text(this.get_label("fromto"==b?d:b)),$("a",a).click(function(){return rcmail.command("sort",this.id.replace(/^rcm/,""),this)})}this.env.subject_col=null;this.env.flagged_col=null;this.env.status_col=null;if(0<=(g=$.inArray("subject",this.env.coltypes)))this.env.subject_col=g,e&&(e.subject_col=g);if(0<=(g=$.inArray("flag",this.env.coltypes)))this.env.flagged_col=
-g;if(0<=(g=$.inArray("status",this.env.coltypes)))this.env.status_col=g;e&&e.init_header()};this.set_rowcount=function(a,b){if(b&&b!=this.env.mailbox)return!1;$(this.gui_objects.countdisplay).html(a);this.set_page_buttons()};this.set_mailboxname=function(a){this.gui_objects.mailboxname&&a&&(this.gui_objects.mailboxname.innerHTML=a)};this.set_quota=function(a){this.gui_objects.quotadisplay&&(a&&"text"==a.type)&&$(this.gui_objects.quotadisplay).html(a.percent+"%").attr("title",a.title);this.triggerEvent("setquota",
-a);this.env.quota_content=a};this.set_unread_count=function(a,b,d,e){if(!this.gui_objects.mailboxlist)return!1;this.env.unread_counts[a]=b;this.set_unread_count_display(a,d);e?this.mark_folder(a,e,"",!0):b||this.unmark_folder(a,"recent","",!0)};this.set_unread_count_display=function(a,b){var d,e,f,g,h;if(f=this.get_folder_li(a,"",!0)){g=this.env.unread_counts[a]?this.env.unread_counts[a]:0;e=$(f).children("a").eq(0);d=e.children("span.unreadcount");!d.length&&g&&(d=$("<span>").addClass("unreadcount").appendTo(e));
-e=0;if((h=f.getElementsByTagName("div")[0])&&h.className.match(/collapsed/))for(var k in this.env.unread_counts)0==k.indexOf(a+this.env.delimiter)&&(e+=this.env.unread_counts[k]);g&&d.length?d.html(this.env.unreadwrap.replace(/%[sd]/,g)):d.length&&d.remove();d=RegExp(RegExp.escape(this.env.delimiter)+"[^"+RegExp.escape(this.env.delimiter)+"]+$");a.match(d)&&this.set_unread_count_display(a.replace(d,""),!1);0<g+e?$(f).addClass("unread"):$(f).removeClass("unread")}d=/^\([0-9]+\)\s+/i;b&&document.title&&
-(f="",f=String(document.title),f=g&&f.match(d)?f.replace(d,"("+g+") "):g?"("+g+") "+f:f.replace(d,""),this.set_pagetitle(f))};this.set_headers=function(a){this.gui_objects.all_headers_row&&(this.gui_objects.all_headers_box&&a)&&$(this.gui_objects.all_headers_box).html(a).show()};this.show_headers=function(a,b){if(this.gui_objects.all_headers_row&&(this.gui_objects.all_headers_box&&this.env.uid)&&($(b).removeClass("show-headers").addClass("hide-headers"),$(this.gui_objects.all_headers_row).show(),
-b.onclick=function(){rcmail.command("hide-headers","",b)},!this.gui_objects.all_headers_box.innerHTML)){var d=this.display_message(this.get_label("loading"),"loading");this.http_post("headers",{_uid:this.env.uid},d)}};this.hide_headers=function(a,b){this.gui_objects.all_headers_row&&this.gui_objects.all_headers_box&&($(b).removeClass("hide-headers").addClass("show-headers"),$(this.gui_objects.all_headers_row).hide(),b.onclick=function(){rcmail.command("show-headers","",b)})};this.html2plain=function(a,
-b){var d=this,e=this.set_busy(!0,"converting");this.log("HTTP POST: ?_task=utils&_action=html2text");$.ajax({type:"POST",url:"?_task=utils&_action=html2text",data:a,contentType:"application/octet-stream",error:function(a,b,h){d.http_error(a,b,h,e)},success:function(a){d.set_busy(!1,null,e);$("#"+b).val(a);d.log(a)}})};this.plain2html=function(a,b){var d=this.set_busy(!0,"converting");a=a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");$("#"+b).val(a?"<pre>"+a+"</pre>":"");this.set_busy(!1,
-null,d)};this.url=function(a,b){var d="string"===typeof b?"&"+b:"";if("string"!==typeof a)b=a;else if(!b||"object"!==typeof b)b={};b._action=a?a:this.env.action;var e=this.env.comm_path,f,g={};b._action.match(/([a-z]+)\/([a-z0-9-_.]+)/)&&(b._action=RegExp.$2,e=e.replace(/\_task=[a-z]+/,"_task="+RegExp.$1));for(f in b)void 0!==b[f]&&null!==b[f]&&(g[f]=b[f]);return e+"&"+$.param(g)+d};this.redirect=function(a,b){(b||null===b)&&this.set_busy(!0);this.is_framed()?parent.rcmail.redirect(a,b):(this.env.extwin&&
-("string"==typeof a?a+=(0>a.indexOf("?")?"?":"&")+"_extwin=1":a._extwin=1),this.location_href(a,window))};this.goto_url=function(a,b,d){this.redirect(this.url(a,b))};this.location_href=function(a,b,d){d&&this.lock_frame();"object"==typeof a&&(a=this.env.comm_path+"&"+$.param(a));bw.ie&&b==window?$("<a>").attr("href",a).appendTo(document.body).get(0).click():b.location.href=a;this.start_keepalive()};this.http_request=function(a,b,d){var e=this.url(a,b);b=this.triggerEvent("request"+a,b);if(void 0!==
-b&&!1===b)return!1;e+="&_remote=1";this.log("HTTP GET: "+e);this.start_keepalive();return $.ajax({type:"GET",url:e,data:{_unlock:d?d:0},dataType:"json",success:function(a){l.http_response(a)},error:function(b,e,h){l.http_error(b,e,h,d,a)}})};this.http_post=function(a,b,d){var e=this.url(a);b&&"object"===typeof b?(b._remote=1,b._unlock=d?d:0):b+=(b?"&":"")+"_remote=1"+(d?"&_unlock="+d:"");var f=this.triggerEvent("request"+a,b);if(void 0!==f){if(!1===f)return!1;b=f}this.log("HTTP POST: "+e);this.start_keepalive();
-return $.ajax({type:"POST",url:e,data:b,dataType:"json",success:function(a){l.http_response(a)},error:function(b,e,f){l.http_error(b,e,f,d,a)}})};this.abort_request=function(a){a.request&&a.request.abort();a.lock&&this.set_busy(!1,null,a.lock)};this.http_response=function(a){if(a){a.unlock&&this.set_busy(!1);this.triggerEvent("responsebefore",{response:a});this.triggerEvent("responsebefore"+a.action,{response:a});a.env&&this.set_env(a.env);if("object"===typeof a.texts)for(var b in a.texts)"string"===
-typeof a.texts[b]&&this.add_label(b,a.texts[b]);a.exec&&(this.log(a.exec),eval(a.exec));if(a.callbacks&&a.callbacks.length)for(b=0;b<a.callbacks.length;b++)this.triggerEvent(a.callbacks[b][0],a.callbacks[b][1]);switch(a.action){case "delete":if("addressbook"==this.task){var d;b=this.contact_list.get_selection();d=!1;b&&this.contact_list.rows[b]&&(d=""==this.env.source?(d=String(b).replace(/^[^-]+-/,""))&&this.env.address_sources[d]&&!this.env.address_sources[d].readonly:!this.env.address_sources[this.env.source].readonly);
-this.enable_command("compose",b&&this.contact_list.rows[b]);this.enable_command("delete","edit",d);this.enable_command("export",this.contact_list&&0<this.contact_list.rowcount)}case "moveto":"show"==this.env.action?(this.enable_command(this.env.message_commands,!0),this.env.list_post||this.enable_command("reply-list",!1)):"addressbook"==this.task&&this.triggerEvent("listupdate",{folder:this.env.source,rowcount:this.contact_list.rowcount});case "purge":case "expunge":"mail"==this.task&&(this.env.exists||
-(this.env.contentframe&&this.show_contentframe(!1),this.enable_command(this.env.message_commands,"purge","expunge","select-all","select-none","expand-all","expand-unread","collapse-all",!1)),this.message_list&&this.triggerEvent("listupdate",{folder:this.env.mailbox,rowcount:this.message_list.rowcount}));break;case "refresh":case "check-recent":case "getunread":case "search":this.env.qsearch=null;case "list":if("mail"==this.task){if(this.enable_command("show","select-all","select-none",0<this.env.messagecount),
-this.enable_command("expunge",this.env.exists),this.enable_command("purge",this.purge_mailbox_test()),this.enable_command("expand-all","expand-unread","collapse-all",this.env.threading&&this.env.messagecount),("list"==a.action||"search"==a.action)&&this.message_list)this.msglist_select(this.message_list),this.triggerEvent("listupdate",{folder:this.env.mailbox,rowcount:this.message_list.rowcount})}else if("addressbook"==this.task&&(this.enable_command("export",this.contact_list&&0<this.contact_list.rowcount),
-"list"==a.action||"search"==a.action))this.enable_command("search-create",""==this.env.source),this.enable_command("search-delete",this.env.search_id),this.update_group_commands(),this.triggerEvent("listupdate",{folder:this.env.source,rowcount:this.contact_list.rowcount})}a.unlock&&this.hide_message(a.unlock);this.triggerEvent("responseafter",{response:a});this.triggerEvent("responseafter"+a.action,{response:a});this.start_keepalive()}};this.http_error=function(a,b,d,e,f){d=a.statusText;this.set_busy(!1,
-null,e);a.abort();this.unload||(a.status&&d?this.display_message(this.get_label("servererror")+" ("+d+")","error"):"timeout"==b?this.display_message(this.get_label("requesttimedout"),"error"):0==a.status&&"abort"!=b&&this.display_message(this.get_label("servererror")+" (No connection)","error"),(b=a.getResponseHeader("Location"))&&"compose"!=this.env.action&&this.redirect(b),403==a.status?(this.is_framed()?parent:window).location.reload():"keep-alive"==f&&setTimeout(function(){l.keep_alive();l.start_keepalive()},
-3E4))};this.iframe_loaded=function(a){this.set_busy(!1,null,a);this.submit_timer&&clearTimeout(this.submit_timer)};this.async_upload_form=function(a,b,d){var e=(new Date).getTime(),f="rcmupload"+e;if(this.env.upload_progress_name){var g=this.env.upload_progress_name,h=$("input[name="+g+"]",a);h.length||(h=$("<input>").attr({type:"hidden",name:g}),h.prependTo(a));h.val(e)}document.all?document.body.insertAdjacentHTML("BeforeEnd",'<iframe name="'+f+'" src="program/resources/blank.gif" style="width:0;height:0;visibility:hidden;"></iframe>'):
+this.set_busy=function(a,b,d){a&&b?(d=this.get_label(b),d==b&&(d="Loading..."),d=this.display_message(d,"loading")):!a&&d&&this.hide_message(d);this.busy=a;this.gui_objects.editform&&this.lock_form(this.gui_objects.editform,a);return d};this.gettext=this.get_label=function(a,b){return b&&this.labels[b+"."+a]?this.labels[b+"."+a]:this.labels[a]?this.labels[a]:a};this.switch_task=function(a){if(this.task!==a||"mail"==a){var b=this.get_task_url(a);"mail"==a&&(b+="&_mbox=INBOX");this.redirect(b)}};this.get_task_url=
+function(a,b){b||(b=this.env.comm_path);return b.replace(/_task=[a-z]+/,"_task="+a)};this.reload=function(a){this.is_framed()?parent.rcmail.reload(a):a?setTimeout(function(){rcmail.reload()},a):window.location&&(location.href=this.env.comm_path+(this.env.action?"&_action="+this.env.action:""))};this.add_url=function(a,b,d){d=urlencode(d);if(/(\?.*)$/.test(a)){var e=RegExp.$1,f=RegExp("((\\?|&)"+RegExp.escape(b)+"=[^&]*)"),e=f.test(e)?e.replace(f,RegExp.$2+b+"="+d):e+("&"+b+"="+d);return a.replace(/(\?.*)$/,
+e)}return a+"?"+b+"="+d};this.is_framed=function(){return this.env.framed&&parent.rcmail&&parent.rcmail!=this&&parent.rcmail.command};this.save_pref=function(a){var b={_name:a.name,_value:a.value};a.session&&(b._session=a.session);a.env&&(this.env[a.env]=a.value);this.http_post("save-pref",b)};this.html_identifier=function(a,b){a=String(a);return b?Base64.encode(a).replace(/=+$/,"").replace(/\+/g,"-").replace(/\//g,"_"):a.replace(this.identifier_expr,"_")};this.html_identifier_decode=function(a){for(a=
+String(a).replace(/-/g,"+").replace(/_/g,"/");a.length%4;)a+="=";return Base64.decode(a)};this.drag_menu=function(a,b){var d=rcube_event.get_modifier(a),e=this.gui_objects.message_dragmenu;return e&&d==SHIFT_KEY&&this.commands.copy?(d=rcube_event.get_mouse_pos(a),this.env.drag_target=b,$(e).css({top:d.y-10+"px",left:d.x-10+"px"}).show(),!0):!1};this.drag_menu_action=function(a){var b=this.gui_objects.message_dragmenu;b&&$(b).hide();this.command(a,this.env.drag_target);this.env.drag_target=null};this.drag_start=
+function(a){var b="mail"==this.task?this.env.mailboxes:this.env.contactfolders;this.drag_active=!0;this.preview_timer&&clearTimeout(this.preview_timer);this.preview_read_timer&&clearTimeout(this.preview_read_timer);if(this.gui_objects.folderlist&&b){this.initialBodyScrollTop=bw.ie?0:window.pageYOffset;this.initialListScrollTop=this.gui_objects.folderlist.parentNode.scrollTop;var d;a=$(this.gui_objects.folderlist);pos=a.offset();this.env.folderlist_coords={x1:pos.left,y1:pos.top,x2:pos.left+a.width(),
+y2:pos.top+a.height()};this.env.folder_coords=[];for(d in b)if(a=this.get_folder_li(d))if(b=a.firstChild.offsetHeight)pos=$(a.firstChild).offset(),this.env.folder_coords[d]={x1:pos.left,y1:pos.top,x2:pos.left+a.firstChild.offsetWidth,y2:pos.top+b,on:0}}};this.drag_end=function(a){this.drag_active=!1;this.env.last_folder_target=null;this.folder_auto_timer&&(clearTimeout(this.folder_auto_timer),this.folder_auto_expand=this.folder_auto_timer=null);if(this.gui_objects.folderlist&&this.env.folder_coords)for(var b in this.env.folder_coords)this.env.folder_coords[b].on&&
+$(this.get_folder_li(b)).removeClass("droptarget")};this.drag_move=function(a){if(this.gui_objects.folderlist&&this.env.folder_coords){var b,d,e,f,g;d="draglayernormal";a=rcube_event.get_mouse_pos(a);f=this.env.folderlist_coords;e=bw.ie?-document.documentElement.scrollTop:this.initialBodyScrollTop;var h=this.initialListScrollTop-this.gui_objects.folderlist.parentNode.scrollTop;this.contact_list&&this.contact_list.draglayer&&(g=this.contact_list.draglayer.attr("class"));a.y+=-h-e;if(a.x<f.x1||a.x>=
+f.x2||a.y<f.y1||a.y>=f.y2)this.env.last_folder_target&&($(this.get_folder_li(this.env.last_folder_target)).removeClass("droptarget"),this.env.folder_coords[this.env.last_folder_target].on=0,this.env.last_folder_target=null);else for(b in this.env.folder_coords)f=this.env.folder_coords[b],a.x>=f.x1&&a.x<f.x2&&a.y>=f.y1&&a.y<f.y2?(f=this.check_droptarget(b))?(d=this.get_folder_li(b),e=$(d.getElementsByTagName("div")[0]),e.hasClass("collapsed")?(this.folder_auto_timer&&clearTimeout(this.folder_auto_timer),
+this.folder_auto_expand=this.env.mailboxes[b].id,this.folder_auto_timer=setTimeout(function(){rcmail.command("collapse-folder",rcmail.folder_auto_expand);rcmail.drag_start(null)},1E3)):this.folder_auto_timer&&(clearTimeout(this.folder_auto_timer),this.folder_auto_expand=this.folder_auto_timer=null),$(d).addClass("droptarget"),this.env.folder_coords[b].on=1,this.env.last_folder_target=b,d="draglayer"+(1<f?"copy":"normal")):this.env.last_folder_target=null:f.on&&($(this.get_folder_li(b)).removeClass("droptarget"),
+this.env.folder_coords[b].on=0);d!=g&&(this.contact_list&&this.contact_list.draglayer)&&this.contact_list.draglayer.attr("class",d)}};this.collapse_folder=function(a){var b=this.get_folder_li(a,"",!0),d=$("div:first",b),e=$("ul:first",b);if(d.hasClass("collapsed"))e.show(),d.removeClass("collapsed").addClass("expanded"),d=RegExp("&"+urlencode(a)+"&"),this.env.collapsed_folders=this.env.collapsed_folders.replace(d,"");else if(d.hasClass("expanded"))e.hide(),d.removeClass("expanded").addClass("collapsed"),
+this.env.collapsed_folders=this.env.collapsed_folders+"&"+urlencode(a)+"&",0!=this.env.mailbox.indexOf(a+this.env.delimiter)||$(b).hasClass("virtual")||this.command("list",a);else return;(bw.ie6||bw.ie7)&&(d=b.nextSibling?b.nextSibling.getElementsByTagName("ul"):null)&&(d.length&&(b=d[0])&&b.style&&"none"!=b.style.display)&&(b.style.display="none",b.style.display="");this.command("save-pref",{name:"collapsed_folders",value:this.env.collapsed_folders});this.set_unread_count_display(a,!1)};this.doc_mouse_up=
+function(a){var b,d,e;if(!$(rcube_event.get_target(a)).closest(".ui-dialog, .ui-widget-overlay").length&&((d=this.message_list)?b=this.env.mailboxes:(d=this.contact_list)?b=this.env.contactfolders:this.ksearch_value&&this.ksearch_blur(),d&&!rcube_mouse_is_over(a,d.list.parentNode)&&d.blur(),this.drag_active&&(b&&this.env.last_folder_target)&&(b=b[this.env.last_folder_target],$(this.get_folder_li(this.env.last_folder_target)).removeClass("droptarget"),this.env.last_folder_target=null,d.draglayer.hide(),
+this.drag_menu(a,b)||this.command("moveto",b)),this.buttons_sel)){for(e in this.buttons_sel)"function"!==typeof e&&this.button_out(this.buttons_sel[e],e);this.buttons_sel={}}};this.click_on_list=function(a){this.gui_objects.qsearchbox&&this.gui_objects.qsearchbox.blur();this.message_list?this.message_list.focus():this.contact_list&&this.contact_list.focus();return!0};this.msglist_select=function(a){this.preview_timer&&clearTimeout(this.preview_timer);this.preview_read_timer&&clearTimeout(this.preview_read_timer);
+var b=a.get_single_selection();this.enable_command(this.env.message_commands,null!=b);b&&(this.env.mailbox==this.env.drafts_mailbox?this.enable_command("reply","reply-all","reply-list","forward","forward-attachment","forward-inline",!1):this.env.messages[b].ml||this.enable_command("reply-list",!1));this.enable_command("delete","moveto","copy","mark","forward","forward-attachment",0<a.selection.length);if(b||a.selection.length&&a.selection.length!=a.rowcount)this.select_all_mode=!1;b&&this.env.contentframe&&
+!a.multi_selecting&&!this.dummy_select?this.preview_timer=setTimeout(function(){l.msglist_get_preview()},this.dblclick_time):this.env.contentframe&&this.show_contentframe(!1)};this.msglist_click=function(a){a.multi_selecting||!this.env.contentframe||a.get_single_selection()||(a=this.get_frame_window(this.env.contentframe))&&0<=a.location.href.indexOf(this.env.blankpage)&&(this.preview_timer&&clearTimeout(this.preview_timer),this.preview_read_timer&&clearTimeout(this.preview_read_timer),this.preview_timer=
+setTimeout(function(){l.msglist_get_preview()},this.dblclick_time))};this.msglist_dbl_click=function(a){this.preview_timer&&clearTimeout(this.preview_timer);this.preview_read_timer&&clearTimeout(this.preview_read_timer);(a=a.get_single_selection())&&this.env.mailbox==this.env.drafts_mailbox?this.open_compose_step({_draft_uid:a,_mbox:this.env.mailbox}):a&&this.show_message(a,!1,!1)};this.msglist_keypress=function(a){a.modkey!=CONTROL_KEY&&(a.key_pressed==a.ENTER_KEY?this.command("show"):a.key_pressed==
+a.DELETE_KEY||a.key_pressed==a.BACKSPACE_KEY?this.command("delete"):33==a.key_pressed?this.command("previouspage"):34==a.key_pressed&&this.command("nextpage"))};this.msglist_get_preview=function(){var a=this.get_single_uid();a&&this.env.contentframe&&!this.drag_active?this.show_message(a,!1,!0):this.env.contentframe&&this.show_contentframe(!1)};this.msglist_expand=function(a){this.env.messages[a.uid]&&(this.env.messages[a.uid].expanded=a.expanded);$(a.obj)[a.expanded?"addClass":"removeClass"]("expanded")};
+this.msglist_set_coltypes=function(a){var b,d=a.list.tHead.rows[0].cells;this.env.coltypes=[];for(a=0;a<d.length;a++)d[a].id&&d[a].id.match(/^rcm/)&&(b=d[a].id.replace(/^rcm/,""),this.env.coltypes.push(b));0<=(a=$.inArray("flag",this.env.coltypes))&&(this.env.flagged_col=a);0<=(a=$.inArray("subject",this.env.coltypes))&&(this.env.subject_col=a);this.command("save-pref",{name:"list_cols",value:this.env.coltypes,session:"list_attrib/columns"})};this.check_droptarget=function(a){if("mail"==this.task)return this.env.mailboxes[a]&&
+this.env.mailboxes[a].id!=this.env.mailbox&&!this.env.mailboxes[a].virtual?1:0;if("settings"==this.task)return a!=this.env.mailbox?1:0;if("addressbook"==this.task&&a!=this.env.source&&this.env.contactfolders[a])if("group"==this.env.contactfolders[a].type){var b=this.env.contactfolders[a].source;if(this.env.contactfolders[a].id!=this.env.group&&!this.env.contactfolders[b].readonly)return 1<this.env.selection_sources.length||-1==$.inArray(b,this.env.selection_sources)?2:1}else if(!this.env.contactfolders[a].readonly)return 1<
+this.env.selection_sources.length||-1==$.inArray(a,this.env.selection_sources)?2:0;return 0};this.open_window=function(a,b){var d=this.is_framed()?parent.window:window,e=$(d),f=e.width(),e=bw.mz?$("body",d).height():e.height(),f=Math.min(b,f),g=(d.screenLeft||d.screenX)+20,d=(d.screenTop||d.screenY)+20,h="rcmextwin"+(new Date).getTime(),k=window.open(a+(a.match(/\?/)?"&":"?")+"_extwin=1",h,"width="+f+",height="+e+",top="+d+",left="+g+",resizable=yes,toolbar=no,status=no,location=no");!a&&k.document&&
+k.document.write("<html><body>"+this.get_label("loading")+"</body></html>");window.setTimeout(function(){k.focus()},10);return h};this.init_message_row=function(a){var b,d=this,e=a.uid,f=(null!=this.env.status_col?"status":"msg")+"icn"+a.uid;e&&this.env.messages[e]&&$.extend(a,this.env.messages[e]);if(a.icon=document.getElementById(f))a.icon._row=a.obj,a.icon.onmousedown=function(a){d.command("toggle_status",this);rcube_event.cancel(a)};a.msgicon=null!=this.env.status_col?document.getElementById("msgicn"+
+a.uid):a.icon;null!=this.env.flagged_col&&(a.flagicon=document.getElementById("flagicn"+a.uid))&&(a.flagicon._row=a.obj,a.flagicon.onmousedown=function(a){d.command("toggle_flag",this);rcube_event.cancel(a)});!a.depth&&(a.has_children&&(b=document.getElementById("rcmexpando"+a.uid)))&&(a.expando=b,b.onmousedown=function(a){return d.expand_message_row(a,e)});this.triggerEvent("insertrow",{uid:e,row:a})};this.add_message_row=function(a,b,d,e){if(!this.gui_objects.messagelist||!this.message_list||d.mbox!=
+this.env.mailbox&&!d.skip_mbox_check)return!1;this.env.messages[a]||(this.env.messages[a]={});$.extend(this.env.messages[a],{deleted:d.deleted?1:0,replied:d.answered?1:0,unread:d.seen?0:1,forwarded:d.forwarded?1:0,flagged:d.flagged?1:0,has_children:d.has_children?1:0,depth:d.depth?d.depth:0,unread_children:d.unread_children?d.unread_children:0,parent_uid:d.parent_uid?d.parent_uid:0,selected:this.select_all_mode||this.message_list.in_selection(a),ml:d.ml?1:0,ctype:d.ctype,flags:d.extra_flags});var f,
+g,h,k="",l="",m=this.message_list;h=m.rows;var n=this.env.messages[a],q="message"+(d.seen?"":" unread")+(d.deleted?" deleted":"")+(d.flagged?" flagged":"")+(d.unread_children&&d.seen&&!this.env.autoexpand_threads?" unroot":"")+(n.selected?" selected":""),s=document.createElement("tr");s.id="rcmrow"+a;f="msgicon";null===this.env.status_col&&(f+=" status",d.deleted?f+=" deleted":d.seen?0<d.unread_children&&(f+=" unreadchildren"):f+=" unread");d.answered&&(f+=" replied");d.forwarded&&(f+=" forwarded");
+n.selected&&!m.in_selection(a)&&m.selection.push(a);this.env.threading&&(n.depth?(k+='<span id="rcmtab'+a+'" class="branch" style="width:'+15*n.depth+'px;">&nbsp;&nbsp;</span>',h[n.parent_uid]&&!1===h[n.parent_uid].expanded||!(0!=this.env.autoexpand_threads&&2!=this.env.autoexpand_threads||h[n.parent_uid]&&h[n.parent_uid].expanded)?(s.style.display="none",n.expanded=!1):n.expanded=!0,q+=" thread expanded"):n.has_children&&(void 0===n.expanded&&(1==this.env.autoexpand_threads||2==this.env.autoexpand_threads&&
+n.unread_children)&&(n.expanded=!0),l='<div id="rcmexpando'+a+'" class="'+(n.expanded?"expanded":"collapsed")+'">&nbsp;&nbsp;</div>',q+=" thread"+(n.expanded?" expanded":"")));k+='<span id="msgicn'+a+'" class="'+f+'">&nbsp;</span>';s.className=q;!bw.ie&&b.subject&&(h=d.mbox==this.env.drafts_mailbox?"_draft_uid":"_uid",b.subject='<a href="./?_task=mail&_action='+(d.mbox==this.env.drafts_mailbox?"compose":"show")+"&_mbox="+urlencode(d.mbox)+"&"+h+"="+a+'" onclick="return rcube_event.cancel(event)" onmouseover="rcube_webmail.long_subject_title(this,'+
+(n.depth+1)+')">'+b.subject+"</a>");for(g in this.env.coltypes)f=this.env.coltypes[g],h=document.createElement("td"),h.className=String(f).toLowerCase(),"flag"==f?(f=d.flagged?"flagged":"unflagged",f='<span id="flagicn'+a+'" class="'+f+'">&nbsp;</span>'):"attachment"==f?f=/application\/|multipart\/(m|signed)/.test(d.ctype)?'<span class="attachment">&nbsp;</span>':/multipart\/report/.test(d.ctype)?'<span class="report">&nbsp;</span>':"&nbsp;":"status"==f?(f=d.deleted?"deleted":d.seen?0<d.unread_children?
+"unreadchildren":"msgicon":"unread",f='<span id="statusicn'+a+'" class="'+f+'">&nbsp;</span>'):"threads"==f?f=l:"subject"==f?(bw.ie&&(h.onmouseover=function(){rcube_webmail.long_subject_title_ie(this,n.depth+1)},bw.ie8&&(k="<span></span>"+k)),f=k+b[f]):f="priority"==f?0<d.prio&&6>d.prio?'<span class="prio'+d.prio+'">&nbsp;</span>':"&nbsp;":b[f],f&&(h.innerHTML=f),s.appendChild(h);m.insert_row(s,e);e&&(this.env.pagesize&&m.rowcount>this.env.pagesize)&&(a=m.get_last_row(),m.remove_row(a),m.clear_selection(a))};
+this.set_list_sorting=function(a,b){$("#rcm"+this.env.sort_col).removeClass("sorted"+this.env.sort_order.toUpperCase());a&&$("#rcm"+a).addClass("sorted"+b);this.env.sort_col=a;this.env.sort_order=b};this.set_list_options=function(a,b,d,e){var f,g={};void 0===b&&(b=this.env.sort_col);d||(d=this.env.sort_order);if(this.env.sort_col!=b||this.env.sort_order!=d)f=1,this.set_list_sorting(b,d);this.env.threading!=e&&(f=1,g._threads=e);if(a&&a.length){var h,k,l=[],m=this.env.coltypes;for(e=0;e<m.length;e++)k=
+m[e],h=$.inArray(k,a),-1!=h&&(l.push(k),delete a[h]);for(e=0;e<a.length;e++)a[e]&&l.push(a[e]);l.join()!=m.join()&&(f=1,g._cols=l.join(","))}f&&this.list_mailbox("","",b+"_"+d,g)};this.show_message=function(a,b,d){if(a){var e,f=window,g="&_action="+(d?"preview":"show")+"&_uid="+a+"&_mbox="+urlencode(this.env.mailbox);d&&(e=this.get_frame_window(this.env.contentframe))&&(f=e,g+="&_framed=1");b&&(g+="&_safe=1");this.env.search_request&&(g+="&_search="+this.env.search_request);g+="&_caps="+urlencode(this.browser_capabilities());
+this.env.extwin&&(g+="&_extwin=1");d&&0<=String(f.location.href).indexOf(g)?this.show_contentframe(!0):(d||!this.env.message_extwin||this.env.extwin?this.location_href(this.env.comm_path+g,f,!0):this.open_window(this.env.comm_path+g,1E3),d&&(this.message_list&&this.message_list.rows[a]&&this.message_list.rows[a].unread&&0<=this.env.preview_pane_mark_read)&&(this.preview_read_timer=setTimeout(function(){l.set_message(a,"unread",!1);l.update_thread_root(a,"read");l.env.unread_counts[l.env.mailbox]&&
+(l.env.unread_counts[l.env.mailbox]-=1,l.set_unread_count(l.env.mailbox,l.env.unread_counts[l.env.mailbox],"INBOX"==l.env.mailbox));0<l.env.preview_pane_mark_read&&l.http_post("mark",{_uid:a,_flag:"read",_quiet:1})},1E3*this.env.preview_pane_mark_read)))}};this.show_contentframe=function(a){var b,d,e=this.env.contentframe;if(e&&(b=this.get_frame_element(e)))if(!a&&(d=this.get_frame_window(e)))d.location&&0>d.location.href.indexOf(this.env.blankpage)&&(d.location.href=this.env.blankpage);else if(!bw.safari&&
+!bw.konq)$(b)[a?"show":"hide"]();!a&&this.busy&&this.set_busy(!1,null,this.env.frame_lock)};this.get_frame_element=function(a){var b;if(a&&(b=document.getElementById(a)))return b};this.get_frame_window=function(a){if((a=this.get_frame_element(a))&&a.name&&window.frames)return window.frames[a.name]};this.lock_frame=function(){this.env.frame_lock||((this.is_framed()?parent.rcmail:this).env.frame_lock=this.set_busy(!0,"loading"))};this.list_page=function(a){"next"==a?a=this.env.current_page+1:"last"==
+a?a=this.env.pagecount:"prev"==a&&1<this.env.current_page?a=this.env.current_page-1:"first"==a&&1<this.env.current_page&&(a=1);0<a&&a<=this.env.pagecount&&(this.env.current_page=a,"addressbook"==this.task||this.contact_list?this.list_contacts(this.env.source,this.env.group,a):"mail"==this.task&&this.list_mailbox(this.env.mailbox,a))};this.checkmail=function(){var a=this.set_busy(!0,"checkingmail"),b=this.check_recent_params();this.http_request("check-recent",b,a)};this.filter_mailbox=function(a){var b=
+this.set_busy(!0,"searching");this.clear_message_list();this.env.current_page=1;this.http_request("search",this.search_params(!1,a),b)};this.list_mailbox=function(a,b,d,e){var f=window;"object"!=typeof e&&(e={});a||(a=this.env.mailbox?this.env.mailbox:"INBOX");d&&(e._sort=d);this.env.search_request&&(e._search=this.env.search_request);this.env.mailbox!=a&&(b=1,this.env.current_page=b,this.select_all_mode=!1);this.clear_message_list();if(a!=this.env.mailbox||a==this.env.mailbox&&!b&&!d)e._refresh=
+1;this.select_folder(a,"",!0);this.unmark_folder(a,"recent","",!0);this.env.mailbox=a;if(this.gui_objects.messagelist)this.list_mailbox_remote(a,b,e);else{if(d=this.get_frame_window(this.env.contentframe))f=d,e._framed=1;a&&(this.set_busy(!0,"loading"),e._mbox=a,b&&(e._page=b),this.location_href(e,f))}};this.clear_message_list=function(){this.env.messages={};this.last_selected=0;this.show_contentframe(!1);this.message_list&&this.message_list.clear(!0)};this.list_mailbox_remote=function(a,b,d){this.message_list.clear();
+var e=this.set_busy(!0,"loading");"object"!=typeof d&&(d={});d._mbox=a;b&&(d._page=b);this.http_request("list",d,e)};this.update_selection=function(){var a=this.message_list.selection,b=this.message_list.rows,d,e=[];for(d in a)b[a[d]]&&e.push(a[d]);this.message_list.selection=e};this.expand_unread=function(){for(var a,b=this.gui_objects.messagelist.tBodies[0].firstChild;b;)1==b.nodeType&&((a=this.message_list.rows[b.uid])&&a.unread_children)&&(this.message_list.expand_all(a),this.set_unread_children(a.uid)),
+b=b.nextSibling;return!1};this.expand_message_row=function(a,b){var d=this.message_list.rows[b];d.expanded=!d.expanded;this.set_unread_children(b);d.expanded=!d.expanded;this.message_list.expand_row(a,b)};this.expand_threads=function(){if(this.env.threading&&this.env.autoexpand_threads&&this.message_list)switch(this.env.autoexpand_threads){case 2:this.expand_unread();break;case 1:this.message_list.expand_all()}};this.init_threads=function(a,b){if(b&&b!=this.env.mailbox)return!1;for(var d=0,e=a.length;d<
+e;d++)this.add_tree_icons(a[d]);this.expand_threads()};this.add_tree_icons=function(a){var b,d,e,f,g=[],h=[],k,l=this.message_list.rows;for(k=a?l[a]?l[a].obj:null:this.message_list.list.tBodies[0].firstChild;k;){if(1==k.nodeType&&(d=l[k.uid]))if(d.depth){for(b=g.length-1;0<=b&&!(e=g[b].length,e>d.depth?(f=e-d.depth,g[b][f]&2||(g[b][f]=g[b][f]?g[b][f]+2:2)):e==d.depth&&(g[b][0]&2||(g[b][0]+=2)),d.depth>e);b--);g.push(Array(d.depth));g[g.length-1][0]=1;h.push(d.uid)}else{if(g.length){for(b in g)this.set_tree_icons(h[b],
+g[b]);g=[];h=[]}if(a&&k!=l[a].obj)break}k=k.nextSibling}if(g.length)for(b in g)this.set_tree_icons(h[b],g[b])};this.set_tree_icons=function(a,b){var d,e=[],f="",g=b.length;for(d=0;d<g;d++)2<b[d]?e.push({"class":"l3",width:15}):1<b[d]?e.push({"class":"l2",width:15}):0<b[d]?e.push({"class":"l1",width:15}):e.length&&!e[e.length-1]["class"]?e[e.length-1].width+=15:e.push({"class":null,width:15});for(d=e.length-1;0<=d;d--)f=e[d]["class"]?f+('<div class="tree '+e[d]["class"]+'" />'):f+('<div style="width:'+
+e[d].width+'px" />');f&&$("#rcmtab"+a).html(f)};this.update_thread_root=function(a,b){if(this.env.threading){var d=this.message_list.find_root(a);if(a!=d){var e=this.message_list.rows[d];if("read"==b&&e.unread_children)e.unread_children--;else if("unread"==b&&e.has_children)e.unread_children=e.unread_children?e.unread_children+1:1;else return;this.set_message_icon(d);this.set_unread_children(d)}}};this.update_thread=function(a){if(!this.env.threading)return 0;var b,d=0,e=this.message_list.rows,f=
+e[a],g=e[a].depth,h=[];f.depth?f.unread&&(a=this.message_list.find_root(a),e[a].unread_children--,this.set_unread_children(a)):d--;a=f.parent_uid;for(f=f.obj.nextSibling;f;){if(1==f.nodeType&&(b=e[f.uid])){if(!b.depth||b.depth<=g)break;b.depth--;$("#rcmtab"+b.uid).width(15*b.depth).html("");b.depth?(b.depth==g&&(b.parent_uid=a),b.unread&&h.length&&h[h.length-1].unread_children++):(d++,b.parent_uid=0,b.has_children&&($("#rcmrow"+b.uid+" .leaf:first").attr("id","rcmexpando"+b.uid).attr("class","none"!=
+b.obj.style.display?"expanded":"collapsed").bind("mousedown",{uid:b.uid,p:this},function(a){return a.data.p.expand_message_row(a,a.data.uid)}),b.unread_children=0,h.push(b)),"none"==b.obj.style.display&&$(b.obj).show())}f=f.nextSibling}for(b=0;b<h.length;b++)this.set_unread_children(h[b].uid);return d};this.delete_excessive_thread_rows=function(){for(var a=this.message_list.rows,b=this.message_list.list.tBodies[0].firstChild,d=this.env.pagesize+1;b;)1==b.nodeType&&(r=a[b.uid])&&(!r.depth&&d&&d--,
+d||this.message_list.remove_row(b.uid)),b=b.nextSibling};this.set_message_icon=function(a){var b=this.message_list.rows[a];if(!b)return!1;b.icon&&(a="msgicon",b.deleted?a+=" deleted":b.unread?a+=" unread":b.unread_children&&(a+=" unreadchildren"),b.msgicon==b.icon&&(b.replied&&(a+=" replied"),b.forwarded&&(a+=" forwarded"),a+=" status"),b.icon.className=a);b.msgicon&&b.msgicon!=b.icon&&(a="msgicon",!b.unread&&b.unread_children&&(a+=" unreadchildren"),b.replied&&(a+=" replied"),b.forwarded&&(a+=" forwarded"),
+b.msgicon.className=a);b.flagicon&&(a=b.flagged?"flagged":"unflagged",b.flagicon.className=a)};this.set_message_status=function(a,b,d){a=this.message_list.rows[a];if(!a)return!1;"unread"==b?a.unread=d:"deleted"==b?a.deleted=d:"replied"==b?a.replied=d:"forwarded"==b?a.forwarded=d:"flagged"==b&&(a.flagged=d)};this.set_message=function(a,b,d){var e=this.message_list&&this.message_list.rows[a];if(!e)return!1;b&&this.set_message_status(a,b,d);b=$(e.obj);e.unread&&!b.hasClass("unread")?b.addClass("unread"):
+!e.unread&&b.hasClass("unread")&&b.removeClass("unread");e.deleted&&!b.hasClass("deleted")?b.addClass("deleted"):!e.deleted&&b.hasClass("deleted")&&b.removeClass("deleted");e.flagged&&!b.hasClass("flagged")?b.addClass("flagged"):!e.flagged&&b.hasClass("flagged")&&b.removeClass("flagged");this.set_unread_children(a);this.set_message_icon(a)};this.set_unread_children=function(a){a=this.message_list.rows[a];a.parent_uid||(a.unread||!a.unread_children||a.expanded?$(a.obj).removeClass("unroot"):$(a.obj).addClass("unroot"))};
+this.copy_messages=function(a){a&&"object"===typeof a&&(a=a.id);a&&a!=this.env.mailbox&&(a=this.selection_post_data({_target_mbox:a}),a._uid&&this.http_post("copy",a,this.display_message(this.get_label("copyingmessage"),"loading")))};this.move_messages=function(a){a&&"object"===typeof a&&(a=a.id);if(a&&a!=this.env.mailbox){var b=!1;a=this.selection_post_data({_target_mbox:a});a._uid&&("show"==this.env.action?b=this.set_busy(!0,"movingmessage"):this.show_contentframe(!1),this.enable_command(this.env.message_commands,
+!1),this._with_selected_messages("moveto",a,b))}};this.delete_messages=function(a){var b,d,e,f=this.env.trash_mailbox,g=this.message_list,h=g?g.get_selection():[];if(this.env.uid||h.length){d=0;for(e=h.length;d<e;d++)b=h[d],g.rows[b].has_children&&!g.rows[b].expanded&&g.select_children(b);if(this.env.flag_for_deletion)return this.mark_message("delete"),!1;f&&this.env.mailbox!=f?this.env.delete_junk&&this.env.junk_mailbox&&this.env.mailbox==this.env.junk_mailbox?this.permanently_remove_messages():
+g&&g.modkey==SHIFT_KEY||a&&rcube_event.get_modifier(a)==SHIFT_KEY?confirm(this.get_label("deletemessagesconfirm"))&&this.permanently_remove_messages():this.move_messages(f):this.permanently_remove_messages();return!0}};this.permanently_remove_messages=function(){var a=this.selection_post_data();a._uid&&(this.show_contentframe(!1),this._with_selected_messages("delete",a))};this._with_selected_messages=function(a,b,d){var e=0;if(this.message_list){var f,g,h,k=[],l=this.message_list.get_selection();
+f=0;for(len=l.length;f<len;f++)g=l[f],this.env.threading&&(e+=this.update_thread(g),h=this.message_list.find_root(g),h!=g&&0>$.inArray(h,k)&&k.push(h)),this.message_list.remove_row(g,this.env.display_next&&f==l.length-1);this.env.display_next||this.message_list.clear_selection();f=0;for(len=k.length;f<len;f++)this.add_tree_icons(k[f])}this.env.display_next&&this.env.next_uid&&(b._next_uid=this.env.next_uid);0>e?b._count=-1*e:0<e&&this.delete_excessive_thread_rows();d||(d=this.display_message(this.get_label("moveto"==
+a?"movingmessage":"deletingmessage"),"loading"));this.http_post(a,b,d)};this.selection_post_data=function(a){"object"!=typeof a&&(a={});a._mbox=this.env.mailbox;if(!a._uid){var b=this.env.uid?[this.env.uid]:this.message_list.get_selection();a._uid=this.uids_to_list(b)}this.env.action&&(a._from=this.env.action);this.env.search_request&&(a._search=this.env.search_request);return a};this.mark_message=function(a,b){var d=[],e=[],f,g,h,k=this.message_list;b?d[0]=b:this.env.uid?d[0]=this.env.uid:k&&(d=
+k.get_selection());if(k)for(k.focus(),g=0,f=d.length;g<f;g++)h=d[g],("read"==a&&k.rows[h].unread||"unread"==a&&!k.rows[h].unread||"delete"==a&&!k.rows[h].deleted||"undelete"==a&&k.rows[h].deleted||"flagged"==a&&!k.rows[h].flagged||"unflagged"==a&&k.rows[h].flagged)&&e.push(h);else e=d;if(e.length||this.select_all_mode)switch(a){case "read":case "unread":this.toggle_read_status(a,e);break;case "delete":case "undelete":this.toggle_delete_status(e);break;case "flagged":case "unflagged":this.toggle_flagged_status(a,
+d)}};this.toggle_read_status=function(a,b){var d,e=b.length,f=this.selection_post_data({_uid:this.uids_to_list(b),_flag:a}),g=this.display_message(this.get_label("markingmessage"),"loading");for(d=0;d<e;d++)this.set_message(b[d],"unread","unread"==a?!0:!1);this.http_post("mark",f,g);for(d=0;d<e;d++)this.update_thread_root(b[d],a)};this.toggle_flagged_status=function(a,b){var d,e=b.length,f=this.selection_post_data({_uid:this.uids_to_list(b),_flag:a}),g=this.display_message(this.get_label("markingmessage"),
+"loading");for(d=0;d<e;d++)this.set_message(b[d],"flagged","flagged"==a?!0:!1);this.http_post("mark",f,g)};this.toggle_delete_status=function(a){var b=a.length,d,e,f=!0,g=this.message_list?this.message_list.rows:[];if(1==b)return!g.length||g[a[0]]&&!g[a[0]].deleted?this.flag_as_deleted(a):this.flag_as_undeleted(a),!0;for(d=0;d<b;d++)if(e=a[d],g[e]&&!g[e].deleted){f=!1;break}f?this.flag_as_undeleted(a):this.flag_as_deleted(a);return!0};this.flag_as_undeleted=function(a){var b,d=a.length,e=this.selection_post_data({_uid:this.uids_to_list(a),
+_flag:"undelete"}),f=this.display_message(this.get_label("markingmessage"),"loading");for(b=0;b<d;b++)this.set_message(a[b],"deleted",!1);this.http_post("mark",e,f)};this.flag_as_deleted=function(a){for(var b=[],d=this.selection_post_data({_uid:this.uids_to_list(a),_flag:"delete"}),e=this.display_message(this.get_label("markingmessage"),"loading"),f=this.message_list?this.message_list.rows:[],g=0,h=0,k=a.length;h<k;h++)uid=a[h],f[uid]&&(f[uid].unread&&(b[b.length]=uid),this.env.skip_deleted?(g+=this.update_thread(uid),
+this.message_list.remove_row(uid,this.env.display_next&&h==this.message_list.selection.length-1)):this.set_message(uid,"deleted",!0));this.env.skip_deleted&&this.message_list&&(this.env.display_next||this.message_list.clear_selection(),0>g?d._count=-1*g:0<g&&this.delete_excessive_thread_rows());b.length&&(d._ruid=this.uids_to_list(b));this.env.skip_deleted&&(this.env.display_next&&this.env.next_uid)&&(d._next_uid=this.env.next_uid);this.http_post("mark",d,e)};this.flag_deleted_as_read=function(a){var b,
+d,e,f=this.message_list?this.message_list.rows:[];a=String(a).split(",");d=0;for(e=a.length;d<e;d++)b=a[d],f[b]&&this.set_message(b,"unread",!1)};this.uids_to_list=function(a){return this.select_all_mode?"*":a.join(",")};this.set_button_titles=function(){var a="deletemessage";this.env.flag_for_deletion||(!this.env.trash_mailbox||this.env.mailbox==this.env.trash_mailbox||this.env.delete_junk&&this.env.junk_mailbox&&this.env.mailbox==this.env.junk_mailbox)||(a="movemessagetotrash");this.set_alttext("delete",
+a)};this.expunge_mailbox=function(a){var b,d={_mbox:a};a==this.env.mailbox&&(b=this.set_busy(!0,"loading"),d._reload=1,this.env.search_request&&(d._search=this.env.search_request));this.http_post("expunge",d,b)};this.purge_mailbox=function(a){var b,d={_mbox:a};if(!confirm(this.get_label("purgefolderconfirm")))return!1;a==this.env.mailbox&&(b=this.set_busy(!0,"loading"),d._reload=1);this.http_post("purge",d,b)};this.purge_mailbox_test=function(){return this.env.exists&&(this.env.mailbox==this.env.trash_mailbox||
+this.env.mailbox==this.env.junk_mailbox||this.env.mailbox.match("^"+RegExp.escape(this.env.trash_mailbox)+RegExp.escape(this.env.delimiter))||this.env.mailbox.match("^"+RegExp.escape(this.env.junk_mailbox)+RegExp.escape(this.env.delimiter)))};this.login_user_keyup=function(a){var b=rcube_event.get_keycode(a),d=$("#rcmloginpwd");return 13==b&&d.length&&!d.val()?(d.focus(),rcube_event.cancel(a)):!0};this.open_compose_step=function(a){a=this.url("mail/compose",a);this.env.compose_extwin&&!this.env.extwin?
+this.open_window(a,1150):(this.redirect(a),this.env.extwin&&window.resizeTo(Math.max(1150,$(window).width()),$(window).height()+24))};this.init_messageform=function(){if(!this.gui_objects.messageform)return!1;var a=$("[name='_from']"),b=$("[name='_to']"),d=$("input[name='_subject']"),e=$("[name='_message']").get(0),f="1"==$("input[name='_is_html']").val(),g=["cc","bcc","replyto","followupto"],h,k=this.opener();k&&"compose"==k.env.action&&(setTimeout(function(){opener.history.back()},100),this.env.opened_extwin=
+!0);0<this.env.autocomplete_threads&&(h={threads:this.env.autocomplete_threads,sources:this.env.autocomplete_sources});this.init_address_input_events(b,h);for(var l in g)this.init_address_input_events($("[name='_"+g[l]+"']"),h);f||(this.set_caret_pos(e,this.env.top_posting?0:$(e).val().length),"select-one"!=a.prop("type")||this.env.opened_extwin||this.change_identity(a[0]));""==b.val()?b.focus():""==d.val()?d.focus():e&&e.focus();this.env.compose_focus_elem=document.activeElement;this.compose_field_hash(!0);
+this.auto_save_start()};this.init_address_input_events=function(a,b){this.env.recipients_delimiter=this.env.recipients_separator+" ";a[bw.ie||bw.safari||bw.chrome?"keydown":"keypress"](function(a){return l.ksearch_keydown(a,this,b)}).attr("autocomplete","off")};this.submit_messageform=function(a){var b=this.gui_objects.messageform;if(b){var d=this.set_busy(!0,a?"savingmessage":"sendingmessage"),e=this.spellcheck_lang(),f=[];$("li",this.gui_objects.attachmentlist).each(function(){f.push(this.id.replace(/^rcmfile/,
+""))});$('input[name="_attachments"]',b).val(f.join());b.target="savetarget";b._draft.value=a?"1":"";b.action=this.add_url(b.action,"_unlock",d);b.action=this.add_url(b.action,"_lang",e);this.submit_timer=setTimeout(function(){l.set_busy(!1,null,d);l.display_message(l.get_label("requesttimedout"),"error")},1E3*this.env.request_timeout);b.submit()}};this.compose_recipient_select=function(a){this.enable_command("add-recipient",0<a.selection.length)};this.compose_add_recipient=function(a){var b=[],d=
+$("#_"+a),e=this.env.recipients_delimiter;if(this.contact_list&&this.contact_list.selection.length)for(var f,g=0;g<this.contact_list.selection.length;g++)if((f=this.contact_list.selection[g])&&this.env.contactdata[f]&&(b.push(this.env.contactdata[f]),"E"==f.charAt(0)&&0>this.env.contactdata[f].indexOf("@")&&d.length)){var h=f.substr(1);this.group2expand[h]={name:this.env.contactdata[f],input:d.get(0)};this.http_request("group-expand",{_source:this.env.source,_gid:h},!1)}b.length&&d.length&&(f=d.val(),
+g=RegExp(RegExp.escape(e)+"\\s*$"),f&&!g.test(f)&&(f+=e+" "),d.val(f+b.join(e+" ")+e+" "),this.triggerEvent("add-recipient",{field:a,recipients:b}))};this.check_compose_input=function(a){var b,d=$("[name='_to']"),e=$("[name='_cc']"),f=$("[name='_bcc']"),g=$("[name='_from']"),h=$("[name='_subject']"),k=$("[name='_message']");if("text"==g.prop("type")&&!rcube_check_email(g.val(),!0))return alert(this.get_label("nosenderwarning")),g.focus(),!1;e=d.val()?d.val():e.val()?e.val():f.val();if(!rcube_check_email(e.replace(/^\s+/,
+"").replace(/[\s,;]+$/,""),!0))return alert(this.get_label("norecipientwarning")),d.focus(),!1;for(var p in this.env.attachments)if("object"===typeof this.env.attachments[p]&&!this.env.attachments[p].complete)return alert(this.get_label("notuploadedwarning")),!1;if(""==h.val()){b=$('<div class="prompt">').html('<div class="message">'+this.get_label("nosubjectwarning")+"</div>").appendTo(document.body);var m=$("<input>").attr("type","text").attr("size",30).appendTo(b).val(this.get_label("nosubject")),
+d={};d[this.get_label("cancel")]=function(){h.focus();$(this).dialog("close")};d[this.get_label("sendmessage")]=function(){h.val(m.val());$(this).dialog("close");l.command(a,{nocheck:!0})};b.dialog({modal:!0,resizable:!1,buttons:d,close:function(a,b){$(this).remove()}});m.select();return!1}this.stop_spellchecking();window.tinyMCE&&(b=tinyMCE.get(this.env.composebody));if(!b&&""==k.val()&&!confirm(this.get_label("nobodywarning")))return k.focus(),!1;if(b){if(!b.getContent()&&!confirm(this.get_label("nobodywarning")))return b.focus(),
+!1;tinyMCE.triggerSave()}return!0};this.toggle_editor=function(a){this.stop_spellchecking();if("html"==a.mode)this.plain2html($("#"+a.id).val(),a.id),tinyMCE.execCommand("mceAddControl",!1,a.id),this.env.default_font&&setTimeout(function(){$(tinyMCE.get(a.id).getBody()).css("font-family",rcmail.env.default_font)},500);else{var b;if(b=tinyMCE.get(a.id).getContent()){if(!confirm(this.get_label("editorwarning")))return!1;this.html2plain(b,a.id)}tinyMCE.execCommand("mceRemoveControl",!1,a.id)}return!0};
+this.stop_spellchecking=function(){var a;window.tinyMCE&&(a=tinyMCE.get(this.env.composebody))?a.plugins&&(a.plugins.spellchecker&&a.plugins.spellchecker.active)&&a.execCommand("mceSpellCheck"):(a=this.env.spellcheck)&&a.state&&("ready"!=a.state&&"no_error_found"!=a.state)&&$(a.spell_span).trigger("click");this.spellcheck_state()};this.spellcheck_state=function(){var a,b;window.tinyMCE&&(a=tinyMCE.get(this.env.composebody))&&a.plugins&&a.plugins.spellchecker?b=a.plugins.spellchecker.active:(a=this.env.spellcheck)&&
+a.state&&(b="ready"!=a.state&&"no_error_found"!=a.state);if(rcmail.buttons.spellcheck)$("#"+rcmail.buttons.spellcheck[0].id)[b?"addClass":"removeClass"]("selected");return b};this.spellcheck_lang=function(){var a;if(window.tinyMCE&&(a=tinyMCE.get(this.env.composebody))&&a.plugins&&a.plugins.spellchecker)return a.plugins.spellchecker.selectedLang;if(this.env.spellcheck)return GOOGIE_CUR_LANG};this.spellcheck_lang_set=function(a){var b;window.tinyMCE&&(b=tinyMCE.get(this.env.composebody))&&b.plugins?
+b.plugins.spellchecker.selectedLang=a:this.env.spellcheck&&this.env.spellcheck.setCurrentLanguage(a)};this.spellcheck_resume=function(a,b){if(a){var d=tinyMCE.get(this.env.composebody),e=d.plugins.spellchecker;e.active=1;e._markWords(b);d.nodeChanged()}else{var e=this.env.spellcheck;e.prepare(!1,!0);e.processData(b)}this.spellcheck_state()};this.set_draft_id=function(a){var b;!this.env.draft_id&&a&&(b=this.opener())&&"mail"==b.env.task&&(""==b.env.action&&b.env.mailbox==this.env.drafts_mailbox)&&
+b.command("checkmail");this.env.draft_id=a;$("input[name='_draft_saveid']").val(a)};this.auto_save_start=function(){this.env.draft_autosave&&(this.save_timer=setTimeout(function(){l.command("savedraft")},1E3*this.env.draft_autosave));this.busy=!1};this.compose_field_hash=function(a){var b,d,e,f="",g=["to","cc","bcc","subject"];for(d=0;d<g.length;d++)if(e=$('[name="_'+g[d]+'"]').val())f+=e+":";f=window.tinyMCE&&(b=tinyMCE.get(this.env.composebody))?f+b.getContent():f+$("[name='_message']").val();if(this.env.attachments)for(var h in this.env.attachments)f+=
+h;a&&(this.cmp_hash=f);return f};this.change_identity=function(a,b){if(!a||!a.options)return!1;b||(b=this.env.show_sig);var d;d=-1;var e=a.options[a.selectedIndex].value,f=$("[name='_message']"),g=f.val(),h="1"==$("input[name='_is_html']").val(),k=this.env.identity;this.env.signatures&&this.env.signatures[e]?(this.enable_command("insert-sig",!0),this.env.compose_commands.push("insert-sig")):this.enable_command("insert-sig",!1);h?b&&this.env.signatures&&(d=tinyMCE.get(this.env.composebody),f=d.dom.get("_rc_sig"),
+f||(g=d.getBody(),k=d.getDoc(),f=k.createElement("div"),f.setAttribute("id","_rc_sig"),this.env.top_posting?(d.getWin().focus(),d=d.selection.getNode(),"BODY"==d.nodeName?(g.insertBefore(f,g.firstChild),g.insertBefore(k.createElement("br"),g.firstChild)):(g.insertBefore(f,d.nextSibling),g.insertBefore(k.createElement("br"),d.nextSibling))):(bw.ie&&g.appendChild(k.createElement("br")),g.appendChild(f))),this.env.signatures[e]&&(f.innerHTML=this.env.signatures[e].html)):(b&&(k&&this.env.signatures&&
+this.env.signatures[k])&&(k=this.env.signatures[k].text,k=k.replace(/\r\n/g,"\n"),d=this.env.top_posting?g.indexOf(k):g.lastIndexOf(k),0<=d&&(g=g.substring(0,d)+g.substring(d+k.length,g.length))),b&&this.env.signatures&&this.env.signatures[e]?(k=this.env.signatures[e].text,k=k.replace(/\r\n/g,"\n"),this.env.top_posting?0<=d?(g=g.substring(0,d)+k+g.substring(d,g.length),d-=1):g?(pos=this.get_caret_pos(f.get(0)))?(g=g.substring(0,pos)+"\n"+k+"\n\n"+g.substring(pos,g.length),d=pos):(d=0,g="\n\n"+k+"\n\n"+
+g.replace(/^[\r\n]+/,"")):(d=0,g="\n\n"+k):(g=g.replace(/[\r\n]+$/,""),d=!this.env.top_posting&&g.length?g.length+1:0,g+="\n\n"+k)):d=this.env.top_posting?0:g.length,f.val(g),this.set_caret_pos(f.get(0),d));this.env.identity=e;return!0};this.upload_file=function(a){if(!a)return!1;var b=0,d=0;$("input[type=file]",a).each(function(a,e){var f=e.files?e.files.length:e.value?1:0;if(e.files)for(a=0;a<f;a++)b+=e.files[a].size;d+=f});if(d){if(this.env.max_filesize&&this.env.filesizeerror&&b>this.env.max_filesize){this.display_message(this.env.filesizeerror,
+"error");return}var e=this.async_upload_form(a,"upload",function(a){var b,d="";try{this.contentDocument?b=this.contentDocument:this.contentWindow&&(b=this.contentWindow.document),d=b.childNodes[0].innerHTML}catch(e){}d.match(/add2attachment/)||bw.opera&&(!rcmail.env.uploadframe||rcmail.env.uploadframe!=a.data.ts)||(d.match(/display_message/)||rcmail.display_message(rcmail.get_label("fileuploaderror"),"error"),rcmail.remove_from_attachment_list(a.data.ts));bw.opera&&(rcmail.env.uploadframe=a.data.ts)}),
+f="<span>"+this.get_label("uploading"+(1<d?"many":""))+"</span>",g=e.replace(/^rcmupload/,"");this.add2attachment_list(g,{name:"",html:f,classname:"uploading",frame:e,complete:!1});this.env.upload_progress_time&&this.upload_progress_start("upload",g)}this.gui_objects.attachmentform=a;return!0};this.add2attachment_list=function(a,b,d){if(!this.gui_objects.attachmentlist)return!1;!b.complete&&l.env.loadingicon&&(b.html='<img src="'+l.env.loadingicon+'" alt="" class="uploading" />'+b.html);!b.complete&&
+b.frame&&(b.html='<a title="'+this.get_label("cancel")+'" onclick="return rcmail.cancel_attachment_upload(\''+a+"', '"+b.frame+'\');" href="#cancelupload" class="cancelupload">'+(this.env.cancelicon?'<img src="'+this.env.cancelicon+'" alt="" />':this.get_label("cancel"))+"</a>"+b.html);var e,f=$("<li>").attr("id",a).addClass(b.classname).html(b.html);d&&(e=document.getElementById(d))?f.replaceAll(e):f.appendTo(this.gui_objects.attachmentlist);d&&this.env.attachments[d]&&delete this.env.attachments[d];
+this.env.attachments[a]=b;return!0};this.remove_from_attachment_list=function(a){delete this.env.attachments[a];$("#"+a).remove()};this.remove_attachment=function(a){a&&this.env.attachments[a]&&this.http_post("remove-attachment",{_id:this.env.compose_id,_file:a});return!0};this.cancel_attachment_upload=function(a,b){if(!a||!b)return!1;this.remove_from_attachment_list(a);$("iframe[name='"+b+"']").remove();return!1};this.upload_progress_start=function(a,b){setTimeout(function(){rcmail.http_request(a,
+{_progress:b})},1E3*this.env.upload_progress_time)};this.upload_progress_update=function(a){var b=$("#"+a.name+"> span");b.length&&a.text&&(b.text(a.text),a.done||this.upload_progress_start(a.action,a.name))};this.add_contact=function(a){a&&this.http_post("addcontact",{_address:a});return!0};this.qsearch=function(a){if(""!=a){var b=this.set_busy(!0,"searching");a=this.search_params(a);this.message_list?this.clear_message_list():this.contact_list&&this.list_contacts_clear();this.env.source&&(a._source=
+this.env.source);this.env.group&&(a._gid=this.env.group);this.env.current_page=1;a=this.http_request("compose"==this.env.action&&this.contact_list?"search-contacts":"search",a,b);this.env.qsearch={lock:b,request:a}}};this.search_params=function(a,b){var d,e={},f=[],g=this.env.search_mods,h=this.env.mailbox;!b&&this.gui_objects.search_filter&&(b=this.gui_objects.search_filter.value);!a&&this.gui_objects.qsearchbox&&(a=this.gui_objects.qsearchbox.value);b&&(e._filter=b);if(a&&(e._q=a,g&&this.message_list&&
+(g=g[h]?g[h]:g["*"]),g)){for(d in g)f.push(d);e._headers=f.join(",")}h&&(e._mbox=h);return e};this.reset_qsearch=function(){this.gui_objects.qsearchbox&&(this.gui_objects.qsearchbox.value="");this.env.qsearch&&this.abort_request(this.env.qsearch);this.env.qsearch=null;this.env.search_request=null;this.env.search_id=null};this.sent_successfully=function(a,b,d){this.display_message(b,a);if(this.env.extwin){var e=this.opener();this.lock_form(this.gui_objects.messageform);e&&(e.display_message(b,a),d&&
+("mail"==e.env.task&&""==e.env.action&&e.env.mailbox==d)&&e.command("checkmail"));setTimeout(function(){window.close()},1E3)}else setTimeout(function(){l.list_mailbox()},500)};this.ksearch_keydown=function(a,b,d){this.ksearch_timer&&clearTimeout(this.ksearch_timer);var e=rcube_event.get_keycode(a),f=rcube_event.get_modifier(a);switch(e){case 38:case 40:if(!this.ksearch_visible())break;e=38==e?1:0;b=document.getElementById("rcmksearchSelected");b||(b=this.ksearch_pane.__ul.firstChild);b&&this.ksearch_select(e?
+b.previousSibling:b.nextSibling);return rcube_event.cancel(a);case 9:if(f==SHIFT_KEY||!this.ksearch_visible()){this.ksearch_hide();return}case 13:if(!this.ksearch_visible())return!1;this.insert_recipient(this.ksearch_selected);this.ksearch_hide();return rcube_event.cancel(a);case 27:this.ksearch_hide();return;case 37:case 39:if(f!=SHIFT_KEY)return}this.ksearch_timer=setTimeout(function(){l.ksearch_get_results(d)},200);this.ksearch_input=b;return!0};this.ksearch_visible=function(){return null!==this.ksearch_selected&&
+void 0!==this.ksearch_selected&&this.ksearch_value};this.ksearch_select=function(a){var b=$("#rcmksearchSelected");b[0]&&a&&b.removeAttr("id").removeClass("selected");a&&($(a).attr("id","rcmksearchSelected").addClass("selected"),this.ksearch_selected=a._rcm_id)};this.insert_recipient=function(a){if(null!==a&&this.env.contacts[a]&&this.ksearch_input){var b=this.ksearch_input.value,d=this.get_caret_pos(this.ksearch_input),d=b.lastIndexOf(this.ksearch_value,d),e=!1,f="",g=b.substring(0,d),b=b.substring(d+
+this.ksearch_value.length,b.length);this.ksearch_destroy();"object"===typeof this.env.contacts[a]&&this.env.contacts[a].id?(f+=this.env.contacts[a].name+this.env.recipients_delimiter,this.group2expand[this.env.contacts[a].id]=$.extend({input:this.ksearch_input},this.env.contacts[a]),this.http_request("mail/group-expand",{_source:this.env.contacts[a].source,_gid:this.env.contacts[a].id},!1)):"string"===typeof this.env.contacts[a]&&(f=this.env.contacts[a]+this.env.recipients_delimiter,e=!0);this.ksearch_input.value=
+g+f+b;d+=f.length;this.ksearch_input.setSelectionRange&&this.ksearch_input.setSelectionRange(d,d);e&&this.triggerEvent("autocomplete_insert",{field:this.ksearch_input,insert:f})}};this.replace_group_recipients=function(a,b){this.group2expand[a]&&(this.group2expand[a].input.value=this.group2expand[a].input.value.replace(this.group2expand[a].name,b),this.triggerEvent("autocomplete_insert",{field:this.group2expand[a].input,insert:b}),this.group2expand[a]=null)};this.ksearch_get_results=function(a){var b=
+this.ksearch_input?this.ksearch_input.value:null;if(null!==b){this.ksearch_pane&&this.ksearch_pane.is(":visible")&&this.ksearch_pane.hide();var d=this.get_caret_pos(this.ksearch_input),e=b.lastIndexOf(this.env.recipients_separator,d-1),b=b.substring(e+1,d),e=this.env.autocomplete_min_length,d=this.ksearch_data,b=$.trim(b);if(b!=this.ksearch_value)if(this.ksearch_destroy(),b.length&&b.length<e)this.ksearch_info||(this.ksearch_info=this.display_message(this.get_label("autocompletechars").replace("$min",
+e)));else if(e=this.ksearch_value,this.ksearch_value=b,b.length&&(!e||!e.length||0!=b.indexOf(e)||d&&!(0>=d.num)||!this.env.contacts||this.env.contacts.length)){var f,g,e=(new Date).getTime(),b={_search:b,_id:e},d=a&&a.threads?a.threads:1;f=a&&a.sources?a.sources:[];a=a&&a.action?a.action:"mail/autocomplete";this.ksearch_data={id:e,sources:f.slice(),action:a,locks:[],requests:[],num:f.length};for(e=0;e<d;e++){f=this.ksearch_data.sources.shift();if(1<d&&void 0===f)break;b._source=f?f:"";f=this.display_message(this.get_label("searching"),
+"loading");g=this.http_post(a,b,f);this.ksearch_data.locks.push(f);this.ksearch_data.requests.push(g)}}}};this.ksearch_query_results=function(a,b,d){if(this.ksearch_value&&(!this.ksearch_input||b==this.ksearch_value)){var e,f,g,h,k,p=this.ksearch_value;b=this.ksearch_data;var m=this.env.autocomplete_max?this.env.autocomplete_max:15;this.ksearch_pane||(g=$("<ul>"),this.ksearch_pane=$("<div>").attr("id","rcmKSearchpane").css({position:"absolute","z-index":3E4}).append(g).appendTo(document.body),this.ksearch_pane.__ul=
+g[0]);g=this.ksearch_pane.__ul;d&&this.ksearch_pane.data("reqid")==d?m-=g.childNodes.length:(this.ksearch_pane.data("reqid",d),g.innerHTML="",this.env.contacts=[],e=$(this.ksearch_input).offset(),this.ksearch_pane.css({left:e.left+"px",top:e.top+this.ksearch_input.offsetHeight+"px",display:"none"}));if(a&&(f=a.length))for(e=0;e<f&&0<m;e++)k="object"===typeof a[e]?a[e].name:a[e],h=document.createElement("LI"),h.innerHTML=k.replace(RegExp("("+RegExp.escape(p)+")","ig"),"##$1%%").replace(/</g,"&lt;").replace(/>/g,
+"&gt;").replace(/##([^%]+)%%/g,"<b>$1</b>"),h.onmouseover=function(){l.ksearch_select(this)},h.onmouseup=function(){l.ksearch_click(this)},h._rcm_id=this.env.contacts.length+e,g.appendChild(h),m-=1;g.childNodes.length&&(this.ksearch_pane.show(),this.env.contacts.length||($("li:first",g).attr("id","rcmksearchSelected").addClass("selected"),this.ksearch_selected=0));f&&(this.env.contacts=this.env.contacts.concat(a));if(b.id==d)if(b.num--,0<m&&b.sources.length){if(a=b.sources.shift())a={_search:p,_id:d,
+_source:a},d=this.display_message(this.get_label("searching"),"loading"),b=this.http_post(b.action,a,d),this.ksearch_data.locks.push(d),this.ksearch_data.requests.push(b)}else m||(this.ksearch_msg||(this.ksearch_msg=this.display_message(this.get_label("autocompletemore"))),this.ksearch_abort())}};this.ksearch_click=function(a){this.ksearch_input&&this.ksearch_input.focus();this.insert_recipient(a._rcm_id);this.ksearch_hide()};this.ksearch_blur=function(){this.ksearch_timer&&clearTimeout(this.ksearch_timer);
+this.ksearch_input=null;this.ksearch_hide()};this.ksearch_hide=function(){this.ksearch_selected=null;this.ksearch_value="";this.ksearch_pane&&this.ksearch_pane.hide();this.ksearch_destroy()};this.ksearch_destroy=function(){this.ksearch_abort();this.ksearch_info&&this.hide_message(this.ksearch_info);this.ksearch_msg&&this.hide_message(this.ksearch_msg);this.ksearch_msg=this.ksearch_info=this.ksearch_data=null};this.ksearch_abort=function(){var a,b,d=this.ksearch_data;if(d)for(a=0,b=d.locks.length;a<
+b;a++)this.abort_request({request:d.requests[a],lock:d.locks[a]})};this.contactlist_keypress=function(a){a.key_pressed==a.DELETE_KEY&&this.command("delete")};this.contactlist_select=function(a){this.preview_timer&&clearTimeout(this.preview_timer);var b,d,e,f=this,g=!1;e=this.env.source?this.env.address_sources[this.env.source]:null;(d=a.get_single_selection())?this.preview_timer=setTimeout(function(){f.load_contact(d,"show")},200):this.env.contentframe&&this.show_contentframe(!1);if(a.selection.length)if(this.env.selection_sources=
+[],e)this.env.selection_sources.push(this.env.source),g=!e.readonly;else{for(b in a.selection)(e=String(a.selection[b]).replace(/^[^-]+-/,""))&&this.env.address_sources[e]&&(g=g||!this.env.address_sources[e].readonly,this.env.selection_sources.push(e));this.env.selection_sources=$.unique(this.env.selection_sources)}this.enable_command("group-remove-selected",this.env.group&&0<a.selection.length);this.enable_command("compose",this.env.group||0<a.selection.length);this.enable_command("edit",d&&g);this.enable_command("delete",
+a.selection.length&&g);return!1};this.list_contacts=function(a,b,d){var e,f={},g=window;a||(a=this.env.source);if(d&&this.current_page==d&&a==this.env.source&&b==this.env.group)return!1;a!=this.env.source?(d=this.env.current_page=1,this.reset_qsearch()):b!=this.env.group&&(d=this.env.current_page=1);this.env.search_id?e="S"+this.env.search_id:this.env.search_request||(e=b?"G"+a+b:a);this.select_folder(e);this.env.source=a;this.env.group=b;if(this.gui_objects.contactslist)this.list_contacts_remote(a,
+b,d);else{if(e=this.get_frame_window(this.env.contentframe))g=e,f._framed=1;b&&(f._gid=b);d&&(f._page=d);a&&(f._source=a);this.env.search_request&&(f._search=this.env.search_request);this.set_busy(!0,"loading");this.location_href(f,g)}};this.list_contacts_remote=function(a,b,d){this.list_contacts_clear();var e={},f=this.set_busy(!0,"loading");a&&(e._source=a);d&&(e._page=d);b&&(e._gid=b);this.env.source=a;this.env.group=b;this.env.search_request&&(e._search=this.env.search_request);this.http_request("mail"==
+this.env.task?"list-contacts":"list",e,f)};this.list_contacts_clear=function(){this.contact_list.clear(!0);this.show_contentframe(!1);this.enable_command("delete",!1);this.enable_command("compose",this.env.group?!0:!1)};this.load_contact=function(a,b,d){var e,f={},g=window;if(e=this.get_frame_window(this.env.contentframe))f._framed=1,g=e,this.show_contentframe(!0),a||(this.contact_list.clear_selection(),this.enable_command("delete","compose",!1));else if(d)return!1;!b||(!a&&"add"!=b||this.drag_active)||
+(this.env.group&&(f._gid=this.env.group),f._action=b,f._source=this.env.source,f._cid=a,this.location_href(f,g,!0));return!0};this.group_member_change=function(a,b,d,e){a="add"==a?"add":"del";var f=this.get_label("add"==a?"addingmember":"removingmember"),f=this.display_message(f,"loading");this.http_post("group-"+a+"members",{_cid:b,_source:d,_gid:e},f)};this.copy_contact=function(a,b){var d="group"==b.type?b.source:b.id,e=this.env.source,f=this.env.group?this.env.group:"";a||(a=this.contact_list.get_selection().join(","));
+a&&(this.env.address_sources[d]&&!this.env.address_sources[d].readonly)&&(""==e&&1==this.env.selection_sources.length&&(e=this.env.selection_sources[0]),"group"==b.type?d==e?this.group_member_change("add",a,d,b.id):(e=this.display_message(this.get_label("copyingcontact"),"loading"),d={_cid:a,_source:this.env.source,_to:d,_togid:b.id,_gid:f},this.http_post("copy",d,e)):b.id!=e&&(e=this.display_message(this.get_label("copyingcontact"),"loading"),d={_cid:a,_source:this.env.source,_to:b.id,_gid:f},this.http_post("copy",
+d,e)))};this.delete_contacts=function(){var a=this.contact_list.get_selection(),b=this.env.source&&this.env.address_sources[this.env.source].undelete;if((a.length||this.env.cid)&&(b||confirm(this.get_label("deletecontactconfirm")))){var d,e=[],f={_source:this.env.source,_from:this.env.action?this.env.action:""},g=this.display_message(this.get_label("contactdeleting"),"loading");if(this.env.cid)e.push(this.env.cid);else{for(d=0;d<a.length;d++)b=a[d],e.push(b),this.contact_list.remove_row(b,d==a.length-
+1);1==a.length&&this.show_contentframe(!1)}f._cid=e.join(",");this.env.group&&(f._gid=this.env.group);this.env.search_request&&(f._search=this.env.search_request);this.http_post("delete",f,g);return!0}};this.update_contact_row=function(a,b,d,e){var f,g=this.contact_list;a=this.html_identifier(a);g.rows[a]||(a=a+"-"+e,d&&(d=d+"-"+e));if(g.rows[a]&&(f=g.rows[a].obj)){for(e=0;e<b.length;e++)f.cells[e]&&$(f.cells[e]).html(b[e]);d&&(d=this.html_identifier(d),f.id="rcmrow"+d,g.remove_row(a),g.init_row(f),
+g.selection[0]=d,f.style.display="")}};this.add_contact_row=function(a,b,d){if(!this.gui_objects.contactslist)return!1;var e,f=this.contact_list,g=document.createElement("tr");g.id="rcmrow"+this.html_identifier(a);g.className="contact "+(d||"");f.in_selection(a)&&(g.className+=" selected");for(e in b)a=document.createElement("td"),a.className=String(e).toLowerCase(),b[e]&&(a.innerHTML=b[e]),g.appendChild(a);f.insert_row(g);this.enable_command("export",0<f.rowcount)};this.init_contact_form=function(){var a=
+this,b;if(this.env.coltypes)for(b in this.set_photo_actions($("#ff_photo").val()),this.env.coltypes)this.init_edit_field(b,null);$(".contactfieldgroup .row a.deletebutton").click(function(){a.delete_edit_field(this);return!1});$("select.addfieldmenu").change(function(b){a.insert_edit_field($(this).val(),$(this).attr("rel"),this);this.selectedIndex=0});$.datepicker&&this.env.date_format&&($.datepicker.setDefaults({dateFormat:this.env.date_format,changeMonth:!0,changeYear:!0,yearRange:"-100:+10",showOtherMonths:!0,
+selectOtherMonths:!0,onSelect:function(a){$(this).focus().val(a)}}),$("input.datepicker").datepicker());$("input[type='text']:visible").first().focus();"search"==this.env.action&&$(this.gui_objects.editform).append($('<input type="submit">').hide()).submit(function(){$("input.mainaction").click();return!1})};this.group_create=function(){this.add_input_row("contactgroup")};this.group_rename=function(){if(this.env.group&&this.gui_objects.folderlist){if(!this.name_input){this.enable_command("list","listgroup",
+!1);this.name_input=$("<input>").attr("type","text").val(this.env.contactgroups["G"+this.env.source+this.env.group].name);this.name_input.bind("keydown",function(a){return rcmail.add_input_keydown(a)});this.env.group_renaming=!0;var a,b=this.get_folder_li(this.env.source+this.env.group,"rcmliG");b&&(a=b.firstChild)&&$(a).hide().before(this.name_input)}this.name_input.select().focus()}};this.group_delete=function(){if(this.env.group&&confirm(this.get_label("deletegroupconfirm"))){var a=this.set_busy(!0,
+"groupdeleting");this.http_post("group-delete",{_source:this.env.source,_gid:this.env.group},a)}};this.remove_group_item=function(a){var b,d="G"+a.source+a.id;if(b=this.get_folder_li(d))this.triggerEvent("group_delete",{source:a.source,id:a.id,li:b}),b.parentNode.removeChild(b),delete this.env.contactfolders[d],delete this.env.contactgroups[d];this.list_contacts(a.source,0)};this.add_input_row=function(a){this.gui_objects.folderlist&&(this.name_input||(this.name_input=$("<input>").attr("type","text").data("tt",
+a),this.name_input.bind("keydown",function(a){return rcmail.add_input_keydown(a)}),this.name_input_li=$("<li>").addClass(a).append(this.name_input),a="contactsearch"==a?$("li:last",this.gui_objects.folderlist):this.get_folder_li(this.env.source),this.name_input_li.insertAfter(a)),this.name_input.select().focus())};this.group_remove_selected=function(){l.http_post("group-delmembers",{_cid:this.contact_list.selection,_source:this.env.source,_gid:this.env.group})};this.remove_group_contacts=function(a){if("undefined"!=
+typeof this.env.group&&this.env.group===a.gid){var b=this.contact_list.get_selection();for(a=0;a<b.length;a++)id=b[a],this.contact_list.remove_row(id,a==b.length-1)}};this.add_input_keydown=function(a){var b=rcube_event.get_keycode(a),d=$(a.target);a=d.data("tt");if(13==b){if(b=d.val())d=this.set_busy(!0,"loading"),"contactsearch"==a?this.http_post("search-create",{_search:this.env.search_request,_name:b},d):this.env.group_renaming?this.http_post("group-rename",{_source:this.env.source,_gid:this.env.group,
+_name:b},d):this.http_post("group-create",{_source:this.env.source,_name:b},d);return!1}27==b&&this.reset_add_input();return!0};this.reset_add_input=function(){this.name_input&&(this.env.group_renaming&&(this.name_input.parent().children().last().show(),this.env.group_renaming=!1),this.name_input.remove(),this.name_input_li&&this.name_input_li.remove(),this.name_input=this.name_input_li=null);this.enable_command("list","listgroup",!0)};this.insert_contact_group=function(a){this.reset_add_input();
+a.type="group";var b="G"+a.source+a.id,d=$("<a>").attr("href","#").attr("rel",a.source+":"+a.id).click(function(){return rcmail.command("listgroup",a,this)}).html(a.name),d=$("<li>").attr({id:"rcmli"+this.html_identifier(b),"class":"contactgroup"}).append(d);this.env.contactfolders[b]=this.env.contactgroups[b]=a;this.add_contact_group_row(a,d);this.triggerEvent("group_insert",{id:a.id,source:a.source,name:a.name,li:d[0]})};this.update_contact_group=function(a){this.reset_add_input();var b="G"+a.source+
+a.id,d=this.get_folder_li(b),e;if(d&&a.newid){e="G"+a.source+a.newid;var f=$.extend({},a);d.id="rcmli"+this.html_identifier(e);this.env.contactfolders[e]=this.env.contactfolders[b];this.env.contactfolders[e].id=a.newid;this.env.group=a.newid;delete this.env.contactfolders[b];delete this.env.contactgroups[b];f.id=a.newid;f.type="group";e=$("<a>").attr("href","#").attr("rel",a.source+":"+a.newid).click(function(){return rcmail.command("listgroup",f,this)}).html(a.name);$(d).children().replaceWith(e)}else d&&
+((e=d.firstChild)&&"a"==e.tagName.toLowerCase())&&(e.innerHTML=a.name);this.env.contactfolders[b].name=this.env.contactgroups[b].name=a.name;this.add_contact_group_row(a,$(d),!0);this.triggerEvent("group_update",{id:a.id,source:a.source,name:a.name,li:d[0],newid:a.newid})};this.add_contact_group_row=function(a,b,d){var e=a.name.toUpperCase(),f=this.get_folder_li(a.source);a="rcmliG"+this.html_identifier(a.source);d?(d=b.clone(!0),b.remove()):d=b;$('li[id^="'+a+'"]',this.gui_objects.folderlist).each(function(a,
+b){if(e>=$(this).text().toUpperCase())f=b;else return!1});d.insertAfter(f)};this.update_group_commands=function(){var a=""!=this.env.source?this.env.address_sources[this.env.source]:null;this.enable_command("group-create",a&&a.groups&&!a.readonly);this.enable_command("group-rename","group-delete",a&&a.groups&&this.env.group&&!a.readonly)};this.init_edit_field=function(a,b){var d=this.env.coltypes[a].label;b||(b=$(".ff_"+a));d&&b.placeholder(d)};this.insert_edit_field=function(a,b,d){var e=$("#ff_"+
+a);if(e.length)e.show().focus(),$(d).children('option[value="'+a+'"]').prop("disabled",!0);else{$(".ff_"+a);e=$("#contactsection"+b+" .contactcontroller"+a);if(!e.length){b=$("#contactsection"+b);var f=$(".contactfieldgroup",b).last(),e=$("<fieldset>").addClass("contactfieldgroup contactcontroller"+a);f.length?e.insertAfter(f):b.prepend(e)}if(e.length&&"FIELDSET"==e.get(0).nodeName){var g;b=this.env.coltypes[a];var f=$("<div>").addClass("row"),h=$("<div>").addClass("contactfieldcontent data"),k=$("<div>").addClass("contactfieldlabel label");
+b.subtypes_select?k.html(b.subtypes_select):k.html(b.label);var p=1!=b.limit?"[]":"";if("text"==b.type||"date"==b.type)g=$("<input>").addClass("ff_"+a).attr({type:"text",name:"_"+a+p,size:b.size}).appendTo(h),this.init_edit_field(a,g),"date"==b.type&&$.datepicker&&g.datepicker();else if("textarea"==b.type)g=$("<textarea>").addClass("ff_"+a).attr({name:"_"+a+p,cols:b.size,rows:b.rows}).appendTo(h),this.init_edit_field(a,g);else if("composite"==b.type){var m,n,q=[],s=[];if(g=this.env[a+"_template"])for(m=
+0;m<g.length;m++)q.push(g[m][1]),s.push(g[m][2]);else for(m in b.childs)q.push(m);for(var t=0;t<q.length;t++)m=q[t],g=b.childs[m],g=$("<input>").addClass("ff_"+m).attr({type:"text",name:"_"+m+p,size:g.size}).appendTo(h),h.append(s[t]||" "),this.init_edit_field(m,g),n||(n=g);g=n}else if("select"==b.type){g=$("<select>").addClass("ff_"+a).attr("name","_"+a+p).appendTo(h);var u=g.attr("options");u[u.length]=new Option("---","");b.options&&$.each(b.options,function(a,b){u[u.length]=new Option(b,a)})}g&&
+($('<a href="#del"></a>').addClass("contactfieldbutton deletebutton").attr({title:this.get_label("delete"),rel:a}).html(this.env.delbutton).click(function(){l.delete_edit_field(this);return!1}).appendTo(h),f.append(k).append(h).appendTo(e.show()),g.first().focus(),b.count||(b.count=0),++b.count==b.limit&&b.limit&&$(d).children('option[value="'+a+'"]').prop("disabled",!0))}}};this.delete_edit_field=function(a){var b=$(a).attr("rel"),d=this.env.coltypes[b],e=$(a).parents("fieldset.contactfieldgroup"),
+f=e.parent().find("select.addfieldmenu");0>=--d.count&&d.visible?$(a).parent().children("input").val("").blur():($(a).parents("div.row").remove(),e.children("div.row").length||e.hide());f.length&&(a=f.children('option[value="'+b+'"]'),a.length?a.prop("disabled",!1):$("<option>").attr("value",b).html(d.label).appendTo(f),f.show())};this.upload_contact_photo=function(a){a&&a.elements._photo.value&&(this.async_upload_form(a,"upload-photo",function(a){rcmail.set_busy(!1,null,rcmail.file_upload_id)}),
+this.file_upload_id=this.set_busy(!0,"uploading"))};this.replace_contact_photo=function(a){var b="-del-"==a?this.env.photo_placeholder:this.env.comm_path+"&_action=photo&_source="+this.env.source+"&_cid="+this.env.cid+"&_photo="+a;this.set_photo_actions(a);$(this.gui_objects.contactphoto).children("img").attr("src",b)};this.photo_upload_end=function(){this.set_busy(!1,null,this.file_upload_id);delete this.file_upload_id};this.set_photo_actions=function(a){var b,d=this.buttons["upload-photo"];for(b=
+0;d&&b<d.length;b++)$("a#"+d[b].id).html(this.get_label("-del-"==a?"addphoto":"replacephoto"));$("#ff_photo").val(a);this.enable_command("upload-photo",this.env.coltypes.photo?!0:!1);this.enable_command("delete-photo",this.env.coltypes.photo&&"-del-"!=a)};this.advanced_search=function(){var a,b={_form:1,_action:"search"},d=window;if(a=this.get_frame_window(this.env.contentframe))b._framed=1,d=a,this.contact_list.clear_selection();this.location_href(b,d,!0);return!0};this.unselect_directory=function(){this.select_folder("");
+this.enable_command("search-delete",!1)};this.insert_saved_search=function(a,b){this.reset_add_input();var d="S"+b,e=$("<a>").attr("href","#").attr("rel",b).click(function(){return rcmail.command("listsearch",b,this)}).html(a),d=$("<li>").attr({id:"rcmli"+this.html_identifier(d),"class":"contactsearch"}).append(e),e={name:a,id:b,li:d[0]};this.add_saved_search_row(e,d);this.select_folder("S"+b);this.enable_command("search-delete",!0);this.env.search_id=b;this.triggerEvent("abook_search_insert",e)};
+this.add_saved_search_row=function(a,b,d){var e,f=a.name.toUpperCase();d?(a=b.clone(!0),b.remove()):a=b;$('li[class~="contactsearch"]',this.gui_objects.folderlist).each(function(a,b){e||(e=this.previousSibling);if(f>=$(this).text().toUpperCase())e=b;else return!1});e?a.insertAfter(e):a.appendTo(this.gui_objects.folderlist)};this.search_create=function(){this.add_input_row("contactsearch")};this.search_delete=function(){if(this.env.search_request){var a=this.set_busy(!0,"savedsearchdeleting");this.http_post("search-delete",
+{_sid:this.env.search_id},a)}};this.remove_search_item=function(a){var b;if(b=this.get_folder_li("S"+a))this.triggerEvent("search_delete",{id:a,li:b}),b.parentNode.removeChild(b);this.env.search_id=null;this.env.search_request=null;this.list_contacts_clear();this.reset_qsearch();this.enable_command("search-delete","search-create",!1)};this.listsearch=function(a){var b=this.set_busy(!0,"searching");this.contact_list&&this.list_contacts_clear();this.reset_qsearch();this.select_folder("S"+a);this.env.current_page=
+1;this.http_request("search",{_sid:a},b)};this.section_select=function(a){var b;b=a.get_single_selection();a=window;var d={_action:"edit-prefs",_section:b};if(b){if(b=this.get_frame_window(this.env.contentframe))d._framed=1,a=b;this.location_href(d,a,!0)}return!0};this.identity_select=function(a){var b;if(b=a.get_single_selection())this.enable_command("delete",1<a.rowcount&&2>this.env.identities_level),this.load_identity(b,"edit-identity")};this.load_identity=function(a,b){if("edit-identity"==b&&
+(!a||a==this.env.iid))return!1;var d,e=window,f={_action:b,_iid:a};if(d=this.get_frame_window(this.env.contentframe))f._framed=1,e=d;b&&(a||"add-identity"==b)&&(this.set_busy(!0),this.location_href(f,e));return!0};this.delete_identity=function(a){var b=this.identity_list.get_selection();if(b.length||this.env.iid)return a||(a=this.env.iid?this.env.iid:b[0]),confirm(this.get_label("deleteidentityconfirm"))&&this.goto_url("delete-identity",{_iid:a,_token:this.env.request_token},!0),!0};this.update_identity_row=
+function(a,b,d){var e,f=this.identity_list;a=this.html_identifier(a);f.rows[a]&&(e=f.rows[a].obj)?$(e.cells[0]).html(b):d&&(e=$("<tr>").attr("id","rcmrow"+a).get(0),$("<td>").addClass("mail").html(b).appendTo(e),f.insert_row(e),f.select(a))};this.init_subscription_list=function(){var a=this;this.subscription_list=new rcube_list_widget(this.gui_objects.subscriptionlist,{multiselect:!1,draggable:!0,keyboard:!1,toggleselect:!0});this.subscription_list.addEventListener("select",function(b){a.subscription_select(b)});
+this.subscription_list.addEventListener("dragstart",function(b){a.drag_active=!0});this.subscription_list.addEventListener("dragend",function(b){a.subscription_move_folder(b)});this.subscription_list.row_init=function(b){b.obj.onmouseover=function(){a.focus_subscription(b.id)};b.obj.onmouseout=function(){a.unfocus_subscription(b.id)}};this.subscription_list.init();$("#mailboxroot").mouseover(function(){a.focus_subscription(this.id)}).mouseout(function(){a.unfocus_subscription(this.id)})};this.focus_subscription=
+function(a){var b,d,e=RegExp.escape(this.env.delimiter),e=RegExp("["+e+"]?[^"+e+"]+$");this.drag_active&&(this.env.mailbox&&(b=document.getElementById(a)))&&(this.env.subscriptionrows[a]&&null!==(d=this.env.subscriptionrows[a][0])&&this.check_droptarget(d)&&!this.env.subscriptionrows[this.get_folder_row_id(this.env.mailbox)][2]&&d!=this.env.mailbox.replace(e,"")&&!d.match(RegExp("^"+RegExp.escape(this.env.mailbox+this.env.delimiter))))&&(this.env.dstfolder=d,$(b).addClass("droptarget"))};this.unfocus_subscription=
+function(a){var b=$("#"+a);this.env.dstfolder=null;this.env.subscriptionrows[a]&&b[0]?b.removeClass("droptarget"):$(this.subscription_list.frame).removeClass("droptarget")};this.subscription_select=function(a){var b,d;a&&(b=a.get_single_selection())&&(d=this.env.subscriptionrows["rcmrow"+b])?(this.env.mailbox=d[0],this.show_folder(d[0]),this.enable_command("delete-folder",!d[2])):(this.env.mailbox=null,this.show_contentframe(!1),this.enable_command("delete-folder","purge",!1))};this.subscription_move_folder=
+function(a){a=RegExp.escape(this.env.delimiter);var b=RegExp("["+a+"]?[^"+a+"]+$");this.env.mailbox&&(null!==this.env.dstfolder&&this.env.dstfolder!=this.env.mailbox&&this.env.dstfolder!=this.env.mailbox.replace(b,""))&&(b=RegExp("[^"+a+"]*["+a+"]","g"),a=this.env.mailbox.replace(b,""),a=""===this.env.dstfolder?a:this.env.dstfolder+this.env.delimiter+a,a!=this.env.mailbox&&(this.http_post("rename-folder",{_folder_oldname:this.env.mailbox,_folder_newname:a},this.set_busy(!0,"foldermoving")),this.subscription_list.draglayer.hide()));
+this.drag_active=!1;this.unfocus_subscription(this.get_folder_row_id(this.env.dstfolder))};this.create_folder=function(){this.show_folder("",this.env.mailbox)};this.delete_folder=function(a){a=this.get_folder_row_id(a?a:this.env.mailbox);if((a=this.env.subscriptionrows[a][0])&&confirm(this.get_label("deletefolderconfirm"))){var b=this.set_busy(!0,"folderdeleting");this.http_post("delete-folder",{_mbox:a},b)}};this.add_folder_row=function(a,b,d,e,f,g){if(!this.gui_objects.subscriptionlist)return!1;
+var h,k,l,m,n,q=[],s=[],t=this.gui_objects.subscriptionlist.tBodies[0];h=$("tr",t).get(1);var u="rcmrow"+(new Date).getTime();if(!h)return this.goto_url("folders"),!1;h=$(h).clone(!0);h.attr("id",u);h.attr("class",g);h.find("td:first").html(b);$('input[name="_subscribed[]"]',h).val(a).prop({checked:e?!0:!1,disabled:d?!0:!1});this.env.subscriptionrows[u]=[a,b,0];m=[];$.each(this.env.subscriptionrows,function(a,b){m.push(b)});m.sort(function(a,b){return a[0]<b[0]?-1:a[0]>b[0]?1:0});for(k in m)m[k][2]?
+(b=m[k][0]+this.env.delimiter,b!=this.env.prefix_ns&&(s.push(m[k][0]),l=b)):l&&0==m[k][0].indexOf(l)?s.push(m[k][0]):(q.push(m[k][0]),l=null);for(k=0;k<s.length;k++)0==a.indexOf(s[k]+this.env.delimiter)&&(n=this.get_folder_row_id(s[k]));for(k=0;!n&&k<q.length;k++)k&&q[k]==a&&(n=this.get_folder_row_id(q[k-1]));n?$("#"+n).after(h):h.appendTo(t);this.subscription_list.clear_selection();f||this.init_subscription_list();h=h.get(0);h.scrollIntoView&&h.scrollIntoView();return h};this.replace_folder_row=
+function(a,b,d,e,f){if(!this.gui_objects.subscriptionlist)return!1;var g,h,k,l,m=this.get_folder_row_id(a),n=RegExp("^"+RegExp.escape(a));g=$('input[name="_subscribed[]"]',$("#"+m)).prop("checked");var q=this.get_subfolders(a);this._remove_folder_row(m);e=$(this.add_folder_row(b,d,e,g,!0,f));if(d=q.length)l=a.split(this.env.delimiter).length-b.split(this.env.delimiter).length;for(a=0;a<d;a++)if(m=q[a],g=this.env.subscriptionrows[m][0],f=this.env.subscriptionrows[m][1],h=$("#"+m),k=h.clone(!0),h.remove(),
+e.after(k),e=k,g=g.replace(n,b),$('input[name="_subscribed[]"]',e).val(g),this.env.subscriptionrows[m][0]=g,0!=l){if(0<l)for(g=l;0<g;g--)f=f.replace(/^&nbsp;&nbsp;&nbsp;&nbsp;/,"");else for(g=l;0>g;g++)f="&nbsp;&nbsp;&nbsp;&nbsp;"+f;e.find("td:first").html(f);this.env.subscriptionrows[m][1]=f}this.init_subscription_list()};this.remove_folder_row=function(a,b){var d,e,f=[];d=this.get_folder_row_id(a);b&&(f=this.get_subfolders(a));this._remove_folder_row(d);d=0;for(e=f.length;d<e;d++)this._remove_folder_row(f[d])};
+this._remove_folder_row=function(a){this.subscription_list.remove_row(a.replace(/^rcmrow/,""));$("#"+a).remove();delete this.env.subscriptionrows[a]};this.get_subfolders=function(a){for(var b=[],d=RegExp("^"+RegExp.escape(a)+RegExp.escape(this.env.delimiter)),e=$("#"+this.get_folder_row_id(a)).get(0);e=e.nextSibling;)if(e.id)if(a=this.env.subscriptionrows[e.id][0],d.test(a))b.push(e.id);else break;return b};this.subscribe=function(a){if(a){var b=this.display_message(this.get_label("foldersubscribing"),
+"loading");this.http_post("subscribe",{_mbox:a},b)}};this.unsubscribe=function(a){if(a){var b=this.display_message(this.get_label("folderunsubscribing"),"loading");this.http_post("unsubscribe",{_mbox:a},b)}};this.get_folder_row_id=function(a){var b,d=this.env.subscriptionrows;for(b in d)if(d[b]&&d[b][0]==a)break;return b};this.show_folder=function(a,b,d){var e=window;a="&_action=edit-folder&_mbox="+urlencode(a);b&&(a+="&_path="+urlencode(b));if(b=this.get_frame_window(this.env.contentframe))e=b,a+=
+"&_framed=1";0<=String(e.location.href).indexOf(a)&&!d?this.show_contentframe(!0):this.location_href(this.env.comm_path+a,e,!0)};this.disable_subscription=function(a){(a=this.get_folder_row_id(a))&&$('input[name="_subscribed[]"]',$("#"+a)).prop("disabled",!0)};this.folder_size=function(a){var b=this.set_busy(!0,"loading");this.http_post("folder-size",{_mbox:a},b)};this.folder_size_update=function(a){$("#folder-size").replaceWith(a)};var v=function(a,b){var d=document.getElementById(b.id);if(d){var e=
+!1;"image"==b.type&&(d=d.parentNode,e=!0);d._command=a;d._id=b.id;b.sel&&(d.onmousedown=function(a){return rcmail.button_sel(this._command,this._id)},d.onmouseup=function(a){return rcmail.button_out(this._command,this._id)},e&&((new Image).src=b.sel));b.over&&(d.onmouseover=function(a){return rcmail.button_over(this._command,this._id)},d.onmouseout=function(a){return rcmail.button_out(this._command,this._id)},e&&((new Image).src=b.over))}};this.init_buttons=function(){for(var a in this.buttons)if("string"===
+typeof a)for(var b=0;b<this.buttons[a].length;b++)v(a,this.buttons[a][b]);this.set_button(this.task,"sel")};this.set_button=function(a,b){var d,e,f,g=this.buttons[a],h=g?g.length:0;for(d=0;d<h;d++)if(e=g[d],f=document.getElementById(e.id))"image"!=e.type||e.status?e.status||(e.pas=String(f.className)):(e.pas=f._original_src?f._original_src:f.src,f.runtimeStyle&&(f.runtimeStyle.filter&&f.runtimeStyle.filter.match(/src=['"]([^'"]+)['"]/))&&(e.pas=RegExp.$1)),"image"==e.type&&e[b]?(e.status=b,f.src=
+e[b]):void 0!==e[b]&&(e.status=b,f.className=e[b]),"input"==e.type&&(e.status=b,f.disabled=!b)};this.set_alttext=function(a,b){var d,e,f,g,h=this.buttons[a],k=h?h.length:0;for(d=0;d<k;d++)e=h[d],f=document.getElementById(e.id),"image"==e.type&&f?(f.setAttribute("alt",this.get_label(b)),(g=f.parentNode)&&"a"==g.tagName.toLowerCase()&&g.setAttribute("title",this.get_label(b))):f&&f.setAttribute("title",this.get_label(b))};this.button_over=function(a,b){var d,e,f,g=this.buttons[a],h=g?g.length:0;for(d=
+0;d<h;d++)e=g[d],e.id==b&&"act"==e.status&&(f=document.getElementById(e.id))&&e.over&&("image"==e.type?f.src=e.over:f.className=e.over)};this.button_sel=function(a,b){var d,e,f,g=this.buttons[a],h=g?g.length:0;for(d=0;d<h;d++)e=g[d],e.id==b&&"act"==e.status&&((f=document.getElementById(e.id))&&e.sel&&("image"==e.type?f.src=e.sel:f.className=e.sel),this.buttons_sel[b]=a)};this.button_out=function(a,b){var d,e,f,g=this.buttons[a],h=g?g.length:0;for(d=0;d<h;d++)e=g[d],e.id==b&&"act"==e.status&&(f=document.getElementById(e.id))&&
+e.act&&("image"==e.type?f.src=e.act:f.className=e.act)};this.set_pagetitle=function(a){a&&document.title&&(document.title=a)};this.display_message=function(a,b,d){if(this.is_framed())return parent.rcmail.display_message(a,b,d);if(!this.gui_objects.message)return"loading"!=b&&(this.pending_message=[a,b,d]),1;b=b?b:"notice";var e=this,f=this.html_identifier(a),g=b+(new Date).getTime();d||(d=this.message_time*("error"==b||"warning"==b?2:1));"loading"==b&&(f="loading",d=1E3*this.env.request_timeout,a||
+(a=this.get_label("loading")));if(this.messages[f])return this.messages[f].obj&&this.messages[f].obj.html(a),"loading"==b&&this.messages[f].labels.push({id:g,msg:a}),this.messages[f].elements.push(g),setTimeout(function(){e.hide_message(g,"loading"==b)},d),g;var h=$("<div>").addClass(b).html(a).data("key",f);$(this.gui_objects.message).append(h).show();this.messages[f]={obj:h,elements:[g]};"loading"==b?this.messages[f].labels=[{id:g,msg:a}]:h.click(function(){return e.hide_message(h)});this.triggerEvent("message",
+{message:a,type:b,timeout:d,object:h});0<d&&setTimeout(function(){e.hide_message(g,"loading"==b)},d);return g};this.hide_message=function(a,b){if(this.is_framed())return parent.rcmail.hide_message(a,b);if(this.gui_objects.message){var d,e,f,g,h=this.messages;if("object"===typeof a)$(a)[b?"fadeOut":"hide"](),g=$(a).data("key"),this.messages[g]&&delete this.messages[g];else for(d in h)for(e in h[d].elements)if(h[d]&&h[d].elements[e]==a)if(h[d].elements.splice(e,1),!h[d].elements.length)h[d].obj[b?"fadeOut":
+"hide"](),delete h[d];else if("loading"==d)for(f in h[d].labels)h[d].labels[f].id==a?delete h[d].labels[f]:g=h[d].labels[f].msg,h[d].obj.html(g)}};this.clear_messages=function(){if(this.is_framed())return parent.rcmail.clear_messages();var a,b,d=this.messages;for(a in d)for(b in d[a].elements)d[a].obj&&d[a].obj.hide();this.messages={}};this.show_popup_dialog=function(a,b){if(this.is_framed())parent.rcmail.show_popup_dialog(a,b);else{var d=$('<div class="popup">').html(a).dialog({title:b,modal:!0,
+resizable:!0,width:580,close:function(a,b){$(this).remove()}}),e=$(window),f=e.width(),e=e.height(),g=d.width(),h=d.height();d.dialog("option",{height:Math.min(e-40,h+50),width:Math.min(f-20,g+50)}).dialog("option","position",["center","center"])}};this.set_page_buttons=function(){this.enable_command("nextpage","lastpage",this.env.pagecount>this.env.current_page);this.enable_command("previouspage","firstpage",1<this.env.current_page)};this.select_folder=function(a,b,d){if(this.gui_objects.folderlist){var e,
+f;(e=$("li.selected",this.gui_objects.folderlist))&&e.removeClass("selected").addClass("unfocused");(f=this.get_folder_li(a,b,d))&&$(f).removeClass("unfocused").addClass("selected");this.triggerEvent("selectfolder",{folder:a,prefix:b})}};this.mark_folder=function(a,b,d,e){$(this.get_folder_li(a,d,e)).addClass(b)};this.unmark_folder=function(a,b,d,e){$(this.get_folder_li(a,d,e)).removeClass(b)};this.get_folder_li=function(a,b,d){b||(b="rcmli");return this.gui_objects.folderlist?(a=this.html_identifier(a,
+d),document.getElementById(b+a)):null};this.set_message_coltypes=function(a,b,d){var e=this.message_list,f=e?e.list.tHead:null,g,h,k;this.env.coltypes=a;if(f){if(b){g=document.createElement("thead");k=document.createElement("tr");c=0;for(h=b.length;c<h;c++)a=document.createElement("td"),a.innerHTML=b[c].html||"",b[c].id&&(a.id=b[c].id),b[c].className&&(a.className=b[c].className),k.appendChild(a);g.appendChild(k);f.parentNode.replaceChild(g,f);f=g}g=0;for(h=this.env.coltypes.length;g<h;g++)b=this.env.coltypes[g],
+!(a=f.rows[0].cells[g])||"from"!=b&&"to"!=b&&"fromto"!=b||(a.id="rcm"+b,$("span,a",a).text(this.get_label("fromto"==b?d:b)),$("a",a).click(function(){return rcmail.command("sort",this.id.replace(/^rcm/,""),this)}))}this.env.subject_col=null;this.env.flagged_col=null;this.env.status_col=null;0<=(g=$.inArray("subject",this.env.coltypes))&&(this.env.subject_col=g,e&&(e.subject_col=g));0<=(g=$.inArray("flag",this.env.coltypes))&&(this.env.flagged_col=g);0<=(g=$.inArray("status",this.env.coltypes))&&(this.env.status_col=
+g);e&&e.init_header()};this.set_rowcount=function(a,b){if(b&&b!=this.env.mailbox)return!1;$(this.gui_objects.countdisplay).html(a);this.set_page_buttons()};this.set_mailboxname=function(a){this.gui_objects.mailboxname&&a&&(this.gui_objects.mailboxname.innerHTML=a)};this.set_quota=function(a){this.gui_objects.quotadisplay&&(a&&"text"==a.type)&&$(this.gui_objects.quotadisplay).html(a.percent+"%").attr("title",a.title);this.triggerEvent("setquota",a);this.env.quota_content=a};this.set_unread_count=function(a,
+b,d,e){if(!this.gui_objects.mailboxlist)return!1;this.env.unread_counts[a]=b;this.set_unread_count_display(a,d);e?this.mark_folder(a,e,"",!0):b||this.unmark_folder(a,"recent","",!0)};this.set_unread_count_display=function(a,b){var d,e,f,g,h;if(f=this.get_folder_li(a,"",!0)){g=this.env.unread_counts[a]?this.env.unread_counts[a]:0;e=$(f).children("a").eq(0);d=e.children("span.unreadcount");!d.length&&g&&(d=$("<span>").addClass("unreadcount").appendTo(e));e=0;if((h=f.getElementsByTagName("div")[0])&&
+h.className.match(/collapsed/))for(var k in this.env.unread_counts)0==k.indexOf(a+this.env.delimiter)&&(e+=this.env.unread_counts[k]);g&&d.length?d.html(this.env.unreadwrap.replace(/%[sd]/,g)):d.length&&d.remove();d=RegExp(RegExp.escape(this.env.delimiter)+"[^"+RegExp.escape(this.env.delimiter)+"]+$");a.match(d)&&this.set_unread_count_display(a.replace(d,""),!1);0<g+e?$(f).addClass("unread"):$(f).removeClass("unread")}d=/^\([0-9]+\)\s+/i;b&&document.title&&(f="",f=String(document.title),f=g&&f.match(d)?
+f.replace(d,"("+g+") "):g?"("+g+") "+f:f.replace(d,""),this.set_pagetitle(f))};this.set_headers=function(a){this.gui_objects.all_headers_row&&(this.gui_objects.all_headers_box&&a)&&$(this.gui_objects.all_headers_box).html(a).show()};this.show_headers=function(a,b){if(this.gui_objects.all_headers_row&&(this.gui_objects.all_headers_box&&this.env.uid)&&($(b).removeClass("show-headers").addClass("hide-headers"),$(this.gui_objects.all_headers_row).show(),b.onclick=function(){rcmail.command("hide-headers",
+"",b)},!this.gui_objects.all_headers_box.innerHTML)){var d=this.display_message(this.get_label("loading"),"loading");this.http_post("headers",{_uid:this.env.uid},d)}};this.hide_headers=function(a,b){this.gui_objects.all_headers_row&&this.gui_objects.all_headers_box&&($(b).removeClass("hide-headers").addClass("show-headers"),$(this.gui_objects.all_headers_row).hide(),b.onclick=function(){rcmail.command("show-headers","",b)})};this.html2plain=function(a,b){var d=this,e=this.set_busy(!0,"converting");
+this.log("HTTP POST: ?_task=utils&_action=html2text");$.ajax({type:"POST",url:"?_task=utils&_action=html2text",data:a,contentType:"application/octet-stream",error:function(a,b,h){d.http_error(a,b,h,e)},success:function(a){d.set_busy(!1,null,e);$("#"+b).val(a);d.log(a)}})};this.plain2html=function(a,b){var d=this.set_busy(!0,"converting");a=a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");$("#"+b).val(a?"<pre>"+a+"</pre>":"");this.set_busy(!1,null,d)};this.url=function(a,b){var d=
+"string"===typeof b?"&"+b:"";"string"!==typeof a?b=a:b&&"object"===typeof b||(b={});b._action=a?a:this.env.action;var e=this.env.comm_path,f,g={};b._action.match(/([a-z]+)\/([a-z0-9-_.]+)/)&&(b._action=RegExp.$2,e=e.replace(/\_task=[a-z]+/,"_task="+RegExp.$1));for(f in b)void 0!==b[f]&&null!==b[f]&&(g[f]=b[f]);return e+"&"+$.param(g)+d};this.redirect=function(a,b){(b||null===b)&&this.set_busy(!0);this.is_framed()?parent.rcmail.redirect(a,b):(this.env.extwin&&("string"==typeof a?a+=(0>a.indexOf("?")?
+"?":"&")+"_extwin=1":a._extwin=1),this.location_href(a,window))};this.goto_url=function(a,b,d){this.redirect(this.url(a,b))};this.location_href=function(a,b,d){d&&this.lock_frame();"object"==typeof a&&(a=this.env.comm_path+"&"+$.param(a));bw.ie&&b==window?$("<a>").attr("href",a).appendTo(document.body).get(0).click():b.location.href=a;this.start_keepalive()};this.http_request=function(a,b,d){var e=this.url(a,b);b=this.triggerEvent("request"+a,b);if(void 0!==b&&!1===b)return!1;e+="&_remote=1";this.log("HTTP GET: "+
+e);this.start_keepalive();return $.ajax({type:"GET",url:e,data:{_unlock:d?d:0},dataType:"json",success:function(a){l.http_response(a)},error:function(b,e,h){l.http_error(b,e,h,d,a)}})};this.http_post=function(a,b,d){var e=this.url(a);b&&"object"===typeof b?(b._remote=1,b._unlock=d?d:0):b+=(b?"&":"")+"_remote=1"+(d?"&_unlock="+d:"");var f=this.triggerEvent("request"+a,b);if(void 0!==f){if(!1===f)return!1;b=f}this.log("HTTP POST: "+e);this.start_keepalive();return $.ajax({type:"POST",url:e,data:b,dataType:"json",
+success:function(a){l.http_response(a)},error:function(b,e,f){l.http_error(b,e,f,d,a)}})};this.abort_request=function(a){a.request&&a.request.abort();a.lock&&this.set_busy(!1,null,a.lock)};this.http_response=function(a){if(a){a.unlock&&this.set_busy(!1);this.triggerEvent("responsebefore",{response:a});this.triggerEvent("responsebefore"+a.action,{response:a});a.env&&this.set_env(a.env);if("object"===typeof a.texts)for(var b in a.texts)"string"===typeof a.texts[b]&&this.add_label(b,a.texts[b]);a.exec&&
+(this.log(a.exec),eval(a.exec));if(a.callbacks&&a.callbacks.length)for(b=0;b<a.callbacks.length;b++)this.triggerEvent(a.callbacks[b][0],a.callbacks[b][1]);switch(a.action){case "delete":if("addressbook"==this.task){var d;b=this.contact_list.get_selection();d=!1;b&&this.contact_list.rows[b]&&(d=""==this.env.source?(d=String(b).replace(/^[^-]+-/,""))&&this.env.address_sources[d]&&!this.env.address_sources[d].readonly:!this.env.address_sources[this.env.source].readonly);this.enable_command("compose",
+b&&this.contact_list.rows[b]);this.enable_command("delete","edit",d);this.enable_command("export",this.contact_list&&0<this.contact_list.rowcount)}case "moveto":"show"==this.env.action?(this.enable_command(this.env.message_commands,!0),this.env.list_post||this.enable_command("reply-list",!1)):"addressbook"==this.task&&this.triggerEvent("listupdate",{folder:this.env.source,rowcount:this.contact_list.rowcount});case "purge":case "expunge":"mail"==this.task&&(this.env.exists||(this.env.contentframe&&
+this.show_contentframe(!1),this.enable_command(this.env.message_commands,"purge","expunge","select-all","select-none","expand-all","expand-unread","collapse-all",!1)),this.message_list&&this.triggerEvent("listupdate",{folder:this.env.mailbox,rowcount:this.message_list.rowcount}));break;case "refresh":case "check-recent":case "getunread":case "search":this.env.qsearch=null;case "list":"mail"==this.task?(this.enable_command("show","select-all","select-none",0<this.env.messagecount),this.enable_command("expunge",
+this.env.exists),this.enable_command("purge",this.purge_mailbox_test()),this.enable_command("expand-all","expand-unread","collapse-all",this.env.threading&&this.env.messagecount),"list"!=a.action&&"search"!=a.action||!this.message_list||(this.msglist_select(this.message_list),this.triggerEvent("listupdate",{folder:this.env.mailbox,rowcount:this.message_list.rowcount}))):"addressbook"==this.task&&(this.enable_command("export",this.contact_list&&0<this.contact_list.rowcount),"list"==a.action||"search"==
+a.action)&&(this.enable_command("search-create",""==this.env.source),this.enable_command("search-delete",this.env.search_id),this.update_group_commands(),this.triggerEvent("listupdate",{folder:this.env.source,rowcount:this.contact_list.rowcount}))}a.unlock&&this.hide_message(a.unlock);this.triggerEvent("responseafter",{response:a});this.triggerEvent("responseafter"+a.action,{response:a});this.start_keepalive()}};this.http_error=function(a,b,d,e,f){d=a.statusText;this.set_busy(!1,null,e);a.abort();
+this.unload||(a.status&&d?this.display_message(this.get_label("servererror")+" ("+d+")","error"):"timeout"==b?this.display_message(this.get_label("requesttimedout"),"error"):0==a.status&&"abort"!=b&&this.display_message(this.get_label("servererror")+" (No connection)","error"),(b=a.getResponseHeader("Location"))&&"compose"!=this.env.action&&this.redirect(b),403==a.status?(this.is_framed()?parent:window).location.reload():"keep-alive"==f&&setTimeout(function(){l.keep_alive();l.start_keepalive()},3E4))};
+this.iframe_loaded=function(a){this.set_busy(!1,null,a);this.submit_timer&&clearTimeout(this.submit_timer)};this.async_upload_form=function(a,b,d){var e=(new Date).getTime(),f="rcmupload"+e;if(this.env.upload_progress_name){var g=this.env.upload_progress_name,h=$("input[name="+g+"]",a);h.length||(h=$("<input>").attr({type:"hidden",name:g}),h.prependTo(a));h.val(e)}document.all?document.body.insertAdjacentHTML("BeforeEnd",'<iframe name="'+f+'" src="program/resources/blank.gif" style="width:0;height:0;visibility:hidden;"></iframe>'):
 (g=document.createElement("iframe"),g.name=f,g.style.border="none",g.style.width=0,g.style.height=0,g.style.visibility="hidden",document.body.appendChild(g));$(f).bind("load",{ts:e},d);$(a).attr({target:f,action:this.url(b,{_id:this.env.compose_id||"",_uploadid:e}),method:"POST"}).attr(a.encoding?"encoding":"enctype","multipart/form-data").submit();return f};this.document_drag_hover=function(a,b){a.preventDefault();$(l.gui_objects.filedrop)[b?"addClass":"removeClass"]("active")};this.file_drag_hover=
 function(a,b){a.preventDefault();a.stopPropagation();$(l.gui_objects.filedrop)[b?"addClass":"removeClass"]("hover")};this.file_dropped=function(a){this.file_drag_hover(a,!1);var b=a.target.files||a.dataTransfer.files,d=window.FormData?new FormData:null,e=(this.env.filedrop.fieldname||"_file")+(this.env.filedrop.single?"":"[]"),f="------multipartformboundary"+(new Date).getTime(),g="--"+f+"\r\n";if(b&&b.length)for(var h=function(){var a=1<b.length,e=(new Date).getTime(),a="<span>"+(a?l.get_label("uploadingmany"):
-b[0].name)+"</span>";l.add2attachment_list(e,{name:"",html:a,classname:"uploading",complete:!1})||(l.file_upload_id=l.set_busy(!0,"uploading"));g+="--"+f+"--\r\n";$.ajax({type:"POST",dataType:"json",url:l.url(l.env.filedrop.action||"upload",{_id:l.env.compose_id||l.env.cid||"",_uploadid:e,_remote:1}),contentType:d?!1:"multipart/form-data; boundary="+f,processData:!1,data:d||g,headers:{"X-Roundcube-Request":l.env.request_token},beforeSend:function(a,b){!d&&a.sendAsBinary&&(a.send=a.sendAsBinary)},
+b[0].name)+"</span>";l.add2attachment_list(e,{name:"",html:a,classname:"uploading",complete:!1})||(l.file_upload_id=l.set_busy(!0,"uploading"));g+="--"+f+"--\r\n";$.ajax({type:"POST",dataType:"json",url:l.url(l.env.filedrop.action||"upload",{_id:l.env.compose_id||l.env.cid||"",_uploadid:e,_remote:1}),contentType:d?!1:"multipart/form-data; boundary="+f,processData:!1,timeout:0,data:d||g,headers:{"X-Roundcube-Request":l.env.request_token},beforeSend:function(a,b){!d&&a.sendAsBinary&&(a.send=a.sendAsBinary)},
 success:function(a){l.http_response(a)},error:function(a,b,d){l.http_error(a,b,d,null,"attachment")}})},k=this.env.filedrop.single?0:b.length-1,p=a=0,m;a<=k&&(m=b[p]);p++)if(m.name||(m.name=m.fileName),m.size||(m.size=m.fileSize),m.type||(m.type="application/octet-stream"),!d&&/[^\x20-\x7E]/.test(m.name)&&(m.name_bin=unescape(encodeURIComponent(m.name))),!this.env.filedrop.filter||m.type.match(RegExp(this.env.filedrop.filter))){if(d){if(d.append(e,m),a==k)return h()}else if(window.FileReader){var n=
 new FileReader;n.onload=function(a,b){return function(d){g+='Content-Disposition: form-data; name="'+e+'"';g+='; filename="'+(m.name_bin||a.name)+'"\r\n';g+="Content-Length: "+a.size+"\r\n";g+="Content-Type: "+a.type+"\r\n\r\n";g+=d.target.result+"\r\n";g+="--"+f+"\r\n";if(b==k)return h()}}(m,a);n.readAsBinaryString(m)}else if(m.getAsBinary&&(g+='Content-Disposition: form-data; name="'+e+'"',g+='; filename="'+(m.name_bin||m.name)+'"\r\n',g+="Content-Length: "+m.size+"\r\n",g+="Content-Type: "+m.type+
-"\r\n\r\n",g+=m.getAsBinary()+"\r\n",g+="--"+f+"\r\n",a==k))return h();a++}};this.start_keepalive=function(){if(this.env.session_lifetime&&!this.env.framed&&!this.env.extwin&&!("login"==this.task||"print"==this.env.action))this._keepalive&&clearInterval(this._keepalive),this._keepalive=setInterval(function(){l.keep_alive()},500*this.env.session_lifetime)};this.start_refresh=function(){if(this.env.refresh_interval&&!this.env.framed&&!this.env.extwin&&!("login"==this.task||"print"==this.env.action))this._refresh&&
-clearInterval(this._refresh),this._refresh=setInterval(function(){l.refresh()},1E3*this.env.refresh_interval)};this.keep_alive=function(){this.busy||this.http_request("keep-alive")};this.refresh=function(){if(this.busy)setTimeout(function(){l.refresh();l.start_refresh()},1E4);else{var a={},b=this.set_busy(!0,"refreshing");"mail"==this.task&&this.gui_objects.mailboxlist&&(a=this.check_recent_params());this.http_request("refresh",a,b)}};this.check_recent_params=function(){var a={_mbox:this.env.mailbox};
+"\r\n\r\n",g+=m.getAsBinary()+"\r\n",g+="--"+f+"\r\n",a==k))return h();a++}};this.start_keepalive=function(){!this.env.session_lifetime||(this.env.framed||this.env.extwin||"login"==this.task||"print"==this.env.action)||(this._keepalive&&clearInterval(this._keepalive),this._keepalive=setInterval(function(){l.keep_alive()},500*this.env.session_lifetime))};this.start_refresh=function(){!this.env.refresh_interval||(this.env.framed||this.env.extwin||"login"==this.task||"print"==this.env.action)||(this._refresh&&
+clearInterval(this._refresh),this._refresh=setInterval(function(){l.refresh()},1E3*this.env.refresh_interval))};this.keep_alive=function(){this.busy||this.http_request("keep-alive")};this.refresh=function(){if(this.busy)setTimeout(function(){l.refresh();l.start_refresh()},1E4);else{var a={},b=this.set_busy(!0,"refreshing");"mail"==this.task&&this.gui_objects.mailboxlist&&(a=this.check_recent_params());this.http_request("refresh",a,b)}};this.check_recent_params=function(){var a={_mbox:this.env.mailbox};
 this.gui_objects.mailboxlist&&(a._folderlist=1);this.gui_objects.messagelist&&(a._list=1);this.gui_objects.quotadisplay&&(a._quota=1);this.env.search_request&&(a._search=this.env.search_request);return a};this.opener=function(){try{if(window.opener&&!opener.closed&&opener.rcmail)return opener.rcmail}catch(a){}};this.get_single_uid=function(){return this.env.uid?this.env.uid:this.message_list?this.message_list.get_single_selection():null};this.get_single_cid=function(){return this.env.cid?this.env.cid:
 this.contact_list?this.contact_list.get_single_selection():null};this.get_caret_pos=function(a){if(void 0!==a.selectionEnd)return a.selectionEnd;if(document.selection&&document.selection.createRange){var b=document.selection.createRange();if(b.parentElement()!=a)return 0;var d=b.duplicate();"TEXTAREA"==a.tagName?d.moveToElementText(a):d.expand("textedit");d.setEndPoint("EndToStart",b);b=d.text.length;return b<=a.value.length?b:-1}return a.value.length};this.set_caret_pos=function(a,b){if(a.setSelectionRange)a.setSelectionRange(b,
 b);else if(a.createTextRange){var d=a.createTextRange();d.collapse(!0);d.moveEnd("character",b);d.moveStart("character",b);d.select()}};this.lock_form=function(a,b){if(a&&a.elements){var d,e,f;b&&(this.disabled_form_elements=[]);d=0;for(e=a.elements.length;d<e;d++)if(f=a.elements[d],"hidden"!=f.type)if(b&&f.disabled)this.disabled_form_elements.push(f);else if(b||this.disabled_form_elements&&0>$.inArray(f,this.disabled_form_elements))f.disabled=b}};this.mailto_handler_uri=function(){return location.href.split("?")[0]+
diff --git a/program/js/app.js.src b/program/js/app.js.src
index 5d6d2c1..ed97d19 100644
--- a/program/js/app.js.src
+++ b/program/js/app.js.src
@@ -583,11 +583,11 @@ function rcube_webmail()
           var prevstate = this.env.compose_extwin;
           $("input[name='_action']", this.gui_objects.messageform).val('compose');
           this.gui_objects.messageform.action = this.url('mail/compose', { _id: this.env.compose_id, _extwin: 1 });
-          this.gui_objects.messageform.target = this.open_window('', 1100, 900);
+          this.gui_objects.messageform.target = this.open_window('', 1100);
           this.gui_objects.messageform.submit();
         }
         else {
-          this.open_window(this.env.permaurl, 900, 900);
+          this.open_window(this.env.permaurl, 900);
         }
         break;
 
@@ -1552,7 +1552,7 @@ function rcube_webmail()
 
     // start timer for message preview (wait for double click)
     if (selected && this.env.contentframe && !list.multi_selecting && !this.dummy_select)
-      this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, 200);
+      this.preview_timer = setTimeout(function() { ref.msglist_get_preview(); }, this.dblclick_time);
     else if (this.env.contentframe)
       this.show_contentframe(false);
   };
@@ -1568,12 +1568,13 @@ function rcube_webmail()
 
     var win = this.get_frame_window(this.env.contentframe);
 
-    if (win && win.location.href.indexOf(this.env.blankpage)>=0) {
+    if (win && win.location.href.indexOf(this.env.blankpage) >= 0) {
       if (this.preview_timer)
         clearTimeout(this.preview_timer);
       if (this.preview_read_timer)
         clearTimeout(this.preview_read_timer);
-      this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, 200);
+
+      this.preview_timer = setTimeout(function() { ref.msglist_get_preview(); }, this.dblclick_time);
     }
   };
 
@@ -1581,11 +1582,11 @@ function rcube_webmail()
   {
     if (this.preview_timer)
       clearTimeout(this.preview_timer);
-
     if (this.preview_read_timer)
       clearTimeout(this.preview_read_timer);
 
     var uid = list.get_single_selection();
+
     if (uid && this.env.mailbox == this.env.drafts_mailbox)
       this.open_compose_step({ _draft_uid: uid, _mbox: this.env.mailbox });
     else if (uid)
@@ -1673,12 +1674,16 @@ function rcube_webmail()
     return 0;
   };
 
-  this.open_window = function(url, width, height)
+  this.open_window = function(url, width)
   {
-    var w = Math.min(width, screen.width - 10),
-      h = Math.min(height, screen.height - 100),
-      l = (screen.width - w) / 2 + (screen.left || 0),
-      t = Math.max(0, (screen.height - h) / 2 + (screen.top || 0) - 20),
+    var win = this.is_framed() ? parent.window : window,
+      page = $(win),
+      page_width = page.width(),
+      page_height = bw.mz ? $('body', win).height() : page.height(),
+      w = Math.min(width, page_width),
+      h = page_height, // always use same height
+      l = (win.screenLeft || win.screenX) + 20,
+      t = (win.screenTop || win.screenY) + 20,
       wname = 'rcmextwin' + new Date().getTime(),
       extwin = window.open(url + (url.match(/\?/) ? '&' : '?') + '_extwin=1', wname,
         'width='+w+',height='+h+',top='+t+',left='+l+',resizable=yes,toolbar=no,status=no,location=no');
@@ -1690,8 +1695,6 @@ function rcube_webmail()
 
     // focus window, delayed to bring to front
     window.setTimeout(function() { extwin.focus(); }, 10);
-    // position window with setTimeout for Chrome (#1488931)
-    window.setTimeout(function() { extwin.moveTo(l,t); }, bw.chrome ? 100 : 10);
 
     return wname;
   };
@@ -1889,7 +1892,8 @@ function rcube_webmail()
       else
         html = cols[c];
 
-      col.innerHTML = html;
+      if (html)
+        col.innerHTML = html;
 
       row.appendChild(col);
     }
@@ -1992,7 +1996,7 @@ function rcube_webmail()
     }
     else {
       if (!preview && this.env.message_extwin && !this.env.extwin)
-        this.open_window(this.env.comm_path+url, 1000, 1200);
+        this.open_window(this.env.comm_path+url, 1000);
       else
         this.location_href(this.env.comm_path+url, target, true);
 
@@ -3018,11 +3022,12 @@ function rcube_webmail()
 
     // open new compose window
     if (this.env.compose_extwin && !this.env.extwin) {
-      this.open_window(url, 1150, 900);
+      this.open_window(url, 1150);
     }
     else {
       this.redirect(url);
-      window.resizeTo(Math.max(1150, $(window).width()), Math.max(900, $(window).height()));
+      if (this.env.extwin)
+        window.resizeTo(Math.max(1150, $(window).width()), $(window).height()+24);
     }
   };
 
@@ -3130,7 +3135,7 @@ function rcube_webmail()
 
   this.compose_add_recipient = function(field)
   {
-    var recipients = [], input = $('#_'+field);
+    var recipients = [], input = $('#_'+field), delim = this.env.recipients_delimiter;
 
     if (this.contact_list && this.contact_list.selection.length) {
       for (var id, n=0; n < this.contact_list.selection.length; n++) {
@@ -3149,8 +3154,10 @@ function rcube_webmail()
     }
 
     if (recipients.length && input.length) {
-      var oldval = input.val();
-      input.val((oldval ? oldval + this.env.recipients_delimiter : '') + recipients.join(this.env.recipients_delimiter));
+      var oldval = input.val(), rx = new RegExp(RegExp.escape(delim) + '\\s*$');
+      if (oldval && !rx.test(oldval))
+        oldval += delim + ' ';
+      input.val(oldval + recipients.join(delim + ' ') + delim + ' ');
       this.triggerEvent('add-recipient', { field:field, recipients:recipients });
     }
   };
@@ -4111,6 +4118,7 @@ function rcube_webmail()
     var n, id, sid, ref = this, writable = false,
       source = this.env.source ? this.env.address_sources[this.env.source] : null;
 
+    // we don't have dblclick handler here, so use 200 instead of this.dblclick_time
     if (id = list.get_single_selection())
       this.preview_timer = setTimeout(function(){ ref.load_contact(id, 'show'); }, 200);
     else if (this.env.contentframe)
@@ -4410,7 +4418,8 @@ function rcube_webmail()
     for (c in cols) {
       col = document.createElement('td');
       col.className = String(c).toLowerCase();
-      col.innerHTML = cols[c];
+      if (cols[c])
+        col.innerHTML = cols[c];
       row.appendChild(col);
     }
 
@@ -5856,7 +5865,7 @@ function rcube_webmail()
 
         for (c=0, len=repl.length; c < len; c++) {
           cell = document.createElement('td');
-          cell.innerHTML = repl[c].html;
+          cell.innerHTML = repl[c].html || '';
           if (repl[c].id) cell.id = repl[c].id;
           if (repl[c].className) cell.className = repl[c].className;
           tr.appendChild(cell);
@@ -6484,6 +6493,7 @@ function rcube_webmail()
         url: ref.url(ref.env.filedrop.action||'upload', { _id:ref.env.compose_id||ref.env.cid||'', _uploadid:ts, _remote:1 }),
         contentType: formdata ? false : 'multipart/form-data; boundary=' + boundary,
         processData: false,
+        timeout: 0, // disable default timeout set in ajaxSetup()
         data: formdata || multipart,
         headers: {'X-Roundcube-Request': ref.env.request_token},
         beforeSend: function(xhr, s) { if (!formdata && xhr.sendAsBinary) xhr.send = xhr.sendAsBinary; },
diff --git a/program/js/common.js b/program/js/common.js
index 3cf5e17..546fb2c 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -10,7 +10,7 @@ var rcube_event={get_target:function(a){return(a=a||window.event)&&a.target?a.ta
 window.event);var b=a.pageX?a.pageX:a.clientX,c=a.pageY?a.pageY:a.clientY;document.body&&document.all&&(b+=document.body.scrollLeft,c+=document.body.scrollTop);a._offset&&(b+=a._offset.left,c+=a._offset.top);return{x:b,y:c}},add_listener:function(a){if(a.object&&a.method){a.element||(a.element=document);a.object._rc_events||(a.object._rc_events=[]);var b=a.event+"*"+a.method;a.object._rc_events[b]||(a.object._rc_events[b]=function(c){return a.object[a.method](c)});a.element.addEventListener?a.element.addEventListener(a.event,
 a.object._rc_events[b],!1):a.element.attachEvent?(a.element.detachEvent("on"+a.event,a.object._rc_events[b]),a.element.attachEvent("on"+a.event,a.object._rc_events[b])):a.element["on"+a.event]=a.object._rc_events[b]}},remove_listener:function(a){a.element||(a.element=document);var b=a.event+"*"+a.method;a.object&&(a.object._rc_events&&a.object._rc_events[b])&&(a.element.removeEventListener?a.element.removeEventListener(a.event,a.object._rc_events[b],!1):a.element.detachEvent?a.element.detachEvent("on"+
 a.event,a.object._rc_events[b]):a.element["on"+a.event]=null)},cancel:function(a){a=a?a:window.event;a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();a.cancelBubble=!0;return a.returnValue=!1},touchevent:function(a){return{pageX:a.pageX,pageY:a.pageY,offsetX:a.pageX-a.target.offsetLeft,offsetY:a.pageY-a.target.offsetTop,target:a.target,istouch:!0}}};function rcube_event_engine(){this._events={}}
-rcube_event_engine.prototype={addEventListener:function(a,b,c){this._events||(this._events={});this._events[a]||(this._events[a]=[]);this._events[a][this._events[a].length]={func:b,obj:c?c:window}},removeEventListener:function(a,b,c){void 0===c&&(c=window);for(var d,e=0;this._events&&this._events[a]&&e<this._events[a].length;e++)if((d=this._events[a][e])&&d.func==b&&d.obj==c)this._events[a][e]=null},triggerEvent:function(a,b){var c,d;void 0===b?b=this:"object"===typeof b&&(b.event=a);if(this._events&&
+rcube_event_engine.prototype={addEventListener:function(a,b,c){this._events||(this._events={});this._events[a]||(this._events[a]=[]);this._events[a][this._events[a].length]={func:b,obj:c?c:window}},removeEventListener:function(a,b,c){void 0===c&&(c=window);for(var d,e=0;this._events&&this._events[a]&&e<this._events[a].length;e++)(d=this._events[a][e])&&(d.func==b&&d.obj==c)&&(this._events[a][e]=null)},triggerEvent:function(a,b){var c,d;void 0===b?b=this:"object"===typeof b&&(b.event=a);if(this._events&&
 this._events[a]&&!this._event_exec){this._event_exec=!0;for(var e=0;e<this._events[a].length;e++)if(d=this._events[a][e])if("function"===typeof d.func?c=d.func.call?d.func.call(d.obj,b):d.func(b):"function"===typeof d.obj[d.func]&&(c=d.obj[d.func](b)),void 0!==c&&!c)break;if(c&&c.event)try{delete c.event}catch(f){$(c).removeAttr("event")}}this._event_exec=!1;if(b.event)try{delete b.event}catch(h){$(b).removeAttr("event")}return c}};
 function rcube_layer(a,b){this.name=a;this.create=function(a){var b=a.x?a.x:0,e=a.y?a.y:0,f=a.width,h=a.height,k=a.zindex,g=a.vis;a=a.parent;var l=document.createElement("DIV");l.id=this.name;l.style.position="absolute";l.style.visibility=g?2==g?"inherit":"visible":"hidden";l.style.left=b+"px";l.style.top=e+"px";f&&(l.style.width=f.toString().match(/\%$/)?f:f+"px");h&&(l.style.height=h.toString().match(/\%$/)?h:h+"px");k&&(l.style.zIndex=k);a?a.appendChild(l):document.body.appendChild(l);this.elm=
 l};null!=b?(this.create(b),this.name=this.elm.id):this.elm=document.getElementById(a);if(!this.elm)return!1;this.css=this.elm.style;this.event=this.elm;this.width=this.elm.offsetWidth;this.height=this.elm.offsetHeight;this.x=parseInt(this.elm.offsetLeft);this.y=parseInt(this.elm.offsetTop);this.visible="visible"==this.css.visibility||"show"==this.css.visibility||"inherit"==this.css.visibility?!0:!1;this.move=function(a,b){this.x=a;this.y=b;this.css.left=Math.round(this.x)+"px";this.css.top=Math.round(this.y)+
@@ -18,7 +18,7 @@ l};null!=b?(this.create(b),this.name=this.elm.id):this.elm=document.getElementBy
 function rcube_check_email(a,b){return a&&window.RegExp?(b?RegExp("(^|<|[,;s\n])((([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|\\x5c[\\x00-\\x7f])*\\x22)(\\x2e([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|\\x5c[\\x00-\\x7f])*\\x22))*\\x40(((\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}\\])|(\\[IPv6:[0-9a-f:.]+\\]))|(([^@\\x2e]+\\x2e)+([^\\x00-\\x40\\x5b-\\x60\\x7b-\\x7f]{2,}|xn--[a-z0-9]{2,}))))|(mailtest\\x40(\\u0645\\u062b\\u0627\\u0644\\x2e\\u0625\\u062e\\u062a\\u0628\\u0627\\u0631|\\u4f8b\\u5b50\\x2e\\u6d4b\\u8bd5|\\u4f8b\\u5b50\\x2e\\u6e2c\\u8a66|\\u03c0\\u03b1\\u03c1\\u03ac\\u03b4\\u03b5\\u03b9\\u03b3\\u03bc\\u03b1\\x2e\\u03b4\\u03bf\\u03ba\\u03b9\\u03bc\\u03ae|\\u0909\\u0926\\u093e\\u0939\\u0930\\u0923\\x2e\\u092a\\u0930\\u0940\\u0915\\u094d\\u0937\\u093e|\\u4f8b\\u3
 048\\x2e\\u30c6\\u30b9\\u30c8|\\uc2e4\\ub840\\x2e\\ud14c\\uc2a4\\ud2b8|\\u0645\\u062b\\u0627\\u0644\\x2e\\u0622\\u0632\\u0645\\u0627\\u06cc\\u0634\u06cc|\\u043f\\u0440\\u0438\\u043c\\u0435\\u0440\\x2e\\u0438\\u0441\\u043f\\u044b\\u0442\\u0430\\u043d\\u0438\\u0435|\\u0b89\\u0ba4\\u0bbe\\u0bb0\\u0ba3\\u0bae\\u0bcd\\x2e\\u0baa\\u0bb0\\u0bbf\\u0b9f\\u0bcd\\u0b9a\\u0bc8|\\u05d1\\u05f2\\u05b7\\u05e9\\u05e4\\u05bc\\u05d9\\u05dc\\x2e\\u05d8\\u05e2\\u05e1\\u05d8)))($|>|[,;s\n])","i"):
 RegExp("^((([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|\\x5c[\\x00-\\x7f])*\\x22)(\\x2e([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|\\x5c[\\x00-\\x7f])*\\x22))*\\x40(((\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}\\])|(\\[IPv6:[0-9a-f:.]+\\]))|(([^@\\x2e]+\\x2e)+([^\\x00-\\x40\\x5b-\\x60\\x7b-\\x7f]{2,}|xn--[a-z0-9]{2,}))))|(mailtest\\x40(\\u0645\\u062b\\u0627\\u0644\\x2e\\u0625\\u062e\\u062a\\u0628\\u0627\\u0631|\\u4f8b\\u5b50\\x2e\\u6d4b\\u8bd5|\\u4f8b\\u5b50\\x2e\\u6e2c\\u8a66|\\u03c0\\u03b1\\u03c1\\u03ac\\u03b4\\u03b5\\u03b9\\u03b3\\u03bc\\u03b1\\x2e\\u03b4\\u03bf\\u03ba\\u03b9\\u03bc\\u03ae|\\u0909\\u0926\\u093e\\u0939\\u0930\\u0923\\x2e\\u092a\\u0930\\u0940\\u0915\\u094d\\u0937\\u093e|\\u4f8b\\u3048\\x2e\\u30c6\\u30b9\\u30c8|\\uc2e4\\ub840\\x2e\\ud14c\\uc2a4\\ud2b8|
 \\u0645\\u062b\\u0627\\u0644\\x2e\\u0622\\u0632\\u0645\\u0627\\u06cc\\u0634\u06cc|\\u043f\\u0440\\u0438\\u043c\\u0435\\u0440\\x2e\\u0438\\u0441\\u043f\\u044b\\u0442\\u0430\\u043d\\u0438\\u0435|\\u0b89\\u0ba4\\u0bbe\\u0bb0\\u0ba3\\u0bae\\u0bcd\\x2e\\u0baa\\u0bb0\\u0bbf\\u0b9f\\u0bcd\\u0b9a\\u0bc8|\\u05d1\\u05f2\\u05b7\\u05e9\\u05e4\\u05bc\\u05d9\\u05dc\\x2e\\u05d8\\u05e2\\u05e1\\u05d8)))$",
 "i")).test(a)?!0:!1:!1}function rcube_clone_object(a){var b={},c;for(c in a)b[c]=a[c]&&"object"===typeof a[c]?clone_object(a[c]):a[c];return b}function urlencode(a){return window.encodeURIComponent?encodeURIComponent(a).replace("*","%2A"):escape(a).replace("+","%2B").replace("*","%2A").replace("/","%2F").replace("@","%40")}
-function rcube_find_object(a,b){var c,d;b||(b=document);if(b.getElementsByName&&(c=b.getElementsByName(a)))d=c[0];!d&&b.getElementById&&(d=b.getElementById(a));!d&&b.all&&(d=b.all[a]);!d&&b.images.length&&(d=b.images[a]);if(!d&&b.forms.length)for(c=0;c<b.forms.length;c++)b.forms[c].name==a?d=b.forms[c]:b.forms[c].elements[a]&&(d=b.forms[c].elements[a]);if(!d&&b.layers){b.layers[a]&&(d=b.layers[a]);for(c=0;!d&&c<b.layers.length;c++)d=rcube_find_object(a,b.layers[c].document)}return d}
+function rcube_find_object(a,b){var c,d;b||(b=document);b.getElementsByName&&(c=b.getElementsByName(a))&&(d=c[0]);!d&&b.getElementById&&(d=b.getElementById(a));!d&&b.all&&(d=b.all[a]);!d&&b.images.length&&(d=b.images[a]);if(!d&&b.forms.length)for(c=0;c<b.forms.length;c++)b.forms[c].name==a?d=b.forms[c]:b.forms[c].elements[a]&&(d=b.forms[c].elements[a]);if(!d&&b.layers)for(b.layers[a]&&(d=b.layers[a]),c=0;!d&&c<b.layers.length;c++)d=rcube_find_object(a,b.layers[c].document);return d}
 function rcube_mouse_is_over(a,b){var c=rcube_event.get_mouse_pos(a),d=$(b).offset();return c.x>=d.left&&c.x<d.left+b.offsetWidth&&c.y>=d.top&&c.y<d.top+b.offsetHeight}function setCookie(a,b,c,d,e,f){a=a+"="+escape(b)+(c?"; expires="+c.toGMTString():"")+(d?"; path="+d:"")+(e?"; domain="+e:"")+(f?"; secure":"");document.cookie=a}
 function getCookie(a){var b=document.cookie;a+="=";var c=b.indexOf("; "+a);if(-1==c){if(c=b.indexOf(a),0!=c)return null}else c+=2;var d=b.indexOf(";",c);-1==d&&(d=b.length);return unescape(b.substring(c+a.length,d))}roundcube_browser.prototype.set_cookie=setCookie;roundcube_browser.prototype.get_cookie=getCookie;
 function rcube_console(){this.log=function(a){var b=rcube_find_object("dbgconsole");b&&(a="\n"==a.charAt(a.length-1)?a+"--------------------------------------\n":a+"\n--------------------------------------\n",bw.konq?(b.innerText+=a,b.value=b.innerText):b.value+=a)};this.reset=function(){var a=rcube_find_object("dbgconsole");a&&(a.innerText=a.value="")}}var bw=new roundcube_browser;bw.set_html_class();RegExp.escape=function(a){return String(a).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};
diff --git a/program/js/list.js b/program/js/list.js
index 34b975e..be6a696 100644
--- a/program/js/list.js
+++ b/program/js/list.js
@@ -4,37 +4,37 @@ rcube_list_widget.prototype={init:function(){if(this.list&&this.list.tBodies[0])
 function(a){return b.drag_row(a,this.uid)};a.onmouseup=function(a){return b.click_row(a,this.uid)};bw.mobile&&(a.addEventListener("touchstart",function(a){1==a.touches.length&&(b.drag_row(rcube_event.touchevent(a.touches[0]),this.uid)||a.preventDefault())},!1),a.addEventListener("touchend",function(a){1==a.changedTouches.length&&(b.click_row(rcube_event.touchevent(a.changedTouches[0]),this.uid)||a.preventDefault())},!1));document.all&&(a.onselectstart=function(){return!1});this.row_init(this.rows[c])}},
 init_header:function(){if(this.list&&this.list.tHead){this.colcount=0;var a,b,c=this;if(this.column_movable&&this.list.tHead&&this.list.tHead.rows)for(b=0;b<this.list.tHead.rows[0].cells.length;b++)this.column_fixed!=b&&(a=this.list.tHead.rows[0].cells[b],a.onmousedown=function(a){return c.drag_column(a,this)},this.colcount++)}},clear:function(a){var b=document.createElement("tbody");this.list.insertBefore(b,this.list.tBodies[0]);this.list.removeChild(this.list.tBodies[1]);this.rows=[];this.rowcount=
 0;a&&this.clear_selection();this.frame&&(this.frame.scrollTop=0)},remove_row:function(a,b){var c=this.rows[a]?this.rows[a].obj:null;c&&(c.style.display="none",b&&this.select_next(),delete this.rows[a],this.rowcount--)},insert_row:function(a,b){var c=this.list.tBodies[0];b&&c.rows.length?c.insertBefore(a,c.firstChild):c.appendChild(a);this.init_row(a);this.rowcount++},focus:function(a){var b,c;this.focused=!0;for(b in this.selection)c=this.selection[b],this.rows[c]&&this.rows[c].obj&&$(this.rows[c].obj).addClass("selected").removeClass("unfocused");
-$(":focus:not(body)").blur();$("iframe").each(function(){this.blur()});(a||(a=window.event))&&rcube_event.cancel(a)},blur:function(){var a,b;this.focused=!1;for(a in this.selection)b=this.selection[a],this.rows[b]&&this.rows[b].obj&&$(this.rows[b].obj).removeClass("selected focused").addClass("unfocused")},drag_column:function(a,b){if(1<this.colcount){this.drag_start=!0;this.drag_mouse_start=rcube_event.get_mouse_pos(a);rcube_event.add_listener({event:"mousemove",object:this,method:"column_drag_mouse_move"});
-rcube_event.add_listener({event:"mouseup",object:this,method:"column_drag_mouse_up"});this.add_dragfix();for(var c=0;c<this.list.tHead.rows[0].cells.length;c++)if(b==this.list.tHead.rows[0].cells[c]){this.selected_column=c;break}}return!1},drag_row:function(a,b){var c=rcube_event.get_target(a),d=c.tagName.toLowerCase();if(this.dont_select||c&&("input"==d||"img"==d)||2==rcube_event.get_button(a))return!0;this.in_selection_before=this.in_selection(b)?b:!1;this.in_selection_before||(c=rcube_event.get_modifier(a),
-this.select_row(b,c,!1));this.draggable&&this.selection.length&&(this.drag_start=!0,this.drag_mouse_start=rcube_event.get_mouse_pos(a),rcube_event.add_listener({event:"mousemove",object:this,method:"drag_mouse_move"}),rcube_event.add_listener({event:"mouseup",object:this,method:"drag_mouse_up"}),bw.mobile&&(rcube_event.add_listener({event:"touchmove",object:this,method:"drag_mouse_move"}),rcube_event.add_listener({event:"touchend",object:this,method:"drag_mouse_up"})),this.add_dragfix());return!1},
-click_row:function(a,b){var c=(new Date).getTime(),d=rcube_event.get_modifier(a),e=rcube_event.get_target(a),f=e.tagName.toLowerCase();if(e&&("input"==f||"img"==f))return!0;if(this.dont_select)return this.dont_select=!1;e=c-this.rows[b].clicked<this.dblclick_time;!this.drag_active&&(this.in_selection_before==b&&!e)&&this.select_row(b,d,!1);this.in_selection_before=this.drag_start=!1;this.rows&&e&&this.in_selection(b)?(this.triggerEvent("dblclick"),c=0):this.triggerEvent("click");this.drag_active||
-(this.del_dragfix(),rcube_event.cancel(a));this.rows[b].clicked=c;return!1},find_root:function(a){var b=this.rows[a];return b&&b.parent_uid?this.find_root(b.parent_uid):a},expand_row:function(a,b){var c=this.rows[b],d=rcube_event.get_target(a),e=rcube_event.get_modifier(a);this.dont_select=!0;c.clicked=0;c.expanded?(d.className="collapsed",e==CONTROL_KEY||this.multiexpand?this.collapse_all(c):this.collapse(c)):(d.className="expanded",e==CONTROL_KEY||this.multiexpand?this.expand_all(c):this.expand(c))},
-collapse:function(a){a.expanded=!1;this.triggerEvent("expandcollapse",{uid:a.uid,expanded:a.expanded,obj:a.obj});var b=a.depth;a=a?a.obj.nextSibling:null;for(var c;a;){if(1==a.nodeType){if((c=this.rows[a.uid])&&c.depth<=b)break;$(a).css("display","none");c.expanded&&(c.expanded=!1,this.triggerEvent("expandcollapse",{uid:c.uid,expanded:c.expanded,obj:a}))}a=a.nextSibling}return!1},expand:function(a){var b,c,d,e,f;a?(a.expanded=!0,d=a.depth,e=a.obj.nextSibling,this.update_expando(a.uid,!0),this.triggerEvent("expandcollapse",
-{uid:a.uid,expanded:a.expanded,obj:a.obj})):(e=this.list.tBodies[0].firstChild,f=d=0);for(;e;){if(1==e.nodeType&&(b=this.rows[e.uid])){if(a&&(!b.depth||b.depth<=d))break;if(b.parent_uid)if((c=this.rows[b.parent_uid])&&c.expanded){if(a&&c==a||f>=c.depth-1)f=c.depth,$(e).css("display",""),b.expanded=!0,this.triggerEvent("expandcollapse",{uid:b.uid,expanded:b.expanded,obj:e})}else if(a&&(!c||c.depth<=d))break}e=e.nextSibling}return!1},collapse_all:function(a){var b,c,d;if(a){if(a.expanded=!1,b=a.depth,
-c=a.obj.nextSibling,this.update_expando(a.uid),this.triggerEvent("expandcollapse",{uid:a.uid,expanded:a.expanded,obj:a.obj}),b&&this.multiexpand)return!1}else c=this.list.tBodies[0].firstChild,b=0;for(;c;){if(1==c.nodeType&&(d=this.rows[c.uid])){if(a&&(!d.depth||d.depth<=b))break;(a||d.depth)&&$(c).css("display","none");d.has_children&&d.expanded&&(d.expanded=!1,this.update_expando(d.uid,!1),this.triggerEvent("expandcollapse",{uid:d.uid,expanded:d.expanded,obj:c}))}c=c.nextSibling}return!1},expand_all:function(a){var b,
-c,d;a?(a.expanded=!0,b=a.depth,c=a.obj.nextSibling,this.update_expando(a.uid,!0),this.triggerEvent("expandcollapse",{uid:a.uid,expanded:a.expanded,obj:a.obj})):(c=this.list.tBodies[0].firstChild,b=0);for(;c;){if(1==c.nodeType&&(d=this.rows[c.uid])){if(a&&d.depth<=b)break;$(c).css("display","");d.has_children&&!d.expanded&&(d.expanded=!0,this.update_expando(d.uid,!0),this.triggerEvent("expandcollapse",{uid:d.uid,expanded:d.expanded,obj:c}))}c=c.nextSibling}return!1},update_expando:function(a,b){var c=
-document.getElementById("rcmexpando"+a);c&&(c.className=b?"expanded":"collapsed")},get_next_row:function(){if(!this.rows)return!1;for(var a=this.rows[this.last_selected],a=a?a.obj.nextSibling:null;a&&(1!=a.nodeType||"none"==a.style.display);)a=a.nextSibling;return a},get_prev_row:function(){if(!this.rows)return!1;for(var a=this.rows[this.last_selected],a=a?a.obj.previousSibling:null;a&&(1!=a.nodeType||"none"==a.style.display);)a=a.previousSibling;return a},get_first_row:function(){if(this.rowcount){var a,
-b,c=this.list.tBodies[0].rows;a=0;for(b=c.length-1;a<b;a++)if(c[a].id&&String(c[a].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i)&&null!=this.rows[RegExp.$1])return RegExp.$1}return null},get_last_row:function(){if(this.rowcount){var a,b=this.list.tBodies[0].rows;for(a=b.length-1;0<=a;a--)if(b[a].id&&String(b[a].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i)&&null!=this.rows[RegExp.$1])return RegExp.$1}return null},select_row:function(a,b,c){var d=this.selection.join(",");this.multiselect||(b=0);this.shift_start||
-(this.shift_start=a);if(b){switch(b){case SHIFT_KEY:this.shift_select(a,!1);break;case CONTROL_KEY:c||this.highlight_row(a,!0);break;case CONTROL_SHIFT_KEY:this.shift_select(a,!0);break;default:this.highlight_row(a,!1)}this.multi_selecting=!0}else this.shift_start=a,this.highlight_row(a,!1),this.multi_selecting=!1;this.selection.join(",")!=d&&this.triggerEvent("select");0!=this.last_selected&&this.rows[this.last_selected]&&$(this.rows[this.last_selected].obj).removeClass("focused");this.toggleselect&&
-this.last_selected==a?(this.clear_selection(),a=null):$(this.rows[a].obj).addClass("focused");this.selection.length||(this.shift_start=null);this.last_selected=a;this.list.focus()},select:function(a){this.select_row(a,!1);this.scrollto(a)},select_next:function(){var a=this.get_next_row(),b=this.get_prev_row();(a=a?a:b)&&this.select_row(a.uid,!1,!1)},select_first:function(a){var b=this.get_first_row();b&&(a?(this.shift_select(b,a),this.triggerEvent("select"),this.scrollto(b)):this.select(b))},select_last:function(a){var b=
-this.get_last_row();b&&(a?(this.shift_select(b,a),this.triggerEvent("select"),this.scrollto(b)):this.select(b))},select_children:function(a){var b=this.row_children(a),c=b.length;for(a=0;a<c;a++)this.in_selection(b[a])||this.select_row(b[a],CONTROL_KEY)},shift_select:function(a,b){if(!this.rows[this.shift_start]||!this.selection.length)this.shift_start=a;var c,d,e;d=this.rows[a];e=this.rows[this.shift_start].obj.rowIndex;var f=d.obj.rowIndex;if(!d.expanded&&d.has_children&&(d=this.rows[this.row_children(a).pop()]))f=
-d.obj.rowIndex;d=e<f?e:f;e=e>f?e:f;for(c in this.rows)this.rows[c].obj.rowIndex>=d&&this.rows[c].obj.rowIndex<=e?this.in_selection(c)||this.highlight_row(c,!0):this.in_selection(c)&&!b&&this.highlight_row(c,!0)},in_selection:function(a){for(var b in this.selection)if(this.selection[b]==a)return!0;return!1},select_all:function(a){if(!this.rows||!this.rows.length)return!1;var b,c=this.selection.join(",");this.selection=[];for(b in this.rows)!a||!0==this.rows[b][a]?(this.last_selected=b,this.highlight_row(b,
-!0,!0)):$(this.rows[b].obj).removeClass("selected").removeClass("unfocused");this.selection.join(",")!=c&&this.triggerEvent("select");this.focus();return!0},invert_selection:function(){if(!this.rows||!this.rows.length)return!1;var a,b=this.selection.join(",");for(a in this.rows)this.highlight_row(a,!0);this.selection.join(",")!=b&&this.triggerEvent("select");this.focus();return!0},clear_selection:function(a){var b,c=this.selection.length;if(a)for(b in this.selection){if(this.selection[b]==a){this.selection.splice(b,
-1);break}}else{for(b in this.selection)this.rows[this.selection[b]]&&$(this.rows[this.selection[b]].obj).removeClass("selected").removeClass("unfocused");this.selection=[]}c&&!this.selection.length&&this.triggerEvent("select")},get_selection:function(){return this.selection},get_single_selection:function(){return 1==this.selection.length?this.selection[0]:null},highlight_row:function(a,b,c){if(this.rows[a])if(b)if(this.in_selection(a)){var d=$.inArray(a,this.selection);b=this.selection.slice(0,d);
-d=this.selection.slice(d+1,this.selection.length);this.selection=b.concat(d);$(this.rows[a].obj).removeClass("selected").removeClass("unfocused");!c&&!this.rows[a].expanded&&this.highlight_children(a,!1)}else this.selection.push(a),$(this.rows[a].obj).addClass("selected"),!c&&!this.rows[a].expanded&&this.highlight_children(a,!0);else if(1<this.selection.length||!this.in_selection(a))this.clear_selection(),this.selection[0]=a,$(this.rows[a].obj).addClass("selected")},highlight_children:function(a,
-b){var c,d,e=this.row_children(a),f=e.length;for(c=0;c<f;c++)d=this.in_selection(e[c]),(b&&!d||!b&&d)&&this.highlight_row(e[c],!0,!0)},key_press:function(a){var b=a.target||{};if(!0!=this.focused||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||"SELECT"==b.nodeName)return!0;var b=rcube_event.get_keycode(a),c=rcube_event.get_modifier(a);switch(b){case 40:case 38:case 63233:case 63232:return rcube_event.cancel(a),this.use_arrow_key(b,c);case 61:case 107:case 109:case 32:return rcube_event.cancel(a),a=
-this.use_plusminus_key(b,c),this.key_pressed=b,this.modkey=c,this.triggerEvent("keypress"),this.modkey=0,a;case 36:return this.select_first(c),rcube_event.cancel(a);case 35:return this.select_last(c),rcube_event.cancel(a);case 27:return this.drag_active?this.drag_mouse_up(a):this.col_drag_active?(this.selected_column=null,this.column_drag_mouse_up(a)):rcube_event.cancel(a);default:if(this.key_pressed=b,this.modkey=c,this.triggerEvent("keypress"),this.modkey=0,this.key_pressed==this.BACKSPACE_KEY)return rcube_event.cancel(a)}return!0},
-use_arrow_key:function(a,b){var c;if(40==a||63233==a)c=this.get_next_row();else if(38==a||63232==a)c=this.get_prev_row();c&&(this.select_row(c.uid,b,!1),this.scrollto(c.uid));return!1},use_plusminus_key:function(a,b){var c=this.rows[this.last_selected];if(c)return 32==a&&(a=c.expanded?109:61),61==a||107==a?b==CONTROL_KEY||this.multiexpand?this.expand_all(c):this.expand(c):b==CONTROL_KEY||this.multiexpand?this.collapse_all(c):this.collapse(c),this.update_expando(c.uid,c.expanded),!1},scrollto:function(a){var b=
-this.rows[a].obj;if(b&&this.frame){var c=Number(b.offsetTop);!c&&this.rows[a].parent_uid&&(a=this.find_root(this.rows[a].uid),this.expand_all(this.rows[a]),c=Number(b.offsetTop));c<Number(this.frame.scrollTop)?this.frame.scrollTop=c:c+Number(b.offsetHeight)>Number(this.frame.scrollTop)+Number(this.frame.offsetHeight)&&(this.frame.scrollTop=c+Number(b.offsetHeight)-Number(this.frame.offsetHeight))}},drag_mouse_move:function(a){if("touchmove"==a.type)if(1==a.changedTouches.length)a=rcube_event.touchevent(a.changedTouches[0]);
-else return rcube_event.cancel(a);if(this.drag_start){var b=rcube_event.get_mouse_pos(a);if(!this.drag_mouse_start||3>Math.abs(b.x-this.drag_mouse_start.x)&&3>Math.abs(b.y-this.drag_mouse_start.y))return!1;this.draglayer||(this.draglayer=$("<div>").attr("id","rcmdraglayer").css({position:"absolute",display:"none","z-index":2E3}).appendTo(document.body));var c,d,e=$.merge([],this.selection);for(c in e)d=e[c],this.rows[d].expanded||this.select_children(d);this.draglayer.html("");for(c=0;c<this.selection.length;c++){if(12<
-c){this.draglayer.append("...");break}if(e=this.rows[this.selection[c]].obj)for(d=b=0;d<e.childNodes.length;d++)if("TD"==e.childNodes[d].nodeName){0==c&&(this.drag_start_pos=$(e.childNodes[d]).offset());if(0>this.subject_col||0<=this.subject_col&&this.subject_col==b){for(var f,g,h=e.childNodes[d].childNodes,b=0;b<h.length;b++)if((g=e.childNodes[d].childNodes[b])&&(3==g.nodeType||"A"==g.nodeName))f=g;if(!f)break;d=$(f).text();d=$.trim(d);d=50<d.length?d.substring(0,50)+"...":d;d=$("<div>").text(d);
-this.draglayer.append(d);break}b++}}this.draglayer.show();this.drag_active=!0;this.triggerEvent("dragstart")}this.drag_active&&this.draglayer&&(c=rcube_event.get_mouse_pos(a),this.draglayer.css({left:c.x+20+"px",top:c.y-5+(bw.ie?document.documentElement.scrollTop:0)+"px"}),this.triggerEvent("dragmove",a?a:window.event));return this.drag_start=!1},drag_mouse_up:function(a){document.onmousemove=null;if("touchend"==a.type&&1!=a.changedTouches.length)return rcube_event.cancel(a);this.draglayer&&this.draglayer.is(":visible")&&
-(this.drag_start_pos?this.draglayer.animate(this.drag_start_pos,300,"swing").hide(20):this.draglayer.hide());this.drag_active&&this.focus();this.drag_active=!1;rcube_event.remove_listener({event:"mousemove",object:this,method:"drag_mouse_move"});rcube_event.remove_listener({event:"mouseup",object:this,method:"drag_mouse_up"});bw.mobile&&(rcube_event.remove_listener({event:"touchmove",object:this,method:"drag_mouse_move"}),rcube_event.remove_listener({event:"touchend",object:this,method:"drag_mouse_up"}));
-this.del_dragfix();this.triggerEvent("dragend");return rcube_event.cancel(a)},column_drag_mouse_move:function(a){if(this.drag_start){var b;b=rcube_event.get_mouse_pos(a);if(!this.drag_mouse_start||3>Math.abs(b.x-this.drag_mouse_start.x)&&3>Math.abs(b.y-this.drag_mouse_start.y))return!1;if(!this.col_draglayer){b=$(this.list).offset();var c=this.list.tHead.rows[0].cells;this.col_draglayer=$("<div>").attr("id","rcmcoldraglayer").css(b).css({position:"absolute","z-index":2001,"background-color":"white",
-opacity:0.75,height:this.frame.offsetHeight-2+"px",width:this.frame.offsetWidth-2+"px"}).appendTo(document.body).append($("<div>").attr("id","rcmcolumnindicator").css({position:"absolute","border-right":"2px dotted #555","z-index":2002,height:this.frame.offsetHeight-2+"px"}));this.cols=[];this.list_pos=this.list_min_pos=b.left;for(b=0;b<c.length;b++)this.cols[b]=c[b].offsetWidth,null!==this.column_fixed&&b<=this.column_fixed&&(this.list_min_pos+=this.cols[b])}this.col_draglayer.show();this.col_drag_active=
-!0;this.triggerEvent("column_dragstart")}if(this.col_drag_active&&this.col_draglayer){var c=0,d=rcube_event.get_mouse_pos(a);for(b=0;b<this.cols.length;b++)if(d.x>=this.cols[b]/2+this.list_pos+c)c+=this.cols[b];else break;0==b&&this.list_min_pos>d.x?c=this.list_min_pos-this.list_pos:!this.list.rowcount&&b==this.cols.length&&(c-=2);$("#rcmcolumnindicator").css({width:c+"px"});this.triggerEvent("column_dragmove",a?a:window.event)}return this.drag_start=!1},column_drag_mouse_up:function(a){document.onmousemove=
-null;this.col_draglayer&&(this.col_draglayer.remove(),this.col_draglayer=null);this.col_drag_active&&this.focus();this.col_drag_active=!1;rcube_event.remove_listener({event:"mousemove",object:this,method:"column_drag_mouse_move"});rcube_event.remove_listener({event:"mouseup",object:this,method:"column_drag_mouse_up"});this.del_dragfix();if(null!==this.selected_column&&this.cols&&this.cols.length){var b,c=0,d=rcube_event.get_mouse_pos(a);for(b=0;b<this.cols.length;b++)if(d.x>=this.cols[b]/2+this.list_pos+
-c)c+=this.cols[b];else break;b!=this.selected_column&&b!=this.selected_column+1&&this.column_replace(this.selected_column,b)}this.triggerEvent("column_dragend");return rcube_event.cancel(a)},row_children:function(a){if(!this.rows[a]||!this.rows[a].has_children)return[];var b=[],c=this.rows[a].depth;for(a=this.rows[a].obj.nextSibling;a;){if(1==a.nodeType&&(r=this.rows[a.uid])){if(!r.depth||r.depth<=c)break;b.push(r.uid)}a=a.nextSibling}return b},add_dragfix:function(){$("iframe").each(function(){$('<div class="iframe-dragdrop-fix"></div>').css({background:"#fff",
-width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css($(this).offset()).appendTo(document.body)})},del_dragfix:function(){$("div.iframe-dragdrop-fix").each(function(){this.parentNode.removeChild(this)})},column_replace:function(a,b){var c;c=this.list.tHead.rows[0].cells;var d=c[a],e=c[b],f=document.createElement("td");e?c[0].parentNode.insertBefore(f,e):c[0].parentNode.appendChild(f);c[0].parentNode.replaceChild(d,f);r=0;for(c=this.list.tBodies[0].rows.length;r<
-c;r++)row=this.list.tBodies[0].rows[r],d=row.cells[a],e=row.cells[b],f=document.createElement("td"),e?row.insertBefore(f,e):row.appendChild(f),row.replaceChild(d,f);this.subject_col==a?this.subject_col=b>a?b-1:b:this.subject_col<a&&b<=this.subject_col?this.subject_col++:this.subject_col>a&&b>=this.subject_col&&this.subject_col--;this.triggerEvent("column_replace")}};rcube_list_widget.prototype.addEventListener=rcube_event_engine.prototype.addEventListener;
-rcube_list_widget.prototype.removeEventListener=rcube_event_engine.prototype.removeEventListener;rcube_list_widget.prototype.triggerEvent=rcube_event_engine.prototype.triggerEvent;
+$(":focus:not(body)").blur();window.focus();(a||(a=window.event))&&rcube_event.cancel(a)},blur:function(){var a,b;this.focused=!1;for(a in this.selection)b=this.selection[a],this.rows[b]&&this.rows[b].obj&&$(this.rows[b].obj).removeClass("selected focused").addClass("unfocused")},drag_column:function(a,b){if(1<this.colcount){this.drag_start=!0;this.drag_mouse_start=rcube_event.get_mouse_pos(a);rcube_event.add_listener({event:"mousemove",object:this,method:"column_drag_mouse_move"});rcube_event.add_listener({event:"mouseup",
+object:this,method:"column_drag_mouse_up"});this.add_dragfix();for(var c=0;c<this.list.tHead.rows[0].cells.length;c++)if(b==this.list.tHead.rows[0].cells[c]){this.selected_column=c;break}}return!1},drag_row:function(a,b){var c=rcube_event.get_target(a),d=c.tagName.toLowerCase();if(this.dont_select||c&&("input"==d||"img"==d)||2==rcube_event.get_button(a))return!0;this.in_selection_before=this.in_selection(b)?b:!1;this.in_selection_before||(c=rcube_event.get_modifier(a),this.select_row(b,c,!1));this.draggable&&
+this.selection.length&&(this.drag_start=!0,this.drag_mouse_start=rcube_event.get_mouse_pos(a),rcube_event.add_listener({event:"mousemove",object:this,method:"drag_mouse_move"}),rcube_event.add_listener({event:"mouseup",object:this,method:"drag_mouse_up"}),bw.mobile&&(rcube_event.add_listener({event:"touchmove",object:this,method:"drag_mouse_move"}),rcube_event.add_listener({event:"touchend",object:this,method:"drag_mouse_up"})),this.add_dragfix());return!1},click_row:function(a,b){var c=(new Date).getTime(),
+d=rcube_event.get_modifier(a),e=rcube_event.get_target(a),f=e.tagName.toLowerCase();if(e&&("input"==f||"img"==f))return!0;if(this.dont_select)return this.dont_select=!1;e=c-this.rows[b].clicked<this.dblclick_time;this.drag_active||(this.in_selection_before!=b||e)||this.select_row(b,d,!1);this.in_selection_before=this.drag_start=!1;this.rows&&e&&this.in_selection(b)?(this.triggerEvent("dblclick"),c=0):this.triggerEvent("click");this.drag_active||(this.del_dragfix(),rcube_event.cancel(a));this.rows[b].clicked=
+c;return!1},find_root:function(a){var b=this.rows[a];return b&&b.parent_uid?this.find_root(b.parent_uid):a},expand_row:function(a,b){var c=this.rows[b],d=rcube_event.get_target(a),e=rcube_event.get_modifier(a);this.dont_select=!0;c.clicked=0;c.expanded?(d.className="collapsed",e==CONTROL_KEY||this.multiexpand?this.collapse_all(c):this.collapse(c)):(d.className="expanded",e==CONTROL_KEY||this.multiexpand?this.expand_all(c):this.expand(c))},collapse:function(a){a.expanded=!1;this.triggerEvent("expandcollapse",
+{uid:a.uid,expanded:a.expanded,obj:a.obj});var b=a.depth;a=a?a.obj.nextSibling:null;for(var c;a;){if(1==a.nodeType){if((c=this.rows[a.uid])&&c.depth<=b)break;$(a).css("display","none");c.expanded&&(c.expanded=!1,this.triggerEvent("expandcollapse",{uid:c.uid,expanded:c.expanded,obj:a}))}a=a.nextSibling}return!1},expand:function(a){var b,c,d,e,f;a?(a.expanded=!0,d=a.depth,e=a.obj.nextSibling,this.update_expando(a.uid,!0),this.triggerEvent("expandcollapse",{uid:a.uid,expanded:a.expanded,obj:a.obj})):
+(e=this.list.tBodies[0].firstChild,f=d=0);for(;e;){if(1==e.nodeType&&(b=this.rows[e.uid])){if(a&&(!b.depth||b.depth<=d))break;if(b.parent_uid)if((c=this.rows[b.parent_uid])&&c.expanded){if(a&&c==a||f>=c.depth-1)f=c.depth,$(e).css("display",""),b.expanded=!0,this.triggerEvent("expandcollapse",{uid:b.uid,expanded:b.expanded,obj:e})}else if(a&&(!c||c.depth<=d))break}e=e.nextSibling}return!1},collapse_all:function(a){var b,c,d;if(a){if(a.expanded=!1,b=a.depth,c=a.obj.nextSibling,this.update_expando(a.uid),
+this.triggerEvent("expandcollapse",{uid:a.uid,expanded:a.expanded,obj:a.obj}),b&&this.multiexpand)return!1}else c=this.list.tBodies[0].firstChild,b=0;for(;c;){if(1==c.nodeType&&(d=this.rows[c.uid])){if(a&&(!d.depth||d.depth<=b))break;(a||d.depth)&&$(c).css("display","none");d.has_children&&d.expanded&&(d.expanded=!1,this.update_expando(d.uid,!1),this.triggerEvent("expandcollapse",{uid:d.uid,expanded:d.expanded,obj:c}))}c=c.nextSibling}return!1},expand_all:function(a){var b,c,d;a?(a.expanded=!0,b=
+a.depth,c=a.obj.nextSibling,this.update_expando(a.uid,!0),this.triggerEvent("expandcollapse",{uid:a.uid,expanded:a.expanded,obj:a.obj})):(c=this.list.tBodies[0].firstChild,b=0);for(;c;){if(1==c.nodeType&&(d=this.rows[c.uid])){if(a&&d.depth<=b)break;$(c).css("display","");d.has_children&&!d.expanded&&(d.expanded=!0,this.update_expando(d.uid,!0),this.triggerEvent("expandcollapse",{uid:d.uid,expanded:d.expanded,obj:c}))}c=c.nextSibling}return!1},update_expando:function(a,b){var c=document.getElementById("rcmexpando"+
+a);c&&(c.className=b?"expanded":"collapsed")},get_next_row:function(){if(!this.rows)return!1;for(var a=this.rows[this.last_selected],a=a?a.obj.nextSibling:null;a&&(1!=a.nodeType||"none"==a.style.display);)a=a.nextSibling;return a},get_prev_row:function(){if(!this.rows)return!1;for(var a=this.rows[this.last_selected],a=a?a.obj.previousSibling:null;a&&(1!=a.nodeType||"none"==a.style.display);)a=a.previousSibling;return a},get_first_row:function(){if(this.rowcount){var a,b,c=this.list.tBodies[0].rows;
+a=0;for(b=c.length-1;a<b;a++)if(c[a].id&&String(c[a].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i)&&null!=this.rows[RegExp.$1])return RegExp.$1}return null},get_last_row:function(){if(this.rowcount){var a,b=this.list.tBodies[0].rows;for(a=b.length-1;0<=a;a--)if(b[a].id&&String(b[a].id).match(/^rcmrow([a-z0-9\-_=\+\/]+)/i)&&null!=this.rows[RegExp.$1])return RegExp.$1}return null},select_row:function(a,b,c){var d=this.selection.join(",");this.multiselect||(b=0);this.shift_start||(this.shift_start=a);if(b){switch(b){case SHIFT_KEY:this.shift_select(a,
+!1);break;case CONTROL_KEY:c||this.highlight_row(a,!0);break;case CONTROL_SHIFT_KEY:this.shift_select(a,!0);break;default:this.highlight_row(a,!1)}this.multi_selecting=!0}else this.shift_start=a,this.highlight_row(a,!1),this.multi_selecting=!1;this.selection.join(",")!=d&&this.triggerEvent("select");0!=this.last_selected&&this.rows[this.last_selected]&&$(this.rows[this.last_selected].obj).removeClass("focused");this.toggleselect&&this.last_selected==a?(this.clear_selection(),a=null):$(this.rows[a].obj).addClass("focused");
+this.selection.length||(this.shift_start=null);this.last_selected=a},select:function(a){this.select_row(a,!1);this.scrollto(a)},select_next:function(){var a=this.get_next_row(),b=this.get_prev_row();(a=a?a:b)&&this.select_row(a.uid,!1,!1)},select_first:function(a){var b=this.get_first_row();b&&(a?(this.shift_select(b,a),this.triggerEvent("select"),this.scrollto(b)):this.select(b))},select_last:function(a){var b=this.get_last_row();b&&(a?(this.shift_select(b,a),this.triggerEvent("select"),this.scrollto(b)):
+this.select(b))},select_children:function(a){var b=this.row_children(a),c=b.length;for(a=0;a<c;a++)this.in_selection(b[a])||this.select_row(b[a],CONTROL_KEY)},shift_select:function(a,b){this.rows[this.shift_start]&&this.selection.length||(this.shift_start=a);var c,d,e;d=this.rows[a];e=this.rows[this.shift_start].obj.rowIndex;var f=d.obj.rowIndex;!d.expanded&&d.has_children&&(d=this.rows[this.row_children(a).pop()])&&(f=d.obj.rowIndex);d=e<f?e:f;e=e>f?e:f;for(c in this.rows)this.rows[c].obj.rowIndex>=
+d&&this.rows[c].obj.rowIndex<=e?this.in_selection(c)||this.highlight_row(c,!0):this.in_selection(c)&&!b&&this.highlight_row(c,!0)},in_selection:function(a){for(var b in this.selection)if(this.selection[b]==a)return!0;return!1},select_all:function(a){if(!this.rows||!this.rows.length)return!1;var b,c=this.selection.join(",");this.selection=[];for(b in this.rows)a&&!0!=this.rows[b][a]?$(this.rows[b].obj).removeClass("selected").removeClass("unfocused"):(this.last_selected=b,this.highlight_row(b,!0,!0));
+this.selection.join(",")!=c&&this.triggerEvent("select");this.focus();return!0},invert_selection:function(){if(!this.rows||!this.rows.length)return!1;var a,b=this.selection.join(",");for(a in this.rows)this.highlight_row(a,!0);this.selection.join(",")!=b&&this.triggerEvent("select");this.focus();return!0},clear_selection:function(a){var b,c=this.selection.length;if(a)for(b in this.selection){if(this.selection[b]==a){this.selection.splice(b,1);break}}else{for(b in this.selection)this.rows[this.selection[b]]&&
+$(this.rows[this.selection[b]].obj).removeClass("selected").removeClass("unfocused");this.selection=[]}c&&!this.selection.length&&this.triggerEvent("select")},get_selection:function(){return this.selection},get_single_selection:function(){return 1==this.selection.length?this.selection[0]:null},highlight_row:function(a,b,c){if(this.rows[a])if(b)if(this.in_selection(a)){var d=$.inArray(a,this.selection);b=this.selection.slice(0,d);d=this.selection.slice(d+1,this.selection.length);this.selection=b.concat(d);
+$(this.rows[a].obj).removeClass("selected").removeClass("unfocused");c||this.rows[a].expanded||this.highlight_children(a,!1)}else this.selection.push(a),$(this.rows[a].obj).addClass("selected"),c||this.rows[a].expanded||this.highlight_children(a,!0);else if(1<this.selection.length||!this.in_selection(a))this.clear_selection(),this.selection[0]=a,$(this.rows[a].obj).addClass("selected")},highlight_children:function(a,b){var c,d,e=this.row_children(a),f=e.length;for(c=0;c<f;c++)d=this.in_selection(e[c]),
+(b&&!d||!b&&d)&&this.highlight_row(e[c],!0,!0)},key_press:function(a){var b=a.target||{};if(!0!=this.focused||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||"SELECT"==b.nodeName)return!0;var b=rcube_event.get_keycode(a),c=rcube_event.get_modifier(a);switch(b){case 40:case 38:case 63233:case 63232:return rcube_event.cancel(a),this.use_arrow_key(b,c);case 61:case 107:case 109:case 32:return rcube_event.cancel(a),a=this.use_plusminus_key(b,c),this.key_pressed=b,this.modkey=c,this.triggerEvent("keypress"),
+this.modkey=0,a;case 36:return this.select_first(c),rcube_event.cancel(a);case 35:return this.select_last(c),rcube_event.cancel(a);case 27:return this.drag_active?this.drag_mouse_up(a):this.col_drag_active?(this.selected_column=null,this.column_drag_mouse_up(a)):rcube_event.cancel(a);default:if(this.key_pressed=b,this.modkey=c,this.triggerEvent("keypress"),this.modkey=0,this.key_pressed==this.BACKSPACE_KEY)return rcube_event.cancel(a)}return!0},use_arrow_key:function(a,b){var c;if(40==a||63233==a)c=
+this.get_next_row();else if(38==a||63232==a)c=this.get_prev_row();c&&(this.select_row(c.uid,b,!1),this.scrollto(c.uid));return!1},use_plusminus_key:function(a,b){var c=this.rows[this.last_selected];if(c)return 32==a&&(a=c.expanded?109:61),61==a||107==a?b==CONTROL_KEY||this.multiexpand?this.expand_all(c):this.expand(c):b==CONTROL_KEY||this.multiexpand?this.collapse_all(c):this.collapse(c),this.update_expando(c.uid,c.expanded),!1},scrollto:function(a){var b=this.rows[a].obj;if(b&&this.frame){var c=
+Number(b.offsetTop);!c&&this.rows[a].parent_uid&&(a=this.find_root(this.rows[a].uid),this.expand_all(this.rows[a]),c=Number(b.offsetTop));c<Number(this.frame.scrollTop)?this.frame.scrollTop=c:c+Number(b.offsetHeight)>Number(this.frame.scrollTop)+Number(this.frame.offsetHeight)&&(this.frame.scrollTop=c+Number(b.offsetHeight)-Number(this.frame.offsetHeight))}},drag_mouse_move:function(a){if("touchmove"==a.type)if(1==a.changedTouches.length)a=rcube_event.touchevent(a.changedTouches[0]);else return rcube_event.cancel(a);
+if(this.drag_start){var b=rcube_event.get_mouse_pos(a);if(!this.drag_mouse_start||3>Math.abs(b.x-this.drag_mouse_start.x)&&3>Math.abs(b.y-this.drag_mouse_start.y))return!1;this.draglayer||(this.draglayer=$("<div>").attr("id","rcmdraglayer").css({position:"absolute",display:"none","z-index":2E3}).appendTo(document.body));var c,d,e=$.merge([],this.selection);for(c in e)d=e[c],this.rows[d].expanded||this.select_children(d);this.draglayer.html("");for(c=0;c<this.selection.length;c++){if(12<c){this.draglayer.append("...");
+break}if(e=this.rows[this.selection[c]].obj)for(d=b=0;d<e.childNodes.length;d++)if("TD"==e.childNodes[d].nodeName){0==c&&(this.drag_start_pos=$(e.childNodes[d]).offset());if(0>this.subject_col||0<=this.subject_col&&this.subject_col==b){for(var f,g,h=e.childNodes[d].childNodes,b=0;b<h.length;b++)!(g=e.childNodes[d].childNodes[b])||3!=g.nodeType&&"A"!=g.nodeName||(f=g);if(!f)break;d=$(f).text();d=$.trim(d);d=50<d.length?d.substring(0,50)+"...":d;d=$("<div>").text(d);this.draglayer.append(d);break}b++}}this.draglayer.show();
+this.drag_active=!0;this.triggerEvent("dragstart")}this.drag_active&&this.draglayer&&(c=rcube_event.get_mouse_pos(a),this.draglayer.css({left:c.x+20+"px",top:c.y-5+(bw.ie?document.documentElement.scrollTop:0)+"px"}),this.triggerEvent("dragmove",a?a:window.event));return this.drag_start=!1},drag_mouse_up:function(a){document.onmousemove=null;if("touchend"==a.type&&1!=a.changedTouches.length)return rcube_event.cancel(a);this.draglayer&&this.draglayer.is(":visible")&&(this.drag_start_pos?this.draglayer.animate(this.drag_start_pos,
+300,"swing").hide(20):this.draglayer.hide());this.drag_active&&this.focus();this.drag_active=!1;rcube_event.remove_listener({event:"mousemove",object:this,method:"drag_mouse_move"});rcube_event.remove_listener({event:"mouseup",object:this,method:"drag_mouse_up"});bw.mobile&&(rcube_event.remove_listener({event:"touchmove",object:this,method:"drag_mouse_move"}),rcube_event.remove_listener({event:"touchend",object:this,method:"drag_mouse_up"}));this.del_dragfix();this.triggerEvent("dragend");return rcube_event.cancel(a)},
+column_drag_mouse_move:function(a){if(this.drag_start){var b;b=rcube_event.get_mouse_pos(a);if(!this.drag_mouse_start||3>Math.abs(b.x-this.drag_mouse_start.x)&&3>Math.abs(b.y-this.drag_mouse_start.y))return!1;if(!this.col_draglayer){b=$(this.list).offset();var c=this.list.tHead.rows[0].cells;this.col_draglayer=$("<div>").attr("id","rcmcoldraglayer").css(b).css({position:"absolute","z-index":2001,"background-color":"white",opacity:0.75,height:this.frame.offsetHeight-2+"px",width:this.frame.offsetWidth-
+2+"px"}).appendTo(document.body).append($("<div>").attr("id","rcmcolumnindicator").css({position:"absolute","border-right":"2px dotted #555","z-index":2002,height:this.frame.offsetHeight-2+"px"}));this.cols=[];this.list_pos=this.list_min_pos=b.left;for(b=0;b<c.length;b++)this.cols[b]=c[b].offsetWidth,null!==this.column_fixed&&b<=this.column_fixed&&(this.list_min_pos+=this.cols[b])}this.col_draglayer.show();this.col_drag_active=!0;this.triggerEvent("column_dragstart")}if(this.col_drag_active&&this.col_draglayer){var c=
+0,d=rcube_event.get_mouse_pos(a);for(b=0;b<this.cols.length;b++)if(d.x>=this.cols[b]/2+this.list_pos+c)c+=this.cols[b];else break;0==b&&this.list_min_pos>d.x?c=this.list_min_pos-this.list_pos:this.list.rowcount||b!=this.cols.length||(c-=2);$("#rcmcolumnindicator").css({width:c+"px"});this.triggerEvent("column_dragmove",a?a:window.event)}return this.drag_start=!1},column_drag_mouse_up:function(a){document.onmousemove=null;this.col_draglayer&&(this.col_draglayer.remove(),this.col_draglayer=null);this.col_drag_active&&
+this.focus();this.col_drag_active=!1;rcube_event.remove_listener({event:"mousemove",object:this,method:"column_drag_mouse_move"});rcube_event.remove_listener({event:"mouseup",object:this,method:"column_drag_mouse_up"});this.del_dragfix();if(null!==this.selected_column&&this.cols&&this.cols.length){var b,c=0,d=rcube_event.get_mouse_pos(a);for(b=0;b<this.cols.length;b++)if(d.x>=this.cols[b]/2+this.list_pos+c)c+=this.cols[b];else break;b!=this.selected_column&&b!=this.selected_column+1&&this.column_replace(this.selected_column,
+b)}this.triggerEvent("column_dragend");return rcube_event.cancel(a)},row_children:function(a){if(!this.rows[a]||!this.rows[a].has_children)return[];var b=[],c=this.rows[a].depth;for(a=this.rows[a].obj.nextSibling;a;){if(1==a.nodeType&&(r=this.rows[a.uid])){if(!r.depth||r.depth<=c)break;b.push(r.uid)}a=a.nextSibling}return b},add_dragfix:function(){$("iframe").each(function(){$('<div class="iframe-dragdrop-fix"></div>').css({background:"#fff",width:this.offsetWidth+"px",height:this.offsetHeight+"px",
+position:"absolute",opacity:"0.001",zIndex:1E3}).css($(this).offset()).appendTo(document.body)})},del_dragfix:function(){$("div.iframe-dragdrop-fix").each(function(){this.parentNode.removeChild(this)})},column_replace:function(a,b){var c;c=this.list.tHead.rows[0].cells;var d=c[a],e=c[b],f=document.createElement("td");e?c[0].parentNode.insertBefore(f,e):c[0].parentNode.appendChild(f);c[0].parentNode.replaceChild(d,f);r=0;for(c=this.list.tBodies[0].rows.length;r<c;r++)row=this.list.tBodies[0].rows[r],
+d=row.cells[a],e=row.cells[b],f=document.createElement("td"),e?row.insertBefore(f,e):row.appendChild(f),row.replaceChild(d,f);this.subject_col==a?this.subject_col=b>a?b-1:b:this.subject_col<a&&b<=this.subject_col?this.subject_col++:this.subject_col>a&&b>=this.subject_col&&this.subject_col--;this.triggerEvent("column_replace")}};rcube_list_widget.prototype.addEventListener=rcube_event_engine.prototype.addEventListener;rcube_list_widget.prototype.removeEventListener=rcube_event_engine.prototype.removeEventListener;
+rcube_list_widget.prototype.triggerEvent=rcube_event_engine.prototype.triggerEvent;
diff --git a/program/js/list.js.src b/program/js/list.js.src
index 6c4b861..668d019 100644
--- a/program/js/list.js.src
+++ b/program/js/list.js.src
@@ -230,8 +230,9 @@ focus: function(e)
   }
 
   // Un-focus already focused elements (#1487123, #1487316, #1488600, #1488620)
+  // It looks that window.focus() does the job for all browsers, but not Firefox (#1489058)
   $(':focus:not(body)').blur();
-  $('iframe').each(function() { this.blur(); });
+  window.focus();
 
   if (e || (e = window.event))
     rcube_event.cancel(e);
@@ -687,7 +688,6 @@ select_row: function(id, mod_key, with_mouse)
     this.shift_start = null;
 
   this.last_selected = id;
-  this.list.focus();
 },
 
 
diff --git a/program/lib/Roundcube/bootstrap.php b/program/lib/Roundcube/bootstrap.php
index 38ef216..db61dc2 100644
--- a/program/lib/Roundcube/bootstrap.php
+++ b/program/lib/Roundcube/bootstrap.php
@@ -46,13 +46,15 @@ if (php_sapi_name() != 'cli') {
 
 foreach ($config as $optname => $optval) {
     if ($optval != ini_get($optname) && @ini_set($optname, $optval) === false) {
-        die("ERROR: Wrong '$optname' option value and it wasn't possible to set it to required value ($optval).\n"
-            ."Check your PHP configuration (including php_admin_flag).");
+        $error = "ERROR: Wrong '$optname' option value and it wasn't possible to set it to required value ($optval).\n"
+            . "Check your PHP configuration (including php_admin_flag).";
+        if (defined('STDERR')) fwrite(STDERR, $error); else echo $error;
+        exit(1);
     }
 }
 
 // framework constants
-define('RCUBE_VERSION', '0.9-beta');
+define('RCUBE_VERSION', '0.9.2');
 define('RCUBE_CHARSET', 'UTF-8');
 
 if (!defined('RCUBE_LIB_DIR')) {
diff --git a/program/lib/Roundcube/html.php b/program/lib/Roundcube/html.php
index b437a99..1a4c3be 100644
--- a/program/lib/Roundcube/html.php
+++ b/program/lib/Roundcube/html.php
@@ -771,6 +771,11 @@ class html_table extends html
             $index = $this->rowindex;
         }
 
+        // make sure row object exists (#1489094)
+        if (!$this->rows[$index]) {
+            $this->rows[$index] = new stdClass;
+        }
+
         $this->rows[$index]->attrib = $attr;
     }
 
diff --git a/program/lib/Roundcube/rcube.php b/program/lib/Roundcube/rcube.php
index b259566..b681f05 100644
--- a/program/lib/Roundcube/rcube.php
+++ b/program/lib/Roundcube/rcube.php
@@ -1074,14 +1074,20 @@ class rcube
     {
         // handle PHP exceptions
         if (is_object($arg) && is_a($arg, 'Exception')) {
-            $err = array(
+            $arg = array(
                 'type' => 'php',
                 'code' => $arg->getCode(),
                 'line' => $arg->getLine(),
                 'file' => $arg->getFile(),
                 'message' => $arg->getMessage(),
             );
-            $arg = $err;
+        }
+        else if (is_string($arg)) {
+            $arg = array('message' => $arg, 'type' => 'php');
+        }
+
+        if (empty($arg['code'])) {
+            $arg['code'] = 500;
         }
 
         // installer
@@ -1091,14 +1097,24 @@ class rcube
             return;
         }
 
-        if (($log || $terminate) && $arg['type'] && $arg['message']) {
+        $cli = php_sapi_name() == 'cli';
+
+        if (($log || $terminate) && !$cli && $arg['type'] && $arg['message']) {
             $arg['fatal'] = $terminate;
             self::log_bug($arg);
         }
 
-        // display error page and terminate script
-        if ($terminate && is_object(self::$instance->output)) {
-            self::$instance->output->raise_error($arg['code'], $arg['message']);
+        // terminate script
+        if ($terminate) {
+            // display error page
+            if (is_object(self::$instance->output)) {
+                self::$instance->output->raise_error($arg['code'], $arg['message']);
+            }
+            else if ($cli) {
+                fwrite(STDERR, 'ERROR: ' . $arg['message']);
+            }
+
+            exit(1);
         }
     }
 
@@ -1137,7 +1153,7 @@ class rcube
 
             if (!self::write_log('errors', $log_entry)) {
                 // send error to PHPs error handler if write_log didn't succeed
-                trigger_error($arg_arr['message']);
+                trigger_error($arg_arr['message'], E_USER_WARNING);
             }
         }
 
diff --git a/program/lib/Roundcube/rcube_addressbook.php b/program/lib/Roundcube/rcube_addressbook.php
index cbc3c67..a1b29c3 100644
--- a/program/lib/Roundcube/rcube_addressbook.php
+++ b/program/lib/Roundcube/rcube_addressbook.php
@@ -309,9 +309,14 @@ abstract class rcube_addressbook
      * List all active contact groups of this source
      *
      * @param string  Optional search string to match group name
+     * @param int     Matching mode:
+     *                0 - partial (*abc*),
+     *                1 - strict (=),
+     *                2 - prefix (abc*)
+     *
      * @return array  Indexed list of contact groups, each a hash array
      */
-    function list_groups($search = null)
+    function list_groups($search = null, $mode = 0)
     {
         /* empty for address books don't supporting groups */
         return array();
@@ -370,9 +375,10 @@ abstract class rcube_addressbook
     /**
      * Add the given contact records the a certain group
      *
-     * @param string  Group identifier
-     * @param array   List of contact identifiers to be added
-     * @return int    Number of contacts added
+     * @param string       Group identifier
+     * @param array|string List of contact identifiers to be added
+     *
+     * @return int Number of contacts added
      */
     function add_to_group($group_id, $ids)
     {
@@ -383,9 +389,10 @@ abstract class rcube_addressbook
     /**
      * Remove the given contact records from a certain group
      *
-     * @param string  Group identifier
-     * @param array   List of contact identifiers to be removed
-     * @return int    Number of deleted group members
+     * @param string       Group identifier
+     * @param array|string List of contact identifiers to be removed
+     *
+     * @return int Number of deleted group members
      */
     function remove_from_group($group_id, $ids)
     {
@@ -528,7 +535,7 @@ abstract class rcube_addressbook
      */
     public static function compose_contact_key($contact, $sort_col)
     {
-        $key = $contact[$sort_col] . ':' . $row['sourceid'];
+        $key = $contact[$sort_col] . ':' . $contact['sourceid'];
 
         // add email to a key to not skip contacts with the same name (#1488375)
         if (!empty($contact['email'])) {
@@ -538,7 +545,6 @@ abstract class rcube_addressbook
          return $key;
     }
 
-
     /**
      * Compare search value with contact data
      *
diff --git a/program/lib/Roundcube/rcube_cache.php b/program/lib/Roundcube/rcube_cache.php
index 92f12a8..deaba68 100644
--- a/program/lib/Roundcube/rcube_cache.php
+++ b/program/lib/Roundcube/rcube_cache.php
@@ -145,7 +145,7 @@ class rcube_cache
      */
     function write($key, $data)
     {
-        return $this->write_record($key, $this->packed ? serialize($data) : $data);
+        return $this->write_record($key, $this->serialize($data));
     }
 
 
@@ -219,7 +219,7 @@ class rcube_cache
             if ($this->cache_changes[$key]) {
                 // Make sure we're not going to write unchanged data
                 // by comparing current md5 sum with the sum calculated on DB read
-                $data = $this->packed ? serialize($data) : $data;
+                $data = $this->serialize($data);
 
                 if (!$this->cache_sums[$key] || $this->cache_sums[$key] != md5($data)) {
                     $this->write_record($key, $data);
@@ -255,7 +255,7 @@ class rcube_cache
 
             if ($data) {
                 $md5sum = md5($data);
-                $data   = $this->packed ? unserialize($data) : $data;
+                $data   = $this->unserialize($data);
 
                 if ($nostore) {
                     return $data;
@@ -283,7 +283,7 @@ class rcube_cache
                 $key = substr($sql_arr['cache_key'], strlen($this->prefix)+1);
                 $md5sum = $sql_arr['data'] ? md5($sql_arr['data']) : null;
                 if ($sql_arr['data']) {
-                    $data = $this->packed ? unserialize($sql_arr['data']) : $sql_arr['data'];
+                    $data = $this->unserialize($sql_arr['data']);
                 }
 
                 if ($nostore) {
@@ -364,7 +364,6 @@ class rcube_cache
      * @param string  $key         Cache key name or pattern
      * @param boolean $prefix_mode Enable it to clear all keys starting
      *                             with prefix specified in $key
-     *
      */
     private function remove_record($key=null, $prefix_mode=false)
     {
@@ -553,4 +552,28 @@ class rcube_cache
         // This way each cache will have its own index
         return sprintf('%d:%s%s', $this->userid, $this->prefix, 'INDEX');
     }
+
+    /**
+     * Serializes data for storing
+     */
+    private function serialize($data)
+    {
+        if ($this->type == 'db') {
+            return $this->db->encode($data, $this->packed);
+        }
+
+        return $this->packed ? serialize($data) : $data;
+    }
+
+    /**
+     * Unserializes serialized data
+     */
+    private function unserialize($data)
+    {
+        if ($this->type == 'db') {
+            return $this->db->decode($data, $this->packed);
+        }
+
+        return $this->packed ? @unserialize($data) : $data;
+    }
 }
diff --git a/program/lib/Roundcube/rcube_config.php b/program/lib/Roundcube/rcube_config.php
index 2190dc4..f694877 100644
--- a/program/lib/Roundcube/rcube_config.php
+++ b/program/lib/Roundcube/rcube_config.php
@@ -174,7 +174,7 @@ class rcube_config
             ob_end_clean();
 
             if (is_array($rcmail_config)) {
-                $this->prop = array_merge($this->prop, $rcmail_config, $this->userprefs);
+                $this->merge($rcmail_config);
                 return true;
             }
         }
@@ -195,9 +195,6 @@ class rcube_config
         if (isset($this->prop[$name])) {
             $result = $this->prop[$name];
         }
-        else if (isset($this->legacy_props[$name])) {
-            return $this->get($this->legacy_props[$name], $def);
-        }
         else {
             $result = $def;
         }
@@ -241,6 +238,7 @@ class rcube_config
     public function merge($prefs)
     {
         $this->prop = array_merge($this->prop, $prefs, $this->userprefs);
+        $this->fix_legacy_props();
     }
 
 
@@ -273,6 +271,8 @@ class rcube_config
         $this->userprefs = $prefs;
         $this->prop      = array_merge($this->prop, $prefs);
 
+        $this->fix_legacy_props();
+
         // override timezone settings with client values
         if ($this->prop['timezone'] == 'auto') {
             $this->prop['_timezone_value'] = isset($_SESSION['timezone']) ? $this->client_timezone() : $this->prop['_timezone_value'];
@@ -435,4 +435,18 @@ class rcube_config
         return date_default_timezone_get();
     }
 
+    /**
+     * Convert legacy options into new ones
+     */
+    private function fix_legacy_props()
+    {
+        foreach ($this->legacy_props as $new => $old) {
+            if (isset($this->prop[$old])) {
+                if (!isset($this->prop[$new])) {
+                    $this->prop[$new] = $this->prop[$old];
+                }
+                unset($this->prop[$old]);
+            }
+        }
+    }
 }
diff --git a/program/lib/Roundcube/rcube_contacts.php b/program/lib/Roundcube/rcube_contacts.php
index c66e986..3919cdc 100644
--- a/program/lib/Roundcube/rcube_contacts.php
+++ b/program/lib/Roundcube/rcube_contacts.php
@@ -137,16 +137,34 @@ class rcube_contacts extends rcube_addressbook
      * List all active contact groups of this source
      *
      * @param string  Search string to match group name
+     * @param int     Matching mode:
+     *                0 - partial (*abc*),
+     *                1 - strict (=),
+     *                2 - prefix (abc*)
+     *
      * @return array  Indexed list of contact groups, each a hash array
      */
-    function list_groups($search = null)
+    function list_groups($search = null, $mode = 0)
     {
         $results = array();
 
         if (!$this->groups)
             return $results;
 
-        $sql_filter = $search ? " AND " . $this->db->ilike('name', '%'.$search.'%') : '';
+        if ($search) {
+            switch (intval($mode)) {
+            case 1:
+                $sql_filter = $this->db->ilike('name', $search);
+                break;
+            case 2:
+                $sql_filter = $this->db->ilike('name', $search . '%');
+                break;
+            default:
+                $sql_filter = $this->db->ilike('name', '%' . $search . '%');
+            }
+
+            $sql_filter = " AND $sql_filter";
+        }
 
         $sql_result = $this->db->query(
             "SELECT * FROM ".$this->db->table_name($this->db_groups).
@@ -626,10 +644,6 @@ class rcube_contacts extends rcube_addressbook
             $insert_id = $this->db->insert_id($this->db_name);
         }
 
-        // also add the newly created contact to the active group
-        if ($insert_id && $this->group_id)
-            $this->add_to_group($this->group_id, $insert_id);
-
         $this->cache = null;
 
         return $insert_id;
@@ -883,9 +897,10 @@ class rcube_contacts extends rcube_addressbook
     /**
      * Add the given contact records the a certain group
      *
-     * @param string  Group identifier
-     * @param array   List of contact identifiers to be added
-     * @return int    Number of contacts added 
+     * @param string       Group identifier
+     * @param array|string List of contact identifiers to be added
+     *
+     * @return int Number of contacts added
      */
     function add_to_group($group_id, $ids)
     {
@@ -930,9 +945,10 @@ class rcube_contacts extends rcube_addressbook
     /**
      * Remove the given contact records from a certain group
      *
-     * @param string  Group identifier
-     * @param array   List of contact identifiers to be removed
-     * @return int    Number of deleted group members
+     * @param string       Group identifier
+     * @param array|string List of contact identifiers to be removed
+     *
+     * @return int Number of deleted group members
      */
     function remove_from_group($group_id, $ids)
     {
diff --git a/program/lib/Roundcube/rcube_csv2vcard.php b/program/lib/Roundcube/rcube_csv2vcard.php
index 0d3276b..506a4b7 100644
--- a/program/lib/Roundcube/rcube_csv2vcard.php
+++ b/program/lib/Roundcube/rcube_csv2vcard.php
@@ -353,6 +353,12 @@ class rcube_csv2vcard
         if (!empty($this->local_label_map)) {
             for ($i = 0; $i < $size; $i++) {
                 $label = $this->local_label_map[$elements[$i]];
+
+                // special localization label
+                if ($label && $label[0] == '_') {
+                    $label = substr($label, 1);
+                }
+
                 if ($label && !empty($this->csv2vcard_map[$label])) {
                     $map2[$i] = $this->csv2vcard_map[$label];
                 }
diff --git a/program/lib/Roundcube/rcube_db.php b/program/lib/Roundcube/rcube_db.php
index 113ed84..b3f549b 100644
--- a/program/lib/Roundcube/rcube_db.php
+++ b/program/lib/Roundcube/rcube_db.php
@@ -128,7 +128,7 @@ class rcube_db
         $dsn_string  = $this->dsn_string($dsn);
         $dsn_options = $this->dsn_options($dsn);
 
-        if ($db_pconn) {
+        if ($this->db_pconn) {
             $dsn_options[PDO::ATTR_PERSISTENT] = true;
         }
 
@@ -405,21 +405,22 @@ class rcube_db
         $this->db_error_msg = null;
 
         // send query
-        $query = $this->dbh->query($query);
+        $result = $this->dbh->query($query);
 
-        if ($query === false) {
+        if ($result === false) {
             $error = $this->dbh->errorInfo();
             $this->db_error = true;
             $this->db_error_msg = sprintf('[%s] %s', $error[1], $error[2]);
 
             rcube::raise_error(array('code' => 500, 'type' => 'db',
                 'line' => __LINE__, 'file' => __FILE__,
-                'message' => $this->db_error_msg), true, false);
+                'message' => $this->db_error_msg . " (SQL Query: $query)"
+                ), true, false);
         }
 
-        $this->last_result = $query;
+        $this->last_result = $result;
 
-        return $query;
+        return $result;
     }
 
     /**
@@ -634,6 +635,22 @@ class rcube_db
     }
 
     /**
+     * Escapes a string so it can be safely used in a query
+     *
+     * @param string $str A string to escape
+     *
+     * @return string Escaped string for use in a query
+     */
+    public function escape($str)
+    {
+        if (is_null($str)) {
+            return 'NULL';
+        }
+
+        return substr($this->quote($str), 1, -1);
+    }
+
+    /**
      * Quotes a string so it can be safely used as a table or column name
      *
      * @param string $str Value to quote
@@ -648,6 +665,20 @@ class rcube_db
     }
 
     /**
+     * Escapes a string so it can be safely used in a query
+     *
+     * @param string $str A string to escape
+     *
+     * @return string Escaped string for use in a query
+     * @deprecated    Replaced by rcube_db::escape
+     * @see           rcube_db::escape
+     */
+    public function escapeSimple($str)
+    {
+        return $this->escape($str);
+    }
+
+    /**
      * Quotes a string so it can be safely used as a table or column name
      *
      * @param string $str Value to quote
@@ -758,12 +789,19 @@ class rcube_db
     /**
      * Encodes non-UTF-8 characters in string/array/object (recursive)
      *
-     * @param mixed $input Data to fix
+     * @param mixed $input      Data to fix
+     * @param bool  $serialized Enable serialization
      *
      * @return mixed Properly UTF-8 encoded data
      */
-    public static function encode($input)
+    public static function encode($input, $serialized = false)
     {
+        // use Base64 encoding to workaround issues with invalid
+        // or null characters in serialized string (#1489142)
+        if ($serialized) {
+            return base64_encode(serialize($input));
+        }
+
         if (is_object($input)) {
             foreach (get_object_vars($input) as $idx => $value) {
                 $input->$idx = self::encode($value);
@@ -774,6 +812,7 @@ class rcube_db
             foreach ($input as $idx => $value) {
                 $input[$idx] = self::encode($value);
             }
+
             return $input;
         }
 
@@ -783,12 +822,24 @@ class rcube_db
     /**
      * Decodes encoded UTF-8 string/object/array (recursive)
      *
-     * @param mixed $input Input data
+     * @param mixed $input      Input data
+     * @param bool  $serialized Enable serialization
      *
      * @return mixed Decoded data
      */
-    public static function decode($input)
+    public static function decode($input, $serialized = false)
     {
+        // use Base64 encoding to workaround issues with invalid
+        // or null characters in serialized string (#1489142)
+        if ($serialized) {
+            // Keep backward compatybility where base64 wasn't used
+            if (strpos(substr($input, 0, 16), ':') !== false) {
+                return self::decode(@unserialize($input));
+            }
+
+            return @unserialize(base64_decode($input));
+        }
+
         if (is_object($input)) {
             foreach (get_object_vars($input) as $idx => $value) {
                 $input->$idx = self::decode($value);
diff --git a/program/lib/Roundcube/rcube_db_mysql.php b/program/lib/Roundcube/rcube_db_mysql.php
index 8ab6403..7f5ad2b 100644
--- a/program/lib/Roundcube/rcube_db_mysql.php
+++ b/program/lib/Roundcube/rcube_db_mysql.php
@@ -34,6 +34,13 @@ class rcube_db_mysql extends rcube_db
      */
     protected function init()
     {
+        if (version_compare(PHP_VERSION, '5.3.0', '<')) {
+            rcube::raise_error(array('code' => 600, 'type' => 'db',
+                'line' => __LINE__, 'file' => __FILE__,
+                'message' => "MySQL driver requires PHP >= 5.3, current version is " . PHP_VERSION),
+                true, true);
+        }
+
         // SQL identifiers quoting
         $this->options['identifier_start'] = '`';
         $this->options['identifier_end'] = '`';
@@ -147,7 +154,7 @@ class rcube_db_mysql extends rcube_db
 
             $result = $this->query('SHOW VARIABLES');
 
-            while ($sql_arr = $this->fetch_array($result)) {
+            while ($row = $this->fetch_array($result)) {
                 $this->variables[$row[0]] = $row[1];
             }
         }
diff --git a/program/lib/Roundcube/rcube_db_pgsql.php b/program/lib/Roundcube/rcube_db_pgsql.php
index cf23c5e..a06a37c 100644
--- a/program/lib/Roundcube/rcube_db_pgsql.php
+++ b/program/lib/Roundcube/rcube_db_pgsql.php
@@ -129,4 +129,38 @@ class rcube_db_pgsql extends rcube_db
         return isset($this->variables[$varname]) ? $this->variables[$varname] : $default;
     }
 
+    /**
+     * Returns PDO DSN string from DSN array
+     *
+     * @param array $dsn DSN parameters
+     *
+     * @return string DSN string
+     */
+    protected function dsn_string($dsn)
+    {
+        $params = array();
+        $result = 'pgsql:';
+
+        if ($dsn['hostspec']) {
+            $params[] = 'host=' . $dsn['hostspec'];
+        }
+        else if ($dsn['socket']) {
+            $params[] = 'host=' . $dsn['socket'];
+        }
+
+        if ($dsn['port']) {
+            $params[] = 'port=' . $dsn['port'];
+        }
+
+        if ($dsn['database']) {
+            $params[] = 'dbname=' . $dsn['database'];
+        }
+
+        if (!empty($params)) {
+            $result .= implode(';', $params);
+        }
+
+        return $result;
+    }
+
 }
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index 16b309c..a323a84 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -981,7 +981,7 @@ class rcube_imap extends rcube_storage
             // use memory less expensive (and quick) method for big result set
             $index = clone $this->index('', $this->sort_field, $this->sort_order);
             // get messages uids for one page...
-            $index->slice($start_msg, min($cnt-$from, $this->page_size));
+            $index->slice($from, min($cnt-$from, $this->page_size));
 
             if ($slice) {
                 $index->slice(-$slice, $slice);
@@ -1336,17 +1336,16 @@ class rcube_imap extends rcube_storage
         // THREAD=REFERENCES:     sorting by sent date of root message
         // THREAD=REFS:           sorting by the most recent date in each thread
 
-        if ($this->sort_field && ($this->sort_field != 'date' || $this->get_capability('THREAD') != 'REFS')) {
-            $index = $this->index_direct($this->folder, $this->sort_field, $this->sort_order, false);
+        if ($this->get_capability('THREAD') != 'REFS') {
+            $sortby = $this->sort_field ? $this->sort_field : 'date';
+            $index  = $this->index_direct($this->folder, $sortby, $this->sort_order, false);
 
             if (!$index->is_empty()) {
                 $threads->sort($index);
             }
         }
-        else {
-            if ($this->sort_order != $threads->get_parameters('ORDER')) {
-                $threads->revert();
-            }
+        else if ($this->sort_order != $threads->get_parameters('ORDER')) {
+            $threads->revert();
         }
     }
 
@@ -2726,7 +2725,7 @@ class rcube_imap extends rcube_storage
 
         // filter folders list according to rights requirements
         if ($rights && $this->get_capability('ACL')) {
-            $a_folders = $this->filter_rights($a_folders, $rights);
+            $a_mboxes = $this->filter_rights($a_mboxes, $rights);
         }
 
         // filter folders and sort them
diff --git a/program/lib/Roundcube/rcube_imap_cache.php b/program/lib/Roundcube/rcube_imap_cache.php
index 748474a..a3bdf21 100644
--- a/program/lib/Roundcube/rcube_imap_cache.php
+++ b/program/lib/Roundcube/rcube_imap_cache.php
@@ -407,8 +407,8 @@ class rcube_imap_cache
             return;
         }
 
-        $msg   = serialize($this->db->encode(clone $message));
         $flags = 0;
+        $msg   = clone $message;
 
         if (!empty($message->flags)) {
             foreach ($this->flags as $idx => $flag) {
@@ -417,7 +417,9 @@ class rcube_imap_cache
                 }
             }
         }
+
         unset($msg->flags);
+        $msg = $this->db->encode($msg, true);
 
         // update cache record (even if it exists, the update
         // here will work as select, assume row exist if affected_rows=0)
@@ -639,7 +641,7 @@ class rcube_imap_cache
 
         if ($sql_arr = $this->db->fetch_assoc($sql_result)) {
             $data  = explode('@', $sql_arr['data']);
-            $index = @unserialize($data[0]);
+            $index = $this->db->decode($data[0], true);
             unset($data[0]);
 
             if (empty($index)) {
@@ -676,7 +678,7 @@ class rcube_imap_cache
 
         if ($sql_arr = $this->db->fetch_assoc($sql_result)) {
             $data   = explode('@', $sql_arr['data']);
-            $thread = @unserialize($data[0]);
+            $thread = $this->db->decode($data[0], true);
             unset($data[0]);
 
             if (empty($thread)) {
@@ -702,7 +704,7 @@ class rcube_imap_cache
         $data, $mbox_data = array(), $exists = false, $modseq = null)
     {
         $data = array(
-            serialize($data),
+            $this->db->encode($data, true),
             $sort_field,
             (int) $this->skip_deleted,
             (int) $mbox_data['UIDVALIDITY'],
@@ -735,7 +737,7 @@ class rcube_imap_cache
     private function add_thread_row($mailbox, $data, $mbox_data = array(), $exists = false)
     {
         $data = array(
-            serialize($data),
+            $this->db->encode($data, true),
             (int) $this->skip_deleted,
             (int) $mbox_data['UIDVALIDITY'],
             (int) $mbox_data['UIDNEXT'],
@@ -1067,7 +1069,7 @@ class rcube_imap_cache
      */
     private function build_message($sql_arr)
     {
-        $message = $this->db->decode(unserialize($sql_arr['data']));
+        $message = $this->db->decode($sql_arr['data'], true);
 
         if ($message) {
             $message->flags = array();
diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php
index 8182aa1..ddde684 100644
--- a/program/lib/Roundcube/rcube_imap_generic.php
+++ b/program/lib/Roundcube/rcube_imap_generic.php
@@ -746,7 +746,7 @@ class rcube_imap_generic
         }
 
         if ($this->prefs['timeout'] <= 0) {
-            $this->prefs['timeout'] = ini_get('default_socket_timeout');
+            $this->prefs['timeout'] = max(0, intval(ini_get('default_socket_timeout')));
         }
 
         // Connect
@@ -1077,7 +1077,7 @@ class rcube_imap_generic
         }
 
         if (!$this->data['READ-WRITE']) {
-            $this->setError(self::ERROR_READONLY, "Mailbox is read-only", 'EXPUNGE');
+            $this->setError(self::ERROR_READONLY, "Mailbox is read-only");
             return false;
         }
 
@@ -1933,7 +1933,7 @@ class rcube_imap_generic
         }
 
         if (!$this->data['READ-WRITE']) {
-            $this->setError(self::ERROR_READONLY, "Mailbox is read-only", 'STORE');
+            $this->setError(self::ERROR_READONLY, "Mailbox is read-only");
             return false;
         }
 
@@ -1995,7 +1995,7 @@ class rcube_imap_generic
         }
 
         if (!$this->data['READ-WRITE']) {
-            $this->setError(self::ERROR_READONLY, "Mailbox is read-only", 'STORE');
+            $this->setError(self::ERROR_READONLY, "Mailbox is read-only");
             return false;
         }
 
@@ -2447,6 +2447,7 @@ class rcube_imap_generic
         $key     = $this->nextTag();
         $request = $key . ($is_uid ? ' UID' : '') . " FETCH $id ($fetch_mode.PEEK[$part]$partial)";
         $result  = false;
+        $found   = false;
 
         // send request
         if (!$this->putLine($request)) {
@@ -2466,18 +2467,25 @@ class rcube_imap_generic
                 break;
             }
 
-            if (!preg_match('/^\* ([0-9]+) FETCH (.*)$/', $line, $m)) {
+            // skip irrelevant untagged responses (we have a result already)
+            if ($found || !preg_match('/^\* ([0-9]+) FETCH (.*)$/', $line, $m)) {
                 continue;
             }
 
             $line = $m[2];
-            $last = substr($line, -1);
 
             // handle one line response
-            if ($line[0] == '(' && $last == ')') {
+            if ($line[0] == '(' && substr($line, -1) == ')') {
                 // tokenize content inside brackets
-                $tokens = $this->tokenizeResponse(preg_replace('/(^\(|\$)/', '', $line));
-                $result = count($tokens) == 1 ? $tokens[0] : false;
+                $tokens = $this->tokenizeResponse(preg_replace('/(^\(|\)$)/', '', $line));
+
+                for ($i=0; $i<count($tokens); $i+=2) {
+                    if (preg_match('/^(BODY|BINARY)/i', $tokens[$i])) {
+                        $result = $tokens[$i+1];
+                        $found  = true;
+                        break;
+                    }
+                }
 
                 if ($result !== false) {
                     if ($mode == 1) {
@@ -2495,6 +2503,7 @@ class rcube_imap_generic
             else if (preg_match('/\{([0-9]+)\}$/', $line, $m)) {
                 $bytes = (int) $m[1];
                 $prev  = '';
+                $found = true;
 
                 while ($bytes > 0) {
                     $line = $this->readLine(8192);
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php
index a2dd163..922c735 100644
--- a/program/lib/Roundcube/rcube_ldap.php
+++ b/program/lib/Roundcube/rcube_ldap.php
@@ -1403,13 +1403,15 @@ class rcube_ldap extends rcube_addressbook
 
         foreach ((array)$this->prop['autovalues'] as $lf => $templ) {
             if (empty($attrs[$lf])) {
-                // replace {attr} placeholders with concrete attribute values
-                $templ = preg_replace('/\{\w+\}/', '', strtr($templ, $attrvals));
-
-                if (strpos($templ, '(') !== false)
-                    $attrs[$lf] = eval("return ($templ);");
-                else
-                    $attrs[$lf] = $templ;
+                if (strpos($templ, '(') !== false) {
+                    // replace {attr} placeholders with (escaped!) attribute values to be safely eval'd
+                    $code = preg_replace('/\{\w+\}/', '', strtr($templ, array_map('addslashes', $attrvals)));
+                    $attrs[$lf] = eval("return ($code);");
+                }
+                else {
+                    // replace {attr} placeholders with concrete attribute values
+                    $attrs[$lf] = preg_replace('/\{\w+\}/', '', strtr($templ, $attrvals));
+                }
             }
         }
     }
@@ -1715,9 +1717,14 @@ class rcube_ldap extends rcube_addressbook
      * List all active contact groups of this source
      *
      * @param string  Optional search string to match group name
+     * @param int     Matching mode:
+     *                0 - partial (*abc*),
+     *                1 - strict (=),
+     *                2 - prefix (abc*)
+     *
      * @return array  Indexed list of contact groups, each a hash array
      */
-    function list_groups($search = null)
+    function list_groups($search = null, $mode = 0)
     {
         if (!$this->groups)
             return array();
@@ -1729,10 +1736,10 @@ class rcube_ldap extends rcube_addressbook
 
         $groups = array();
         if ($search) {
-            $search = mb_strtolower($search);
             foreach ($group_cache as $group) {
-                if (strpos(mb_strtolower($group['name']), $search) !== false)
+                if ($this->compare_search_value('name', $group['name'], $search, $mode)) {
                     $groups[] = $group;
+                }
             }
         }
         else
@@ -1921,9 +1928,10 @@ class rcube_ldap extends rcube_addressbook
     /**
      * Add the given contact records the a certain group
      *
-     * @param string  Group identifier
-     * @param array   List of contact identifiers to be added
-     * @return int    Number of contacts added
+     * @param string       Group identifier
+     * @param array|string List of contact identifiers to be added
+     *
+     * @return int Number of contacts added
      */
     function add_to_group($group_id, $contact_ids)
     {
@@ -1937,8 +1945,8 @@ class rcube_ldap extends rcube_addressbook
         $group_name  = $group_cache[$group_id]['name'];
         $member_attr = $group_cache[$group_id]['member_attr'];
         $group_dn    = "cn=$group_name,$base_dn";
+        $new_attrs   = array();
 
-        $new_attrs = array();
         foreach ($contact_ids as $id)
             $new_attrs[$member_attr][] = self::dn_decode($id);
 
@@ -1949,28 +1957,32 @@ class rcube_ldap extends rcube_addressbook
 
         $this->cache->remove('groups');
 
-        return count($new_attrs['member']);
+        return count($new_attrs[$member_attr]);
     }
 
     /**
      * Remove the given contact records from a certain group
      *
-     * @param string  Group identifier
-     * @param array   List of contact identifiers to be removed
-     * @return int    Number of deleted group members
+     * @param string       Group identifier
+     * @param array|string List of contact identifiers to be removed
+     *
+     * @return int Number of deleted group members
      */
     function remove_from_group($group_id, $contact_ids)
     {
         if (($group_cache = $this->cache->get('groups')) === null)
             $group_cache = $this->_fetch_groups();
 
+        if (!is_array($contact_ids))
+            $contact_ids = explode(',', $contact_ids);
+
         $base_dn     = $this->groups_base_dn;
         $group_name  = $group_cache[$group_id]['name'];
         $member_attr = $group_cache[$group_id]['member_attr'];
         $group_dn    = "cn=$group_name,$base_dn";
+        $del_attrs   = array();
 
-        $del_attrs = array();
-        foreach (explode(",", $contact_ids) as $id)
+        foreach ($contact_ids as $id)
             $del_attrs[$member_attr][] = self::dn_decode($id);
 
         if (!$this->ldap_mod_del($group_dn, $del_attrs)) {
@@ -1980,7 +1992,7 @@ class rcube_ldap extends rcube_addressbook
 
         $this->cache->remove('groups');
 
-        return count($del_attrs['member']);
+        return count($del_attrs[$member_attr]);
     }
 
     /**
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index 0701cc0..a8bcf6a 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/program/lib/Roundcube/rcube_message.php
@@ -321,7 +321,7 @@ class rcube_message
 
             // parse headers from message/rfc822 part
             if (!isset($structure->headers['subject'])) {
-                list($headers, $dump) = explode("\r\n\r\n", $this->get_part_content($structure->mime_id, null, true, 8192));
+                list($headers, $dump) = explode("\r\n\r\n", $this->get_part_content($structure->mime_id, null, true, 32768));
                 $structure->headers = rcube_mime::parse_headers($headers);
             }
         }
@@ -329,7 +329,8 @@ class rcube_message
             $mimetype = $structure->mimetype;
 
         // show message headers
-        if ($recursive && is_array($structure->headers) && isset($structure->headers['subject'])) {
+        if ($recursive && is_array($structure->headers) &&
+                ($structure->headers['subject'] || $structure->headers['from'] || $structure->headers['to'])) {
             $c = new stdClass;
             $c->type = 'headers';
             $c->headers = $structure->headers;
@@ -755,7 +756,7 @@ class rcube_message
                 $uupart->size     = strlen($uupart->body);
                 $uupart->mime_id  = 'uu.' . $part->mime_id . '.' . $pid;
 
-                $ctype = rcube_mime::content_type($uupart->body, $uupart->filename, 'application/octet-stream', true);
+                $ctype = rcube_mime::file_content_type($uupart->body, $uupart->filename, 'application/octet-stream', true);
                 $uupart->mimetype = $ctype;
                 list($uupart->ctype_primary, $uupart->ctype_secondary) = explode('/', $ctype);
 
diff --git a/program/lib/Roundcube/rcube_mime.php b/program/lib/Roundcube/rcube_mime.php
index 7cd5207..572540f 100644
--- a/program/lib/Roundcube/rcube_mime.php
+++ b/program/lib/Roundcube/rcube_mime.php
@@ -127,10 +127,11 @@ class rcube_mime
      * @param int     $max      List only this number of addresses
      * @param boolean $decode   Decode address strings
      * @param string  $fallback Fallback charset if none specified
+     * @param boolean $addronly Return flat array with e-mail addresses only
      *
-     * @return array  Indexed list of addresses
+     * @return array Indexed list of addresses
      */
-    static function decode_address_list($input, $max = null, $decode = true, $fallback = null)
+    static function decode_address_list($input, $max = null, $decode = true, $fallback = null, $addronly = false)
     {
         $a   = self::parse_address_list($input, $decode, $fallback);
         $out = array();
@@ -145,20 +146,21 @@ class rcube_mime
         foreach ($a as $val) {
             $j++;
             $address = trim($val['address']);
-            $name    = trim($val['name']);
 
-            if ($name && $address && $name != $address)
-                $string = sprintf('%s <%s>', preg_match("/$special_chars/", $name) ? '"'.addcslashes($name, '"').'"' : $name, $address);
-            else if ($address)
-                $string = $address;
-            else if ($name)
-                $string = $name;
-
-            $out[$j] = array(
-                'name'   => $name,
-                'mailto' => $address,
-                'string' => $string
-            );
+            if ($addronly) {
+                $out[$j] = $address;
+            }
+            else {
+                $name = trim($val['name']);
+                if ($name && $address && $name != $address)
+                    $string = sprintf('%s <%s>', preg_match("/$special_chars/", $name) ? '"'.addcslashes($name, '"').'"' : $name, $address);
+                else if ($address)
+                    $string = $address;
+                else if ($name)
+                    $string = $name;
+
+                $out[$j] = array('name' => $name, 'mailto' => $address, 'string' => $string);
+            }
 
             if ($max && $j==$max)
                 break;
@@ -359,6 +361,11 @@ class rcube_mime
                 $address = $m[1];
                 $name    = '';
             }
+            // special case (#1489092)
+            else if (preg_match('/(\s*<MAILER-DAEMON>)$/', $val, $m)) {
+                $address = 'MAILER-DAEMON';
+                $name    = substr($val, 0, -strlen($m[1]));
+            }
             else {
                 $name = $val;
             }
@@ -476,9 +483,10 @@ class rcube_mime
         $q_level = 0;
 
         foreach ($text as $idx => $line) {
-            if ($line[0] == '>') {
-                // remove quote chars, store level in $q
-                $line = preg_replace('/^>+/', '', $line, -1, $q);
+            if (preg_match('/^(>+)/', $line, $m)) {
+                // remove quote chars
+                $q    = strlen($m[1]);
+                $line = preg_replace('/^>+/', '', $line);
                 // remove (optional) space-staffing
                 $line = preg_replace('/^ /', '', $line);
 
@@ -541,9 +549,10 @@ class rcube_mime
 
         foreach ($text as $idx => $line) {
             if ($line != '-- ') {
-                if ($line[0] == '>') {
-                    // remove quote chars, store level in $level
-                    $line   = preg_replace('/^>+/', '', $line, -1, $level);
+                if (preg_match('/^(>+)/', $line, $m)) {
+                    // remove quote chars
+                    $level  = strlen($m[1]);
+                    $line   = preg_replace('/^>+/', '', $line);
                     // remove (optional) space-staffing and spaces before the line end
                     $line   = preg_replace('/(^ | +$)/', '', $line);
                     $prefix = str_repeat('>', $level) . ' ';
@@ -564,82 +573,122 @@ class rcube_mime
 
 
     /**
-     * Improved wordwrap function.
+     * Improved wordwrap function with multibyte support.
+     * The code is based on Zend_Text_MultiByte::wordWrap().
      *
-     * @param string $string  Text to wrap
-     * @param int    $width   Line width
-     * @param string $break   Line separator
-     * @param bool   $cut     Enable to cut word
-     * @param string $charset Charset of $string
+     * @param string $string      Text to wrap
+     * @param int    $width       Line width
+     * @param string $break       Line separator
+     * @param bool   $cut         Enable to cut word
+     * @param string $charset     Charset of $string
+     * @param bool   $wrap_quoted When enabled quoted lines will not be wrapped
      *
      * @return string Text
      */
-    public static function wordwrap($string, $width=75, $break="\n", $cut=false, $charset=null)
+    public static function wordwrap($string, $width=75, $break="\n", $cut=false, $charset=null, $wrap_quoted=true)
     {
-        if ($charset && function_exists('mb_internal_encoding')) {
+        // Note: Never try to use iconv instead of mbstring functions here
+        //       Iconv's substr/strlen are 100x slower (#1489113)
+
+        if ($charset && $charset != RCUBE_CHARSET && function_exists('mb_internal_encoding')) {
             mb_internal_encoding($charset);
         }
 
-        $para   = preg_split('/\r?\n/', $string);
-        $string = '';
+        // Convert \r\n to \n, this is our line-separator
+        $string       = str_replace("\r\n", "\n", $string);
+        $separator    = "\n"; // must be 1 character length
+        $result       = array();
 
-        while (count($para)) {
-            $line = array_shift($para);
-            if ($line[0] == '>') {
-                $string .= $line . (count($para) ? $break : '');
-                continue;
-            }
+        while (($stringLength = mb_strlen($string)) > 0) {
+            $breakPos = mb_strpos($string, $separator, 0);
 
-            $list = explode(' ', $line);
-            $len = 0;
-            while (count($list)) {
-                $line   = array_shift($list);
-                $l      = mb_strlen($line);
-                $space  = $len ? 1 : 0;
-                $newlen = $len + $l + $space;
+            // quoted line (do not wrap)
+            if ($wrap_quoted && $string[0] == '>') {
+                if ($breakPos === $stringLength - 1 || $breakPos === false) {
+                    $subString = $string;
+                    $cutLength = null;
+                }
+                else {
+                    $subString = mb_substr($string, 0, $breakPos);
+                    $cutLength = $breakPos + 1;
+                }
+            }
+            // next line found and current line is shorter than the limit
+            else if ($breakPos !== false && $breakPos < $width) {
+                if ($breakPos === $stringLength - 1) {
+                    $subString = $string;
+                    $cutLength = null;
+                }
+                else {
+                    $subString = mb_substr($string, 0, $breakPos);
+                    $cutLength = $breakPos + 1;
+                }
+            }
+            else {
+                $subString = mb_substr($string, 0, $width);
 
-                if ($newlen <= $width) {
-                    $string .= ($space ? ' ' : '').$line;
-                    $len += ($space + $l);
+                // last line
+                if ($breakPos === false && $subString === $string) {
+                    $cutLength = null;
                 }
                 else {
-                    if ($l > $width) {
-                        if ($cut) {
-                            $start = 0;
-                            while ($l) {
-                                $str = mb_substr($line, $start, $width);
-                                $strlen = mb_strlen($str);
-                                $string .= ($len ? $break : '').$str;
-                                $start += $strlen;
-                                $l -= $strlen;
-                                $len = $strlen;
+                    $nextChar = mb_substr($string, $width, 1);
+
+                    if ($nextChar === ' ' || $nextChar === $separator) {
+                        $afterNextChar = mb_substr($string, $width + 1, 1);
+
+                        if ($afterNextChar === false) {
+                            $subString .= $nextChar;
+                        }
+
+                        $cutLength = mb_strlen($subString) + 1;
+                    }
+                    else {
+                        $spacePos = mb_strrpos($subString, ' ', 0);
+
+                        if ($spacePos !== false) {
+                            $subString = mb_substr($subString, 0, $spacePos);
+                            $cutLength = $spacePos + 1;
+                        }
+                        else if ($cut === false && $breakPos === false) {
+                            $subString = $string;
+                            $cutLength = null;
+                        }
+                        else if ($cut === false) {
+                            $spacePos = mb_strpos($string, ' ', 0);
+
+                            if ($spacePos !== false && $spacePos < $breakPos) {
+                                $subString = mb_substr($string, 0, $spacePos);
+                                $cutLength = $spacePos + 1;
+                            }
+                            else {
+                                $subString = mb_substr($string, 0, $breakPos);
+                                $cutLength = $breakPos + 1;
                             }
                         }
                         else {
-                            $string .= ($len ? $break : '').$line;
-                            if (count($list)) {
-                                $string .= $break;
-                            }
-                            $len = 0;
+                            $subString = mb_substr($subString, 0, $width);
+                            $cutLength = $width;
                         }
                     }
-                    else {
-                        $string .= $break.$line;
-                        $len = $l;
-                    }
                 }
             }
 
-            if (count($para)) {
-                $string .= $break;
+            $result[] = $subString;
+
+            if ($cutLength !== null) {
+                $string = mb_substr($string, $cutLength, ($stringLength - $cutLength));
+            }
+            else {
+                break;
             }
         }
 
-        if ($charset && function_exists('mb_internal_encoding')) {
+        if ($charset && $charset != RCUBE_CHARSET && function_exists('mb_internal_encoding')) {
             mb_internal_encoding(RCUBE_CHARSET);
         }
 
-        return $string;
+        return implode($break, $result);
     }
 
 
@@ -746,7 +795,7 @@ class rcube_mime
         }
 
         foreach ($file_paths as $fp) {
-            if (is_readable($fp)) {
+            if (@is_readable($fp)) {
                 $lines = file($fp, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
                 break;
             }
diff --git a/program/lib/Roundcube/rcube_output.php b/program/lib/Roundcube/rcube_output.php
index b8ae86c..7ccf9a0 100644
--- a/program/lib/Roundcube/rcube_output.php
+++ b/program/lib/Roundcube/rcube_output.php
@@ -162,7 +162,7 @@ abstract class rcube_output
             header("Cache-Control: private, must-revalidate");
         }
         else {
-            header("Cache-Control: private, no-cache, must-revalidate, post-check=0, pre-check=0");
+            header("Cache-Control: private, no-cache, no-store, must-revalidate, post-check=0, pre-check=0");
             header("Pragma: no-cache");
         }
     }
diff --git a/program/lib/Roundcube/rcube_session.php b/program/lib/Roundcube/rcube_session.php
index 059cc11..dedde22 100644
--- a/program/lib/Roundcube/rcube_session.php
+++ b/program/lib/Roundcube/rcube_session.php
@@ -203,8 +203,8 @@ class rcube_session
             if (is_array($a_oldvars)) {
                 // remove unset keys on oldvars
                 foreach ((array)$this->unsets as $var) {
-                    if (isset($a_oldvars[$k])) {
-                        unset($a_oldvars[$k]);
+                    if (isset($a_oldvars[$var])) {
+                        unset($a_oldvars[$var]);
                     }
                     else {
                         $path = explode('.', $var);
@@ -407,7 +407,7 @@ class rcube_session
     /**
      * Unset a session variable
      *
-     * @param string Varibale name (can be a path denoting a certain node in the session array, e.g. compose.attachments.5)
+     * @param string Variable name (can be a path denoting a certain node in the session array, e.g. compose.attachments.5)
      * @return boolean True on success
      */
     public function remove($var=null)
diff --git a/program/lib/Roundcube/rcube_smtp.php b/program/lib/Roundcube/rcube_smtp.php
index 5c7d220..201e826 100644
--- a/program/lib/Roundcube/rcube_smtp.php
+++ b/program/lib/Roundcube/rcube_smtp.php
@@ -119,7 +119,7 @@ class rcube_smtp
         }
 
         // try to connect to server and exit on failure
-        $result = $this->conn->connect($smtp_timeout);
+        $result = $this->conn->connect($CONFIG['smtp_timeout']);
 
         if (PEAR::isError($result)) {
             $this->response[] = "Connection failed: ".$result->getMessage();
diff --git a/program/lib/Roundcube/rcube_spellchecker.php b/program/lib/Roundcube/rcube_spellchecker.php
index 5db9cc8..bf29e49 100644
--- a/program/lib/Roundcube/rcube_spellchecker.php
+++ b/program/lib/Roundcube/rcube_spellchecker.php
@@ -588,7 +588,7 @@ class rcube_spellchecker
 
         if (empty($plugin['abort'])) {
             $dict = array();
-            $this->rc->db->query(
+            $sql_result = $this->rc->db->query(
                 "SELECT data FROM ".$this->rc->db->table_name('dictionary')
                 ." WHERE user_id ". ($plugin['userid'] ? "= ".$this->rc->db->quote($plugin['userid']) : "IS NULL")
                     ." AND " . $this->rc->db->quoteIdentifier('language') . " = ?",
diff --git a/program/lib/Roundcube/rcube_string_replacer.php b/program/lib/Roundcube/rcube_string_replacer.php
index 49a3781..02d5856 100644
--- a/program/lib/Roundcube/rcube_string_replacer.php
+++ b/program/lib/Roundcube/rcube_string_replacer.php
@@ -89,7 +89,7 @@ class rcube_string_replacer
 
         if ($url) {
             $suffix = $this->parse_url_brackets($url);
-            $i = $this->add($prefix . html::a(array(
+            $i = $this->add(html::a(array(
                 'href'   => $url_prefix . $url,
                 'target' => '_blank'
             ), rcube::Q($url)) . $suffix);
@@ -97,7 +97,7 @@ class rcube_string_replacer
 
         // Return valid link for recognized schemes, otherwise
         // return the unmodified string for unrecognized schemes.
-        return $i >= 0 ? $this->get_replacement($i) : $matches[0];
+        return $i >= 0 ? $prefix . $this->get_replacement($i) : $matches[0];
     }
 
     /**
diff --git a/program/lib/Roundcube/rcube_vcard.php b/program/lib/Roundcube/rcube_vcard.php
index 54bb952..aded4aa 100644
--- a/program/lib/Roundcube/rcube_vcard.php
+++ b/program/lib/Roundcube/rcube_vcard.php
@@ -90,7 +90,7 @@ class rcube_vcard
      */
     public function __construct($vcard = null, $charset = RCUBE_CHARSET, $detect = false, $fieldmap = array())
     {
-        if (!empty($fielmap)) {
+        if (!empty($fieldmap)) {
             $this->extend_fieldmap($fieldmap);
         }
 
@@ -784,9 +784,30 @@ class rcube_vcard
                 }
                 return $result;
             }
+
+            $s = strtr($s, $rep2);
+        }
+
+        // some implementations (GMail) use non-standard backslash before colon (#1489085)
+        // we will handle properly any backslashed character - removing dummy backslahes
+        // return strtr($s, array("\r" => '', '\\\\' => '\\', '\n' => "\n", '\N' => "\n", '\,' => ',', '\;' => ';'));
+
+        $s   = str_replace("\r", '', $s);
+        $pos = 0;
+
+        while (($pos = strpos($s, '\\', $pos)) !== false) {
+            $next = substr($s, $pos + 1, 1);
+            if ($next == 'n' || $next == 'N') {
+                $s = substr_replace($s, "\n", $pos, 2);
+            }
+            else {
+                $s = substr_replace($s, '', $pos, 1);
+            }
+
+            $pos += 1;
         }
 
-        return strtr($s, array("\r" => '', '\\\\' => '\\', '\n' => "\n", '\N' => "\n", '\,' => ',', '\;' => ';'));
+        return $s;
     }
 
     /**
diff --git a/program/lib/Roundcube/rcube_washtml.php b/program/lib/Roundcube/rcube_washtml.php
index 27dff9f..6b2efcc 100644
--- a/program/lib/Roundcube/rcube_washtml.php
+++ b/program/lib/Roundcube/rcube_washtml.php
@@ -113,10 +113,9 @@ class rcube_washtml
         'type', 'rows', 'cols', 'disabled', 'readonly', 'checked', 'multiple', 'value'
     );
 
-    /* Block elements which could be empty but cannot be returned in short form (<tag />) */
-    static $block_elements = array('div', 'p', 'pre', 'blockquote', 'a', 'font', 'center',
-        'table', 'ul', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'dl', 'strong',
-        'i', 'b', 'u', 'span',
+    /* Elements which could be empty and be returned in short form (<tag />) */
+    static $void_elements = array('area', 'base', 'br', 'col', 'command', 'embed', 'hr',
+        'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'
     );
 
     /* State for linked objects in HTML */
@@ -134,12 +133,15 @@ class rcube_washtml
     /* Ignore these HTML tags but process their content */
     private $_ignore_elements = array();
 
-    /* Block elements which could be empty but cannot be returned in short form (<tag />) */
-    private $_block_elements = array();
+    /* Elements which could be empty and be returned in short form (<tag />) */
+    private $_void_elements = array();
 
     /* Allowed HTML attributes */
     private $_html_attribs = array();
 
+    /* Max nesting level */
+    private $max_nesting_level;
+
 
     /**
      * Class constructor
@@ -149,9 +151,9 @@ class rcube_washtml
         $this->_html_elements   = array_flip((array)$p['html_elements']) + array_flip(self::$html_elements) ;
         $this->_html_attribs    = array_flip((array)$p['html_attribs']) + array_flip(self::$html_attribs);
         $this->_ignore_elements = array_flip((array)$p['ignore_elements']) + array_flip(self::$ignore_elements);
-        $this->_block_elements  = array_flip((array)$p['block_elements']) + array_flip(self::$block_elements);
+        $this->_void_elements   = array_flip((array)$p['void_elements']) + array_flip(self::$void_elements);
 
-        unset($p['html_elements'], $p['html_attribs'], $p['ignore_elements'], $p['block_elements']);
+        unset($p['html_elements'], $p['html_attribs'], $p['ignore_elements'], $p['void_elements']);
 
         $this->config = $p + array('show_washed' => true, 'allow_remote' => false, 'cid_map' => array());
     }
@@ -284,12 +286,26 @@ class rcube_washtml
      * It output only allowed tags with allowed attributes
      * and allowed inline styles
      */
-    private function dumpHtml($node)
+    private function dumpHtml($node, $level = 0)
     {
         if (!$node->hasChildNodes()) {
             return '';
         }
 
+        $level++;
+
+        if ($this->max_nesting_level > 0 && $level == $this->max_nesting_level - 1) {
+            // log error message once
+            if (!$this->max_nesting_level_error) {
+                $this->max_nesting_level_error = true;
+                rcube::raise_error(array('code' => 500, 'type' => 'php',
+                    'line' => __LINE__, 'file' => __FILE__,
+                    'message' => "Maximum nesting level exceeded (xdebug.max_nesting_level={$this->max_nesting_level})"),
+                    true, false);
+            }
+            return '<!-- ignored -->';
+        }
+
         $node = $node->firstChild;
         $dump = '';
 
@@ -299,19 +315,19 @@ class rcube_washtml
                 $tagName = strtolower($node->tagName);
                 if ($callback = $this->handlers[$tagName]) {
                     $dump .= call_user_func($callback, $tagName,
-                        $this->wash_attribs($node), $this->dumpHtml($node), $this);
+                        $this->wash_attribs($node), $this->dumpHtml($node, $level), $this);
                 }
                 else if (isset($this->_html_elements[$tagName])) {
-                    $content = $this->dumpHtml($node);
+                    $content = $this->dumpHtml($node, $level);
                     $dump .= '<' . $tagName . $this->wash_attribs($node) .
-                        ($content != '' || isset($this->_block_elements[$tagName]) ? ">$content</$tagName>" : ' />');
+                        ($content === '' && isset($this->_void_elements[$tagName]) ? ' />' : ">$content</$tagName>");
                 }
                 else if (isset($this->_ignore_elements[$tagName])) {
                     $dump .= '<!-- ' . htmlspecialchars($tagName, ENT_QUOTES) . ' not allowed -->';
                 }
                 else {
                     $dump .= '<!-- ' . htmlspecialchars($tagName, ENT_QUOTES) . ' ignored -->';
-                    $dump .= $this->dumpHtml($node); // ignore tags not its content
+                    $dump .= $this->dumpHtml($node, $level); // ignore tags not its content
                 }
                 break;
 
@@ -324,14 +340,14 @@ class rcube_washtml
                 break;
 
             case XML_HTML_DOCUMENT_NODE:
-                $dump .= $this->dumpHtml($node);
+                $dump .= $this->dumpHtml($node, $level);
                 break;
 
             case XML_DOCUMENT_TYPE_NODE:
                 break;
 
             default:
-                $dump . '<!-- node type ' . $node->nodeType . ' -->';
+                $dump .= '<!-- node type ' . $node->nodeType . ' -->';
             }
         } while($node = $node->nextSibling);
 
@@ -358,6 +374,9 @@ class rcube_washtml
             $this->config['base_url'] = '';
         }
 
+        // Detect max nesting level (for dumpHTML) (#1489110)
+        $this->max_nesting_level = (int) @ini_get('xdebug.max_nesting_level');
+
         @$node->loadHTML($html);
         return $this->dumpHtml($node);
     }
@@ -405,6 +424,7 @@ class rcube_washtml
             rcube::raise_error(array('code' => 620, 'type' => 'php',
                 'line' => __LINE__, 'file' => __FILE__,
                 'message' => $errstr), true, false);
+
             return '';
         }
 
diff --git a/program/lib/utf8.class.php b/program/lib/utf8.class.php
index e0dc9e2..0446159 100644
--- a/program/lib/utf8.class.php
+++ b/program/lib/utf8.class.php
@@ -60,8 +60,8 @@ Class utf8 {
   function loadCharset($charset) {
     
     $charset = preg_replace(array('/^WINDOWS-*125([0-8])$/', '/^CP-/'), array('CP125\\1', 'CP'), $charset);
-    if (isset($aliases[$charset]))
-      $charset = $aliases[$charset];
+    if (isset($this->aliases[$charset]))
+      $charset = $this->aliases[$charset];
     
     $this->charset = $charset;
 
diff --git a/program/localization/ar_SA/labels.inc b/program/localization/ar_SA/labels.inc
index da2e806..af08cc3 100644
--- a/program/localization/ar_SA/labels.inc
+++ b/program/localization/ar_SA/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'نسخ';
 $labels['move']     = 'نقل';
 $labels['moveto']   = 'نقل إلى...';
 $labels['download'] = 'تنزيل';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Show';
 $labels['showanyway'] = 'Show it anyway';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'الصفحة الحالية';
 $labels['unread'] = 'غير المقروءة';
 $labels['flagged'] = 'موسوم';
 $labels['unanswered'] = 'بلا رد';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'محذوف';
 $labels['undeleted'] = 'غير محذوفة';
 $labels['invert'] = 'عكس';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'افتح في نافذة جديدة';
 $labels['emlsave'] = 'تنزيل (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'تعديل كجديد';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'إنشاء رسائل بنسق HTML';
 $labels['htmlonreply'] = 'حال الرد على الرسائل بصيغة HTML فقط';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'توقيع HTML';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'إظهار قسم المعاينة';
 $labels['skin'] = 'شكل الواجهة';
 $labels['logoutclear'] = 'إفراغ سلة المحذوفات عند الخروج';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'إزالة التوقيع من الرسالة
 $labels['autoaddsignature'] = 'إضافة التوقيع آلياً';
 $labels['newmessageonly'] = 'الرسالة الجديدة فقط';
 $labels['replyandforwardonly'] = 'الردود والتمريرات فقط';
-$labels['replysignaturepos'] = 'إضافة التوقيع عند الرد أو التمرير';
-$labels['belowquote'] = 'بعد الاقتباس';
-$labels['abovequote'] = 'قبل الاقتباس';
 $labels['insertsignature'] = 'إضافة التوقيع';
 $labels['previewpanemarkread']  = 'تحديد الرسائل المُعاينة كمقروءة';
 $labels['afternseconds']  = 'بعد $n ثواني';
diff --git a/program/localization/ar_SA/messages.inc b/program/localization/ar_SA/messages.inc
index e10c832..9429a39 100644
--- a/program/localization/ar_SA/messages.inc
+++ b/program/localization/ar_SA/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'خطأ في قاعدة البيانات!';
 $messages['requesttimedout'] = 'Request timed out';
 $messages['errorreadonly'] = 'تعذر تنفيذ العملية. المجلد للقراءة فقط.';
 $messages['errornoperm'] = 'تعذر تنفيذ العملية. ليست لديك الصلاحية.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'طلب غير صالح! لم تحفظ أية بيانات.';
 $messages['invalidhost'] = 'Invalid server name.';
 $messages['nomessagesfound'] = 'لم يعثر على أية رسائل في صندوق البريد هذا';
diff --git a/program/localization/ast/labels.inc b/program/localization/ast/labels.inc
index 075097e..49f8568 100644
--- a/program/localization/ast/labels.inc
+++ b/program/localization/ast/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Copia';
 $labels['move']     = 'Move';
 $labels['moveto']   = 'mover pa...';
 $labels['download'] = 'baxar';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Show';
 $labels['showanyway'] = 'Show it anyway';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Current page';
 $labels['unread'] = 'Ensin lleer';
 $labels['flagged'] = 'Marcáu';
 $labels['unanswered'] = 'Ensin contestar';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Desaniciáu';
 $labels['undeleted'] = 'Not deleted';
 $labels['invert'] = 'Invertir';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'Abrir en una ventana nueva';
 $labels['emlsave'] = 'Baxar (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Editar como nuevu';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Facer el mensaxe n\'HTML';
 $labels['htmlonreply'] = 'on reply to HTML message';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'Firma HTML';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Entever';
 $labels['skin'] = 'Estilu';
 $labels['logoutclear'] = 'Vaciar la papelera al zarrar la sesión';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
 $labels['autoaddsignature'] = 'Automatically add signature';
 $labels['newmessageonly'] = 'new message only';
 $labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
 $labels['insertsignature'] = 'Insert signature';
 $labels['previewpanemarkread']  = 'Mark previewed messages as read';
 $labels['afternseconds']  = 'after $n seconds';
diff --git a/program/localization/ast/messages.inc b/program/localization/ast/messages.inc
index 135f70b..9e415b8 100644
--- a/program/localization/ast/messages.inc
+++ b/program/localization/ast/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
 $messages['requesttimedout'] = 'Request timed out';
 $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
 $messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'Fallu de la solicitú. Nun se guardaron datos.';
 $messages['invalidhost'] = 'Invalid server name.';
 $messages['nomessagesfound'] = 'Nun doi con mensaxes';
diff --git a/program/localization/az_AZ/labels.inc b/program/localization/az_AZ/labels.inc
index 1b7994f..0cb4b3e 100644
--- a/program/localization/az_AZ/labels.inc
+++ b/program/localization/az_AZ/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Kopyala';
 $labels['move']     = 'Köçür';
 $labels['moveto']   = 'Burada köçür...';
 $labels['download'] = 'Endir';
+$labels['open']     = 'Aç';
 $labels['showattachment'] = 'Göstər';
 $labels['showanyway'] = 'İstənilən halda göstər';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Hazırki səhifəni';
 $labels['unread'] = 'Oxunmamışları';
 $labels['flagged'] = 'İşarəliləri';
 $labels['unanswered'] = 'Cavabsızları';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Silinmişləri';
 $labels['undeleted'] = 'Silinməyib';
 $labels['invert'] = 'İnvertliləri';
@@ -204,6 +206,8 @@ $labels['body']  = 'Mətn';
 
 $labels['openinextwin'] = 'Yeni pəncərədə aç';
 $labels['emlsave'] = 'Saxla (.eml)';
+$labels['changeformattext'] = 'Sadə mətn formatında göstər';
+$labels['changeformathtml'] = 'HTML formatında göstər';
 
 // message compose
 $labels['editasnew']      = 'Yeni kimi redaktÉ™ et';
@@ -335,8 +339,8 @@ $labels['composeto']      = 'Seçilmiş ünvanlara məktub yaz';
 $labels['contactsfromto'] = '$count ünvanının $from - $to arası';
 $labels['print']          = 'Çap et';
 $labels['export']         = 'Ä°xrac et';
-$labels['exportall']      = 'Export all';
-$labels['exportsel']      = 'Export selected';
+$labels['exportall']      = 'Hamısını İxrac et';
+$labels['exportsel']      = 'Seçilmişləri İxrac et';
 $labels['exportvcards']   = 'Ünvanları vCards formatında ixrac et';
 $labels['newcontactgroup'] = 'Ãœnvanlar qrupunu yarat';
 $labels['grouprename']    = 'Qruğun adını dəyişdir';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'HTML-dÉ™ mesaj yaz';
 $labels['htmlonreply'] = 'yalnız HTML mesajlar ilə cavab';
 $labels['htmlonreplyandforward'] = 'HTML məktuba cavab və yönəltmə zamanı';
 $labels['htmlsignature'] = 'HTML imza';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Prevyu paneli göstər';
 $labels['skin'] = 'Ä°nterfeys stili';
 $labels['logoutclear'] = 'Poçtdan çıxan zaman səbəti təmizlə';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Cavab zamanı imzanı sil';
 $labels['autoaddsignature'] = 'İmzanı avtomatik əlavə et';
 $labels['newmessageonly'] = 'yalnız yeni məktublarda';
 $labels['replyandforwardonly'] = 'Yalnız cavab və yönəldilənlərdə';
-$labels['replysignaturepos'] = 'Cavab və yönəltmə zamanı imzanı bərkid';
-$labels['belowquote'] = 'sitatdan sonra';
-$labels['abovequote'] = 'sitatdan əvvəl';
 $labels['insertsignature'] = 'İmza əlavə et';
 $labels['previewpanemarkread']  = 'Baxılmış şəkilləri oxunmuş kimi qeyd et';
 $labels['afternseconds']  = '$n saniyədən sonra';
diff --git a/program/localization/az_AZ/messages.inc b/program/localization/az_AZ/messages.inc
index 9398272..418f270 100644
--- a/program/localization/az_AZ/messages.inc
+++ b/program/localization/az_AZ/messages.inc
@@ -17,20 +17,22 @@
 */
 
 $messages = array();
-$messages['errortitle']  = 'Xəta baş verib!';
-$messages['loginfailed']  = 'GiriÅŸ uÄŸursuz oldu';
-$messages['cookiesdisabled'] = 'Sizin brauzer kukiləri qəbul etmir';
-$messages['sessionerror'] = 'Sizin sessiya köhnəlib';
-$messages['storageerror'] = 'IMAP serverlə bağlantı alınmadı';
-$messages['servererror'] = 'Server xətası!';
-$messages['servererrormsg'] = 'Server xətası: $msg';
-$messages['dberror'] = 'Məlumatlar bazasında xəta!';
+$messages['errortitle']  = 'Xəta baş verdi!';
+$messages['loginfailed']  = 'GiriÅŸ uÄŸursuz oldu.';
+$messages['cookiesdisabled'] = 'Sizin brauzer kukiləri qəbul etmir.';
+$messages['sessionerror'] = 'Sizin sessiya köhnəlib.';
+$messages['storageerror'] = 'IMAP serverlə bağlantı alınmadı.';
+$messages['servererror'] = 'Server Xətası!';
+$messages['servererrormsg'] = 'Server Xətası: $msg';
+$messages['dberror'] = 'Məlumatlar Bazasında Xəta!';
 $messages['requesttimedout'] = 'Sorğunun gözləmə müddəti bitdi';
-$messages['errorreadonly'] = 'Əməliyyatı etmək mümkün deyil. Qovluq yalnız oxunuş üçündür.';
+$messages['errorreadonly'] = 'Əməliyyatı icra etmək mümkün deyil. Qovluq yalnız oxunuş üçündür.';
 $messages['errornoperm'] = 'Əməliyyatı etmək mümkün deyil. Giriş qadağandır.';
+$messages['erroroverquota'] = 'Əməliyyat icra edilə bilinmir. Boş disk həcmi yoxdur.';
+$messages['erroroverquotadelete'] = 'Boş disk həcmi yoxdur. Məktubu silmək üçün SHIFT+DEL düyməsini istifadə edin.';
 $messages['invalidrequest'] = 'Səhv sorğu! Məlumat yaddaşda qalmadı.';
-$messages['invalidhost'] = 'Səhv server adı';
-$messages['nomessagesfound'] = 'Poçt qutusunda məktub tapılmadı';
+$messages['invalidhost'] = 'Səhv server adı.';
+$messages['nomessagesfound'] = 'Poçt qutusunda məktub tapılmadı.';
 $messages['loggedout'] = 'Çıxış uğurlu oldu. Sağ olun!';
 $messages['mailboxempty'] = 'Poçt qutusu boşdur';
 $messages['refreshing'] = 'Yenilənmə...';
diff --git a/program/localization/be_BE/labels.inc b/program/localization/be_BE/labels.inc
index 5bafc78..a5489a4 100644
--- a/program/localization/be_BE/labels.inc
+++ b/program/localization/be_BE/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Copy';
 $labels['move']     = 'Move';
 $labels['moveto']   = 'Move to...';
 $labels['download'] = 'Download';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Show';
 $labels['showanyway'] = 'Show it anyway';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Current page';
 $labels['unread'] = 'Unread';
 $labels['flagged'] = 'Flagged';
 $labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Deleted';
 $labels['undeleted'] = 'Not deleted';
 $labels['invert'] = 'Invert';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'Open in new window';
 $labels['emlsave'] = 'Download (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Edit as new';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Compose HTML messages';
 $labels['htmlonreply'] = 'on reply to HTML message';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'HTML signature';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Show preview pane';
 $labels['skin'] = 'Interface skin';
 $labels['logoutclear'] = 'Clear Trash on logout';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
 $labels['autoaddsignature'] = 'Automatically add signature';
 $labels['newmessageonly'] = 'new message only';
 $labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
 $labels['insertsignature'] = 'Insert signature';
 $labels['previewpanemarkread']  = 'Mark previewed messages as read';
 $labels['afternseconds']  = 'after $n seconds';
diff --git a/program/localization/be_BE/messages.inc b/program/localization/be_BE/messages.inc
index 0aaa4d4..73cdb3e 100644
--- a/program/localization/be_BE/messages.inc
+++ b/program/localization/be_BE/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Памылка базы даных!';
 $messages['requesttimedout'] = 'Request timed out';
 $messages['errorreadonly'] = 'Немагчыма выканаць аперацыю. Тэчка даступна толькі для чытання.';
 $messages['errornoperm'] = 'Немагчыма выканаць аперацыю. Адмоўлена ў доступе.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'Не дзейсны запыт! Даныя не захаваныя.';
 $messages['invalidhost'] = 'Invalid server name.';
 $messages['nomessagesfound'] = 'No messages found in this mailbox.';
diff --git a/program/localization/bg_BG/labels.inc b/program/localization/bg_BG/labels.inc
index 0a53342..6542cfc 100644
--- a/program/localization/bg_BG/labels.inc
+++ b/program/localization/bg_BG/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Копиране';
 $labels['move']     = 'Преместване';
 $labels['moveto']   = 'Премести в...';
 $labels['download'] = 'Изтегли';
+$labels['open']     = 'Отвори';
 $labels['showattachment'] = 'Показване';
 $labels['showanyway'] = 'Показване въпреки това';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Страница';
 $labels['unread'] = 'Нови';
 $labels['flagged'] = 'Отбелязано';
 $labels['unanswered'] = 'Без отговор';
+$labels['withattachment'] = 'С прикачен файл';
 $labels['deleted'] = 'Изтрито';
 $labels['undeleted'] = 'Не е изтрит';
 $labels['invert'] = 'Инвертирай';
@@ -204,6 +206,8 @@ $labels['body']  = 'Основен текст';
 
 $labels['openinextwin'] = 'Отвори в нов прозорец';
 $labels['emlsave'] = 'Изтегли като .eml';
+$labels['changeformattext'] = 'Покажи в опростен текстов формат';
+$labels['changeformathtml'] = 'Покажи в HTML формат';
 
 // message compose
 $labels['editasnew']      = 'Промени като ново';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Писане на съобщениe като HTML';
 $labels['htmlonreply'] = 'само при отговор на HTML събощения';
 $labels['htmlonreplyandforward'] = 'само при препращане или отговор на HTML съобщение';
 $labels['htmlsignature'] = 'HTML подпис';
+$labels['showemail'] = 'Показва email адрес с екранното име';
 $labels['previewpane'] = 'Панел за преглед';
 $labels['skin'] = 'Смяна изгледа на интерфейса';
 $labels['logoutclear'] = 'Изчисти кошчето при изход';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Премахване на предишния
 $labels['autoaddsignature'] = 'Автоматично добавяне на подпис';
 $labels['newmessageonly'] = 'само на нови съобщения';
 $labels['replyandforwardonly'] = 'само на отговори и препратени';
-$labels['replysignaturepos'] = 'Поставяне на подпис при отговор или препращане';
-$labels['belowquote'] = 'над цитатът';
-$labels['abovequote'] = 'под цитатът';
 $labels['insertsignature'] = 'Вмъкване на подпис';
 $labels['previewpanemarkread']  = 'Маркиране на прегледаните съобщения като прочетени';
 $labels['afternseconds']  = 'след $n секунди';
diff --git a/program/localization/bg_BG/messages.inc b/program/localization/bg_BG/messages.inc
index ead6892..219772e 100644
--- a/program/localization/bg_BG/messages.inc
+++ b/program/localization/bg_BG/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Грешка с базата данни!';
 $messages['requesttimedout'] = 'Заявката е с изтекло време';
 $messages['errorreadonly'] = 'Операцията не може да бъде изпълнена. Папката е с права само за четене';
 $messages['errornoperm'] = 'Операцията не може да бъде изпълнена. Отказани права за достъп';
+$messages['erroroverquota'] = 'Невъзможно извършване на действието, няма достатъчно свободно дисково пространство.';
+$messages['erroroverquotadelete'] = 'Няма достатъчно свободно дисково пространство. Ползвайте SHIFT+DEL за да изтриете съобщение.';
 $messages['invalidrequest'] = 'Невалидна заявка! Данните не са съхранени.';
 $messages['invalidhost'] = 'Невалидно име на сървър';
 $messages['nomessagesfound'] = 'Няма съобщения';
diff --git a/program/localization/bn_BD/labels.inc b/program/localization/bn_BD/labels.inc
index f1ad34b..a0866a3 100644
--- a/program/localization/bn_BD/labels.inc
+++ b/program/localization/bn_BD/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'অনুলিপির ঠিকানা';
 $labels['move']     = 'Move';
 $labels['moveto']   = 'সরিয়ে ফেলুন..';
 $labels['download'] = 'ডাউনলোড';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Show';
 $labels['showanyway'] = 'Show it anyway';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Current page';
 $labels['unread'] = 'নাদেখা (unread)';
 $labels['flagged'] = 'দাগানো (flagged)';
 $labels['unanswered'] = 'উত্তর না দেওয়া গুলো';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Deleted';
 $labels['undeleted'] = 'Not deleted';
 $labels['invert'] = 'Invert';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'নতুন উইন্ডো তে দেখুন';
 $labels['emlsave'] = 'Download (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Edit as new';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'HTML এ মেইল/চিঠি লিখুন';
 $labels['htmlonreply'] = 'on reply to HTML message';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'HTML এ স্বাক্ষর';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'ছোটোকরে দেখার জায়গা';
 $labels['skin'] = 'মেইলবক্স এর পুরোটার চেহারা';
 $labels['logoutclear'] = 'বেরহবার সময় ডাস্টবিন অটোমেটিক খালি হবে';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
 $labels['autoaddsignature'] = 'Automatically add signature';
 $labels['newmessageonly'] = 'new message only';
 $labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
 $labels['insertsignature'] = 'Insert signature';
 $labels['previewpanemarkread']  = 'Mark previewed messages as read';
 $labels['afternseconds']  = 'after $n seconds';
diff --git a/program/localization/bn_BD/messages.inc b/program/localization/bn_BD/messages.inc
index eaa4024..44d5fcc 100644
--- a/program/localization/bn_BD/messages.inc
+++ b/program/localization/bn_BD/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
 $messages['requesttimedout'] = 'Request timed out';
 $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
 $messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'Invalid request! No data was saved.';
 $messages['invalidhost'] = 'Invalid server name.';
 $messages['nomessagesfound'] = 'এই মেইলবক্সে কোনো চিঠি নাই';
diff --git a/program/localization/br/labels.inc b/program/localization/br/labels.inc
index 4cc9e6f..537a887 100644
--- a/program/localization/br/labels.inc
+++ b/program/localization/br/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Eilañ';
 $labels['move']     = 'Dilec\'hiañ';
 $labels['moveto']   = 'Dilec\'hiañ da...';
 $labels['download'] = 'Pellgargañ';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Diskouez';
 $labels['showanyway'] = 'Diskouez anezhañ memestra';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Current page';
 $labels['unread'] = 'Na lennet';
 $labels['flagged'] = 'Flagged';
 $labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Deleted';
 $labels['undeleted'] = 'Not deleted';
 $labels['invert'] = 'Invert';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'Open in new window';
 $labels['emlsave'] = 'Download (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Edit as new';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Sevel ur c\'hemennad er furmad HTML';
 $labels['htmlonreply'] = 'on reply to HTML message';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'Sinadur HTML';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Diskouez panel alberz';
 $labels['skin'] = 'Interface skin';
 $labels['logoutclear'] = 'Clear Trash on logout';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
 $labels['autoaddsignature'] = 'Automatically add signature';
 $labels['newmessageonly'] = 'new message only';
 $labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
 $labels['insertsignature'] = 'Insert signature';
 $labels['previewpanemarkread']  = 'Mark previewed messages as read';
 $labels['afternseconds']  = 'after $n seconds';
diff --git a/program/localization/br/messages.inc b/program/localization/br/messages.inc
index 425dad9..c198857 100644
--- a/program/localization/br/messages.inc
+++ b/program/localization/br/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Fazi stlennvon !';
 $messages['requesttimedout'] = 'Request timed out';
 $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
 $messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'Invalid request! No data was saved.';
 $messages['invalidhost'] = 'Invalid server name.';
 $messages['nomessagesfound'] = 'Kemennadoù ebet er voest lizhiri';
diff --git a/program/localization/bs_BA/labels.inc b/program/localization/bs_BA/labels.inc
index 37b1abe..5afdcad 100644
--- a/program/localization/bs_BA/labels.inc
+++ b/program/localization/bs_BA/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Kopiraj';
 $labels['move']     = 'Premjesti';
 $labels['moveto']   = 'Premjesti u...';
 $labels['download'] = 'Preuzmi';
+$labels['open']     = 'Otvori';
 $labels['showattachment'] = 'Prikaži';
 $labels['showanyway'] = 'Ipak prikaži';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Trenutna stranica';
 $labels['unread'] = 'Nepročitano';
 $labels['flagged'] = 'Važno';
 $labels['unanswered'] = 'Neodgovoreno';
+$labels['withattachment'] = 'Sa prilogom';
 $labels['deleted'] = 'Obrisano';
 $labels['undeleted'] = 'Nije obrisano';
 $labels['invert'] = 'Izokreni';
@@ -204,6 +206,8 @@ $labels['body']  = 'Tijelo';
 
 $labels['openinextwin'] = 'Otvori u novom prozoru';
 $labels['emlsave'] = 'Preuzmi (.eml)';
+$labels['changeformattext'] = 'Prikaži kao obični tekst';
+$labels['changeformathtml'] = 'Prikaži kao HTML';
 
 // message compose
 $labels['editasnew']      = 'Uredi kao novo';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Piši HTML poruke';
 $labels['htmlonreply'] = 'samo kao odgovor na HTML poruke';
 $labels['htmlonreplyandforward'] = 'prilikom prosljeđivanja ili odgovaranja na HTML poruku';
 $labels['htmlsignature'] = 'HTML potpis';
+$labels['showemail'] = 'Prikaži email adresu sa imenom';
 $labels['previewpane'] = 'Prikaži pregled poruke';
 $labels['skin'] = 'Skin interfejsa';
 $labels['logoutclear'] = 'Očisti smeće prilikom odjavljivanja';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Prilikom odgovaranja na poruku, ukloni origin
 $labels['autoaddsignature'] = 'Automatski dodaj potpis';
 $labels['newmessageonly'] = 'samo za nove poruke';
 $labels['replyandforwardonly'] = 'samo za odgovore i prosljeđivanja';
-$labels['replysignaturepos'] = 'Prilikom odgovaranja ili prosljeđivanja potpis ubaci';
-$labels['belowquote'] = 'ispod citata';
-$labels['abovequote'] = 'iznad citata';
 $labels['insertsignature'] = 'Umetni potpis';
 $labels['previewpanemarkread']  = 'Obilježi prikazane poruke kao pročitane';
 $labels['afternseconds']  = 'nakon $n sekundi';
diff --git a/program/localization/bs_BA/messages.inc b/program/localization/bs_BA/messages.inc
index 3949a42..7a1b261 100644
--- a/program/localization/bs_BA/messages.inc
+++ b/program/localization/bs_BA/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Greška u bazi podataka!';
 $messages['requesttimedout'] = 'Zahtjev je istekao';
 $messages['errorreadonly'] = 'Nije moguće izvršiti operaciju. Folder je samo za čitanje.';
 $messages['errornoperm'] = 'Nije moguće izvršiti operaciju. Pristup je odbijen.';
+$messages['erroroverquota'] = 'Nije moguće izvršiti operaciju. Nema slobodnog prostora.';
+$messages['erroroverquotadelete'] = 'Nema slobodnog prostora. Pritisnite SHIFT+DEL da obrišete poruku.';
 $messages['invalidrequest'] = 'Neispravan zahtjev! Podaci nisu sačuvani.';
 $messages['invalidhost'] = 'Neispravno ime servera.';
 $messages['nomessagesfound'] = 'Nema poruka u ovom sandučetu.';
diff --git a/program/localization/ca_ES/labels.inc b/program/localization/ca_ES/labels.inc
index 3d5df27..3be753b 100644
--- a/program/localization/ca_ES/labels.inc
+++ b/program/localization/ca_ES/labels.inc
@@ -41,7 +41,7 @@ $labels['junk']   = 'Correu brossa';
 // message listing
 $labels['subject'] = 'Assumpte';
 $labels['from']    = 'Remitent';
-$labels['sender']  = 'Sender';
+$labels['sender']  = 'Remitent';
 $labels['to']      = 'Destinatari';
 $labels['cc']      = 'Cc';
 $labels['bcc']     = 'Bcc';
@@ -64,7 +64,8 @@ $labels['copy']     = 'Copia';
 $labels['move']     = 'Mou';
 $labels['moveto']   = 'Mou a...';
 $labels['download'] = 'Descarrega';
-$labels['showattachment'] = 'Mostrar';
+$labels['open']     = 'Obre';
+$labels['showattachment'] = 'Mostra';
 $labels['showanyway'] = 'Mostra-ho de totes maneres';
 
 $labels['filename'] = 'Nom del fitxer';
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Pàgina actual';
 $labels['unread'] = 'No llegits';
 $labels['flagged'] = 'Marcat';
 $labels['unanswered'] = 'No respost';
+$labels['withattachment'] = 'Amb fitxer adjunt';
 $labels['deleted'] = 'Suprimit';
 $labels['undeleted'] = 'No s\'ha suprimit';
 $labels['invert'] = 'Inverteix';
@@ -200,10 +202,12 @@ $labels['quicksearch']  = 'Cerca ràpida';
 $labels['resetsearch']  = 'Neteja cerca';
 $labels['searchmod']  = 'Cerca modificadors';
 $labels['msgtext']  = 'Missatge sencer';
-$labels['body']  = 'Body';
+$labels['body']  = 'Cos';
 
 $labels['openinextwin'] = 'Obre a una nova finestra';
 $labels['emlsave'] = 'Descarrega (.eml)';
+$labels['changeformattext'] = 'Mostra en format de text net';
+$labels['changeformathtml'] = 'Mostra en format HTML';
 
 // message compose
 $labels['editasnew']      = 'Edita com a nou';
@@ -243,7 +247,7 @@ $labels['alwaysshow'] = 'Mostra sempre les imatges de $sender';
 $labels['isdraft']    = 'Aquest és un missatge esborrany.';
 $labels['andnmore']   = '$nr més...';
 $labels['togglemoreheaders'] = 'Mostra més capçaleres del missatge';
-$labels['togglefullheaders'] = 'Toggle raw message headers';
+$labels['togglefullheaders'] = 'Conmuta les capçaleres de text cru';
 
 $labels['htmltoggle'] = 'HTML';
 $labels['plaintoggle'] = 'Text net';
@@ -335,8 +339,8 @@ $labels['composeto']      = 'Redacta correu per a';
 $labels['contactsfromto'] = 'Contactes $from a $to de $count';
 $labels['print']          = 'Imprimeix';
 $labels['export']         = 'Exporta';
-$labels['exportall']      = 'Export all';
-$labels['exportsel']      = 'Export selected';
+$labels['exportall']      = 'Exporta\'ls tots';
+$labels['exportsel']      = 'Exporta els seleccionats';
 $labels['exportvcards']   = 'Exporta contactes en format vCard';
 $labels['newcontactgroup'] = 'Crea un nou grup de contactes';
 $labels['grouprename']    = 'Reanomena el grup';
@@ -360,7 +364,7 @@ $labels['importcontacts'] = 'Importa contactes';
 $labels['importfromfile'] = 'Importa des d\'un fitxer:';
 $labels['importtarget'] = 'Afegeix contactes nous a la llibreta d\'adreces:';
 $labels['importreplace'] = 'Reemplaça la llibreta d\'adreçes sencera';
-$labels['importdesc'] = 'You can upload contacts from an existing address book.<br/>We currently support importing addresses from the <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> or CSV (comma-separated) data format.';
+$labels['importdesc'] = 'Podeu carregar contactes des d\'una llibreta de direccions.<br/>Actualment donem suport a la importació d\'adreces des de fitxers de tipus <a href="http://ca.wikipedia.org/wiki/VCard">vCard</a> o CSV (valors separats per comes).';
 $labels['done'] = 'Fet';
 
 // settings
@@ -381,7 +385,7 @@ $labels['preferhtml'] = 'Mostra HTML';
 $labels['defaultcharset'] = 'Joc de caràcters per defecte';
 $labels['htmlmessage'] = 'Missatge HTML';
 $labels['messagepart'] = 'Part';
-$labels['digitalsig'] = 'Digital Signature';
+$labels['digitalsig'] = 'Signatura digital';
 $labels['dateformat'] = 'Format de la data';
 $labels['timeformat'] = 'Format horari';
 $labels['prettydate'] = 'Dates curtes';
@@ -396,8 +400,9 @@ $labels['showinextwin'] = 'Obrir el missatge en una nova finestra';
 $labels['composeextwin'] = 'Redactar en una nova finestra';
 $labels['htmleditor'] = 'Escriu missatges en HTML';
 $labels['htmlonreply'] = 'només en resposta a missatges en HTML';
-$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
+$labels['htmlonreplyandforward'] = 'en reenviament o resposta a missatge HTML';
 $labels['htmlsignature'] = 'Signatura en HTML';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Mostra el panell de previsualització';
 $labels['skin'] = 'Aparença d\'interfície';
 $labels['logoutclear'] = 'Buida la paperera al tancar la sessió';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Quan es contesti, suprimeix la signatura orig
 $labels['autoaddsignature'] = 'Afegeix la signatura automàticament';
 $labels['newmessageonly'] = 'només si és un missatge nou';
 $labels['replyandforwardonly'] = 'només a respostes i reenviaments';
-$labels['replysignaturepos'] = 'Quan es contesti o reenviï, posa-hi la signatura';
-$labels['belowquote'] = 'sota les cometes';
-$labels['abovequote'] = 'sobre les cometes';
 $labels['insertsignature'] = 'Inserta la signatura';
 $labels['previewpanemarkread']  = 'Marca els missatges previsualitzats com a llegits';
 $labels['afternseconds']  = 'després de $n segons';
@@ -470,7 +472,7 @@ $labels['spellcheckignorenums'] = 'Ignora paraules amb números';
 $labels['spellcheckignorecaps'] = 'Ignora paraules amb lletres capitalitzades';
 $labels['addtodict'] = 'Afegeix al diccionari';
 $labels['mailtoprotohandler'] = 'Registra controlador de protocol pels enllaços mailto:';
-$labels['forwardmode'] = 'Messages forwarding';
+$labels['forwardmode'] = 'Reenviament de missatges';
 $labels['inline'] = 'en línia';
 $labels['asattachment'] = 'com adjunt';
 
diff --git a/program/localization/ca_ES/messages.inc b/program/localization/ca_ES/messages.inc
index 5f0e1d6..70c3fbd 100644
--- a/program/localization/ca_ES/messages.inc
+++ b/program/localization/ca_ES/messages.inc
@@ -19,24 +19,26 @@
 $messages = array();
 $messages['errortitle']  = 'Hi ha hagut un error!';
 $messages['loginfailed']  = 'L\'accés ha fallat.';
-$messages['cookiesdisabled'] = 'El vostre navegador no accepta cookies';
-$messages['sessionerror'] = 'La vostra sessió no existeix o ha expirat';
-$messages['storageerror'] = 'Error de conexió amb el servidor IMAP';
+$messages['cookiesdisabled'] = 'El vostre navegador no accepta cookies.';
+$messages['sessionerror'] = 'La vostra sessió no existeix o ha expirat.';
+$messages['storageerror'] = 'Error de connexió amb el servidor IMAP.';
 $messages['servererror'] = 'Error del Servidor!';
 $messages['servererrormsg'] = 'Error del Servidor: $msg';
 $messages['dberror'] = 'Error a la Base de Dades!';
 $messages['requesttimedout'] = 'S\'ha esgotat el temps de la sol·licitud';
 $messages['errorreadonly'] = 'Impossible de realitzar l\'operació. La carpeta és de només lectura.';
 $messages['errornoperm'] = 'Impossible de realitzar l\'operació. Permís denegat.';
-$messages['invalidrequest'] = 'Petició no vàlida! No s\'ha desat les dades.';
+$messages['erroroverquota'] = 'No s\'ha pogut completar l\'operació. No hi ha prou espai lliure al disc dur.';
+$messages['erroroverquotadelete'] = 'No hi ha prou espai lliure. Feu servir MAJÚS+SUPR per suprimir el missatge.';
+$messages['invalidrequest'] = 'Petició no vàlida! No s\'han desat les dades.';
 $messages['invalidhost'] = 'Nom de servidor no vàlid.';
 $messages['nomessagesfound'] = 'No s\'han trobat missatges en aquesta bústia.';
-$messages['loggedout'] = 'Heu tancat la sessió. A reveure!';
+$messages['loggedout'] = 'Heu tancat la sessió correctament. A reveure!';
 $messages['mailboxempty'] = 'La bústia és buida.';
-$messages['refreshing'] = 'Refrescant...';
+$messages['refreshing'] = 'S\'està refrescant...';
 $messages['loading'] = 'S\'està carregant…';
 $messages['uploading'] = 'S\'està pujant el fitxer...';
-$messages['uploadingmany'] = 'S\'està pujant els fitxers...';
+$messages['uploadingmany'] = 'S\'estan pujant els fitxers...';
 $messages['loadingdata'] = 'S\'estan carregant les dades...';
 $messages['checkingmail'] = 'S’està comprovant si hi ha missatges nous…';
 $messages['sendingmessage'] = 'S’està enviant el missatge…';
@@ -52,26 +54,26 @@ $messages['encryptedmessage'] = 'Aquest és un missatge xifrat i no pot ser most
 $messages['nocontactsfound'] = 'No s\'ha trobat cap contacte.';
 $messages['contactnotfound'] = 'No s\'ha trobat el contacte sol·licitat.';
 $messages['contactsearchonly'] = 'Introduïu termes de cerca per trobar contactes';
-$messages['sendingfailed'] = 'Error enviant missatge.';
+$messages['sendingfailed'] = 'Error enviant el missatge.';
 $messages['senttooquickly'] = 'Si us plau, espereu $sec segon(s) abans d\'enviar aquest missatge.';
 $messages['errorsavingsent'] = 'Hi ha hagut un error mentre es desava el missatge enviat.';
-$messages['errorsaving'] = 'Hi ha hagut un error mentre es desava.';
+$messages['errorsaving'] = 'Hi ha hagut un error mentre s\'estava desant.';
 $messages['errormoving'] = 'No s\'ha pogut moure el(s) missatge(s).';
 $messages['errorcopying'] = 'No s\'ha pogut copiar el(s) missatge(s).';
-$messages['errordeleting'] = 'No s\'ha pogut suprimir el missatge.';
+$messages['errordeleting'] = 'No s\'ha pogut suprimir el(s) missatge(s).';
 $messages['errormarking'] = 'No s\'ha pogut marcar el(s) missatge(s).';
-$messages['deletecontactconfirm']  = 'Esteu segurs de voler suprimir el(s) contacte(s) selecionat(s)?';
-$messages['deletegroupconfirm']  = 'Esteu segurs de voler suprimirr el grup seleccionat?';
-$messages['deletemessagesconfirm'] = 'Esteu segurs de voler suprimir el(s) missatge(s) selecionat(s)?';
+$messages['deletecontactconfirm']  = 'Esteu segurs de voler suprimir el(s) contacte(s) seleccionat(s)?';
+$messages['deletegroupconfirm']  = 'Esteu segurs de voler suprimir el grup seleccionat?';
+$messages['deletemessagesconfirm'] = 'Esteu segurs de voler suprimir el(s) missatge(s) seleccionat(s)?';
 $messages['deletefolderconfirm']  = 'Esteu segurs de voler suprimir aquesta carpeta?';
 $messages['purgefolderconfirm']  = 'Esteu segurs de voler suprimir tots els missatges d\'aquesta carpeta?';
 $messages['contactdeleting'] = 'S\'està suprimint els contacte(s)...';
 $messages['groupdeleting'] = 'S\'està suprimint el grup...';
 $messages['folderdeleting'] = 'S\'està suprimint la carpeta...';
 $messages['foldermoving'] = 'S\'està movent la carpeta...';
-$messages['foldersubscribing'] = 'S\'està subscribint la carpeta...';
-$messages['folderunsubscribing'] = 'S\'està cancelant la subscripció de la carpeta...';
-$messages['formincomplete'] = 'El formulari no ha estat emplenat totalment.';
+$messages['foldersubscribing'] = 'S\'està subscrivint la carpeta...';
+$messages['folderunsubscribing'] = 'S\'està cancel·lant la subscripció de la carpeta...';
+$messages['formincomplete'] = 'El formulari no ha estat emplenat completament.';
 $messages['noemailwarning'] = 'Si us plau, introduïu una adreça de correu electrònic vàlida.';
 $messages['nonamewarning']  = 'Si us plau, introduïu un nom.';
 $messages['nopagesizewarning'] = 'Si us plau, introduïu una mida de pàgina.';
@@ -91,11 +93,11 @@ $messages['checking'] = 'S\'està comprovant...';
 $messages['nospellerrors'] = 'No s\'han trobat errors d\'ortografia.';
 $messages['folderdeleted'] = 'Carpeta suprimida correctament.';
 $messages['foldersubscribed'] = 'Carpeta subscrita correctament.';
-$messages['folderunsubscribed'] = 'Carpeta desubscrita correctament.';
+$messages['folderunsubscribed'] = 'Carpeta de-subscrita correctament.';
 $messages['folderpurged'] = 'La carpeta ha estat buidada correctament.';
 $messages['folderexpunged'] = 'La carpeta ha estat compactada correctament.';
 $messages['deletedsuccessfully'] = 'Suprimit correctament.';
-$messages['converting'] = 'S\'està traient format del missatge...';
+$messages['converting'] = 'S\'està traient el format del missatge...';
 $messages['messageopenerror'] = 'No s\'ha pogut carregar el missatge del servidor.';
 $messages['fileuploaderror'] = 'La pujada del fitxer ha fallat.';
 $messages['filesizeerror'] = 'El fitxer pujat excedeix la mida màxima de $size.';
@@ -103,13 +105,13 @@ $messages['copysuccess'] = 'S\'han copiat $nr adreces correctament.';
 $messages['copyerror'] = 'No s\'ha pogut copiar cap adreça.';
 $messages['sourceisreadonly'] = 'Aquesta adreça és només de lectura.';
 $messages['errorsavingcontact'] = 'No s\'ha pogut desar l\'adreça de contacte.';
-$messages['movingmessage'] = 'S\'està movent el missatge...';
-$messages['copyingmessage'] = 'S\'està copiant missatge...';
-$messages['copyingcontact'] = 'S\'està copiant els contacte(s)...';
-$messages['deletingmessage'] = 'S\'està suprimint els missatge(s)...';
-$messages['markingmessage'] = 'S\'està marcant els missatge(s)...';
-$messages['addingmember'] = 'S\'està afegint els contacte(s) al grup...';
-$messages['removingmember'] = 'S\'està suprimint els contacte(s) del grup...';
+$messages['movingmessage'] = 'S\'està movent missatge(s)...';
+$messages['copyingmessage'] = 'S\'està copiant missatge(s)...';
+$messages['copyingcontact'] = 'S\'està copiant contacte(s)...';
+$messages['deletingmessage'] = 'S\'està suprimint missatge(s)...';
+$messages['markingmessage'] = 'S\'està marcant missatge(s)...';
+$messages['addingmember'] = 'S\'està afegint contacte(s) al grup...';
+$messages['removingmember'] = 'S\'està suprimint contacte(s) del grup...';
 $messages['receiptsent'] = 'Confirmació de lectura enviada correctament.';
 $messages['errorsendingreceipt'] = 'No es pot enviar la confirmació.';
 $messages['deleteidentityconfirm'] = 'Esteu segurs de voler suprimir aquesta identitat?';
@@ -132,16 +134,16 @@ $messages['smtpconnerror'] = 'Error SMTP ($code): La connexió al servidor ha fa
 $messages['smtpautherror'] = 'Error SMTP ($code): La identificació ha fallat.';
 $messages['smtpfromerror'] = 'Error SMTP ($code): No s\'ha pogut posar "$from" com a remitent ($msg).';
 $messages['smtptoerror'] = 'Error SMTP ($code): No s\'ha pogut posar "$to" com a destinatari ($msg).';
-$messages['smtprecipientserror'] = 'Error SMTP: No s\'ha pogut analitzar la lista de destinataris.';
+$messages['smtprecipientserror'] = 'Error SMTP: No s\'ha pogut analitzar la llista de destinataris.';
 $messages['smtperror'] = 'Error SMTP: $msg';
 $messages['emailformaterror'] = 'Adreça de correu no vàlida: $email';
 $messages['toomanyrecipients'] = 'Massa destinataris. Reduïu el nombre de destinataris a $max.';
 $messages['maxgroupmembersreached'] = 'El nombre de membres del grup excedeix el màxim de $max.';
 $messages['internalerror'] = 'Hi ha hagut un error intern. Si us plau torneu-ho a provar.';
-$messages['contactdelerror'] = 'No s\'ha pogut suprimir el(s) contacte(s).';
-$messages['contactdeleted'] = 'Contacte(s) suprimits(s) correctament.';
-$messages['contactrestoreerror'] = 'No s\'ha pogut restaurar el(s) contacte(s) suprimits(s).';
-$messages['contactrestored'] = 'Contacte(s) restaurats correctament.';
+$messages['contactdelerror'] = 'No s\'han pogut suprimir el(s) contacte(s).';
+$messages['contactdeleted'] = 'Contacte(s) suprimit(s) correctament.';
+$messages['contactrestoreerror'] = 'No s\'ha pogut restaurar el(s) contacte(s) suprimit(s).';
+$messages['contactrestored'] = 'Contacte(s) restaurat(s) correctament.';
 $messages['groupdeleted'] = 'Grup suprimit correctament.';
 $messages['grouprenamed'] = 'Grup reanomenat correctament.';
 $messages['groupcreated'] = 'Grup creat correctament.';
@@ -149,7 +151,7 @@ $messages['savedsearchdeleted'] = 'S\'ha suprimit correctament la cerca desada.'
 $messages['savedsearchdeleteerror'] = 'No s\'ha pogut suprimit la cerca desada.';
 $messages['savedsearchcreated'] = 'S\'ha creat correctament la cerca desada.';
 $messages['savedsearchcreateerror'] = 'No s\'ha pogut crear la cerca desada.';
-$messages['messagedeleted'] = 'Missatge(s) suprimits(s) correctament.';
+$messages['messagedeleted'] = 'Missatge(s) suprimit(s) correctament.';
 $messages['messagemoved'] = 'Missatge(s) mogut(s) correctament.';
 $messages['messagecopied'] = 'Missatge(s) copiat(s) correctament.';
 $messages['messagemarked'] = 'Missatge(s) marcat(s) correctament.';
@@ -160,10 +162,10 @@ $messages['nametoolong'] = 'El nom és massa llarg.';
 $messages['folderupdated'] = 'La carpeta ha estat actualitzada correctament.';
 $messages['foldercreated'] = 'La carpeta ha estat creada correctament.';
 $messages['invalidimageformat'] = 'No és un format d\'imatge vàlid.';
-$messages['mispellingsfound'] = 'S\'han detectat errors d\'ortografia al misstage.';
+$messages['mispellingsfound'] = 'S\'han detectat errors d\'ortografia al missatge.';
 $messages['parentnotwritable'] = 'No s\'ha pogut crear/moure la carpeta dins de la carpeta ascendent seleccionada. No hi ha permisos d\'escriptura.';
 $messages['messagetoobig'] = 'La part del missatge és massa gran per processar-la.';
-$messages['attachmentvalidationerror'] = 'ATENCIÓ! Aquest adjunt és sospitós perquè el seu tipus no coincideix amb el tipus declarat al missatge. Si no confies en l\'emissor, no l\'hauries d\'obrir al navegador perquè pot contenir elements maliciosos. <br/><br/><em>Expected: $expected; found: $detected</em>';
-$messages['noscriptwarning'] = 'Atenció: Aquest client de correu necessita Javascript! Per a poder fer-lo servir, has d\'activar Javascript a les opcions del navegador.';
+$messages['attachmentvalidationerror'] = 'ATENCIÓ! Aquest adjunt és sospitós perquè el seu tipus no coincideix amb el tipus declarat al missatge. Si no confieu en l\'emissor, no l\'hauríeu d\'obrir al navegador perquè pot contenir elements maliciosos. <br/><br/><em>S\'esperava: $expected; s\'ha trobat: $detected</em>';
+$messages['noscriptwarning'] = 'Atenció: Aquest client de correu necessita Javascript! Per a poder fer-lo servir, heu d\'activar Javascript a les opcions del navegador.';
 
 ?>
diff --git a/program/localization/cs_CZ/labels.inc b/program/localization/cs_CZ/labels.inc
index 9f8dc18..8fb7ffa 100644
--- a/program/localization/cs_CZ/labels.inc
+++ b/program/localization/cs_CZ/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Kopírovat';
 $labels['move']     = 'Přesunout';
 $labels['moveto']   = 'přesunout do...';
 $labels['download'] = 'stáhnout';
+$labels['open']     = 'Otevřít';
 $labels['showattachment'] = 'Zobrazit';
 $labels['showanyway'] = 'Přesto zobrazit';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Aktuální stránka';
 $labels['unread'] = 'Nepřečtené';
 $labels['flagged'] = 'Označené';
 $labels['unanswered'] = 'Neoznačené';
+$labels['withattachment'] = 'S přílohou';
 $labels['deleted'] = 'Smazané';
 $labels['undeleted'] = 'Nesmazáno';
 $labels['invert'] = 'Převrátit';
@@ -204,6 +206,8 @@ $labels['body']  = 'Tělo';
 
 $labels['openinextwin'] = 'Otevřít v novém okně';
 $labels['emlsave'] = 'Stáhnout (.eml)';
+$labels['changeformattext'] = 'Zobrazit v textovém formátu';
+$labels['changeformathtml'] = 'Zobrazit v HTML formátu';
 
 // message compose
 $labels['editasnew']      = 'Upravit jako novou';
@@ -335,8 +339,8 @@ $labels['composeto']      = 'Poslat e-mail';
 $labels['contactsfromto'] = 'Kontakty $from až $to z celkem $count';
 $labels['print']          = 'Tisk';
 $labels['export']         = 'Export';
-$labels['exportall']      = 'Export all';
-$labels['exportsel']      = 'Export selected';
+$labels['exportall']      = 'Export všech';
+$labels['exportsel']      = 'Export vybraných';
 $labels['exportvcards']   = 'Exportovat kontakty ve formátu vCard';
 $labels['newcontactgroup'] = 'Vytvořit novou skupinu kontaktů';
 $labels['grouprename']    = 'Přejmenovat skupinu';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Vytvářet HTML zprávy';
 $labels['htmlonreply'] = 'jen při odpovědi na HTML zprávy';
 $labels['htmlonreplyandforward'] = 'při přeposlání nebo odpovědi na HTML zprávu';
 $labels['htmlsignature'] = 'HTML podpis';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Zobrazit panel náhledu';
 $labels['skin'] = 'Vzhled';
 $labels['logoutclear'] = 'Vyprázdnit koš při odhlášení';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Při odpovídání odstranit ze zprávy půvo
 $labels['autoaddsignature'] = 'Automaticky přidat podpis';
 $labels['newmessageonly'] = 'pouze k novým zprávám';
 $labels['replyandforwardonly'] = 'jen k odpovědi a přeposílané zprávě';
-$labels['replysignaturepos'] = 'Při odpovídání nebo přeposílání zprávy vložit podpis';
-$labels['belowquote'] = 'pod citaci';
-$labels['abovequote'] = 'nad citaci';
 $labels['insertsignature'] = 'Vložit podpis';
 $labels['previewpanemarkread']  = 'Označit zobrazené zprávy jako přečtené';
 $labels['afternseconds']  = 'po $n sekundách';
diff --git a/program/localization/cs_CZ/messages.inc b/program/localization/cs_CZ/messages.inc
index cee1bd0..9800b24 100644
--- a/program/localization/cs_CZ/messages.inc
+++ b/program/localization/cs_CZ/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Chyba v databázi!';
 $messages['requesttimedout'] = 'Došlo k vypršení požadavku';
 $messages['errorreadonly'] = 'Příkaz nelze provést, složka je určena jen ke čtení.';
 $messages['errornoperm'] = 'Příkaz nelze provést, nemáte oprávnění.';
+$messages['erroroverquota'] = 'Příkaz nelze provést, není volné místo na disku.';
+$messages['erroroverquotadelete'] = 'Není volné místo na disku. Použijte SHIFT+DEL k odstranění zprávy.';
 $messages['invalidrequest'] = 'Nesprávný požadavek. Data nebyla uložena.';
 $messages['invalidhost'] = 'Špatné jméno serveru.';
 $messages['nomessagesfound'] = 'Ve schránce nebyla nalezena žádná zpráva';
diff --git a/program/localization/cy_GB/labels.inc b/program/localization/cy_GB/labels.inc
index c6cf234..3e4f136 100644
--- a/program/localization/cy_GB/labels.inc
+++ b/program/localization/cy_GB/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Copio';
 $labels['move']     = 'Symud';
 $labels['moveto']   = 'Symud i...';
 $labels['download'] = 'Llwytho lawr';
+$labels['open']     = 'Agor';
 $labels['showattachment'] = 'Dangos';
 $labels['showanyway'] = 'Dangos beth bynnag';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Tudalen gyfredol';
 $labels['unread'] = 'Heb eu darllen';
 $labels['flagged'] = 'Nodwyd';
 $labels['unanswered'] = 'Heb ei ateb';
+$labels['withattachment'] = 'Gyda atodiad';
 $labels['deleted'] = 'Dilewyd';
 $labels['undeleted'] = 'Heb ei ddileu';
 $labels['invert'] = 'Gwrth-droi';
@@ -204,6 +206,8 @@ $labels['body']  = 'Corff';
 
 $labels['openinextwin'] = 'Agor mewn ffenest newydd';
 $labels['emlsave'] = 'Llwytho lawr (.eml)';
+$labels['changeformattext'] = 'Dangos mewn fformat testun plaen';
+$labels['changeformathtml'] = 'Dangos mewn fformat HTML';
 
 // message compose
 $labels['editasnew']      = 'Golygu fel neges newydd';
@@ -335,8 +339,8 @@ $labels['composeto']      = 'Ysgrifennu neges at';
 $labels['contactsfromto'] = 'Cysylltiadau $from i $to o $count';
 $labels['print']          = 'Argraffu';
 $labels['export']         = 'Allforio';
-$labels['exportall']      = 'Export all';
-$labels['exportsel']      = 'Export selected';
+$labels['exportall']      = 'Allforio popeth';
+$labels['exportsel']      = 'Allforio dewiswyd';
 $labels['exportvcards']   = 'Allforio cysylltiadau mewn fformat vCard';
 $labels['newcontactgroup'] = 'Creu grŵp cysylltiadau newydd';
 $labels['grouprename']    = 'Ail-enwi grŵp';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Ysgrifennu negeseuon HTML';
 $labels['htmlonreply'] = 'wrth ateb i neges HTML yn unig';
 $labels['htmlonreplyandforward'] = 'wrth ddanfon ymlaen neu ymateb i neges HTML';
 $labels['htmlsignature'] = 'Llofnod HTML';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Dangos ffenest rhagolwg';
 $labels['skin'] = 'Croen rhyngwyneb';
 $labels['logoutclear'] = 'Clirio\'r Sbwriel wrth allgofnodi';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Wrth ateb, dileu\'r llofnod gwreiddiol o\'r n
 $labels['autoaddsignature'] = 'Ychwanegu llofnod yn awtomatig';
 $labels['newmessageonly'] = 'negeseuon newydd yn unig';
 $labels['replyandforwardonly'] = 'atebion a danfon ymlaen yn unig';
-$labels['replysignaturepos'] = 'Wrth ateb neu ddanfon ymlaen, rhoi\'r llofnod';
-$labels['belowquote'] = 'o dan y dyfynniad';
-$labels['abovequote'] = 'uwchben y dyfynniad';
 $labels['insertsignature'] = 'Mewnosod llofnod';
 $labels['previewpanemarkread']  = 'Nodi negeseuon rhagolwg fel darllenwyd';
 $labels['afternseconds']  = 'ar ôl $n eiliad';
diff --git a/program/localization/cy_GB/messages.inc b/program/localization/cy_GB/messages.inc
index 5534229..edadc3b 100644
--- a/program/localization/cy_GB/messages.inc
+++ b/program/localization/cy_GB/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Gwall Cronfa Ddata!';
 $messages['requesttimedout'] = 'Cais wedi dod i derfyn amser';
 $messages['errorreadonly'] = 'Methwyd gweithredu. Mae\'r ffolder yn darllen-yn-unig';
 $messages['errornoperm'] = 'Methwyd gweithredu. Gwrthodwyd caniatad';
+$messages['erroroverquota'] = 'Methwyd gweithredu. Nid oes gofod gwag ar y disg.';
+$messages['erroroverquotadelete'] = 'Dim gofod gwag ar y disg. Defnyddiwch SHIFT+DEL i ddileu neges.';
 $messages['invalidrequest'] = 'Cais annilys! Ni chadwyd unrhyw wybodaeth.';
 $messages['invalidhost'] = 'Enw gweinydd annilys.';
 $messages['nomessagesfound'] = 'Dim negeseuon wedi eu canfod yn y blwch hwn';
diff --git a/program/localization/da_DK/labels.inc b/program/localization/da_DK/labels.inc
index 93209b8..02d7dd9 100644
--- a/program/localization/da_DK/labels.inc
+++ b/program/localization/da_DK/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Kopiér';
 $labels['move']     = 'Flyt';
 $labels['moveto']   = 'Flyt til...';
 $labels['download'] = 'Download';
+$labels['open']     = 'Ã…ben';
 $labels['showattachment'] = 'Vis';
 $labels['showanyway'] = 'Vis alligevel';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Aktuel side';
 $labels['unread'] = 'Ulæste';
 $labels['flagged'] = 'Markeret';
 $labels['unanswered'] = 'Ubesvaret';
+$labels['withattachment'] = 'Med vedhæftning';
 $labels['deleted'] = 'Slettede';
 $labels['undeleted'] = 'Ikke slettet';
 $labels['invert'] = 'Invertér';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'Ã…bn i nyt vindue';
 $labels['emlsave'] = 'Download (.eml)';
+$labels['changeformattext'] = 'Vis i ren tekst format';
+$labels['changeformathtml'] = 'Vis i HTML format';
 
 // message compose
 $labels['editasnew']      = 'Redigér som ny';
@@ -243,7 +247,7 @@ $labels['alwaysshow'] = 'Vis altid billeder fra $sender';
 $labels['isdraft']    = 'Dette er en kladde.';
 $labels['andnmore']   = '$nr yderligere...';
 $labels['togglemoreheaders'] = 'Vis yderligere headers';
-$labels['togglefullheaders'] = 'Toggle raw message headers';
+$labels['togglefullheaders'] = 'Ændre rå brevhoveder';
 
 $labels['htmltoggle'] = 'HTML';
 $labels['plaintoggle'] = 'Almindelig tekst';
@@ -335,8 +339,8 @@ $labels['composeto']      = 'Skriv besked til';
 $labels['contactsfromto'] = 'Kontakter $from til $to af $count';
 $labels['print']          = 'Udskriv';
 $labels['export']         = 'Eksportér';
-$labels['exportall']      = 'Export all';
-$labels['exportsel']      = 'Export selected';
+$labels['exportall']      = 'Eksporter alt';
+$labels['exportsel']      = 'Eksporter udvalgte';
 $labels['exportvcards']   = 'Eksportér kontakter i vCard format';
 $labels['newcontactgroup'] = 'Opret ny kontaktgruppe';
 $labels['grouprename']    = 'Omdøb gruppe';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Skriv HTML-besked';
 $labels['htmlonreply'] = 'kun når jeg besvarer HTML-beskeder';
 $labels['htmlonreplyandforward'] = 'ved videresendelse eller besvarelse af HTML beskeder';
 $labels['htmlsignature'] = 'HTML-signatur';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Forhåndsvisning';
 $labels['skin'] = 'Brugerflade';
 $labels['logoutclear'] = 'Tøm Papirkurv når jeg logger af';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Fjern original signatur fra besked, når der
 $labels['autoaddsignature'] = 'Indsæt automatisk signatur';
 $labels['newmessageonly'] = 'kun på nye beskeder';
 $labels['replyandforwardonly'] = 'kun på svar og videresendelse af beskeder';
-$labels['replysignaturepos'] = 'Når beskeder besvares eller videresendes; indsæt signatur';
-$labels['belowquote'] = 'under det citerede';
-$labels['abovequote'] = 'over det citerede';
 $labels['insertsignature'] = 'Indsæt signatur';
 $labels['previewpanemarkread']  = 'Markér forhåndsviste beskeder som læst';
 $labels['afternseconds']  = 'efter $n sekunder';
diff --git a/program/localization/da_DK/messages.inc b/program/localization/da_DK/messages.inc
index 6b8ce19..9a0b8e4 100644
--- a/program/localization/da_DK/messages.inc
+++ b/program/localization/da_DK/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database fejl!';
 $messages['requesttimedout'] = 'Forespørgselstiden udløb';
 $messages['errorreadonly'] = 'Kunne ikke udføre den ønskede handling. Mappen er skrivebeskyttet.';
 $messages['errornoperm'] = 'Kunne ikke udføre den ønskede handling. Adgang nægtet.';
+$messages['erroroverquota'] = 'Kan ikke udføre handlingen. Der er ikke nok ledig diskplads.';
+$messages['erroroverquotadelete'] = 'Der er ikke nok ledig diskplads. Brug SHIFT+DEL til at slette en meddelelse.';
 $messages['invalidrequest'] = 'Ugyldig forespørgsel! Ingen data blev gemt.';
 $messages['invalidhost'] = 'Ugyldigt servernavn.';
 $messages['nomessagesfound'] = 'Der blev ikke fundet nogen beskeder i denne postkasse.';
@@ -163,7 +165,7 @@ $messages['invalidimageformat'] = 'Ikke et gyldigt billedformat.';
 $messages['mispellingsfound'] = 'Der er fundet stavefejl i beskeden.';
 $messages['parentnotwritable'] = 'Kan ikke oprette/flytte mappe ind i valgt mappe. Ingen adgangsrettigheder.';
 $messages['messagetoobig'] = 'Denne del af beskeden er for stor til at blive behandlet.';
-$messages['attachmentvalidationerror'] = 'WARNING! This attachment is suspicious because its type doesn\'t match the type declared in the message. If you do not trust the sender, you shouldn\'t open it in the browser because it may contain malicious contents.<br/><br/><em>Expected: $expected; found: $detected</em>';
+$messages['attachmentvalidationerror'] = 'ADVARSEL! Den vedhæftede fil er mistænkelig - Typen stemmer ikke overens med den oplyste type. Hvis du ikke har tillid til afsender, skal du ikke åbne filen da den kan indholde onsindet indhold. <br/><br/><em>Forventet: $expected; Fundet: $detected</em>';
 $messages['noscriptwarning'] = 'Advarsel: Denne webmailclient kræver Javascript! For at kunne bruge den slå venligst Javascripts til i din browserindstillinger.';
 
 ?>
diff --git a/program/localization/de_CH/labels.inc b/program/localization/de_CH/labels.inc
index 31444b6..e64859d 100644
--- a/program/localization/de_CH/labels.inc
+++ b/program/localization/de_CH/labels.inc
@@ -40,9 +40,9 @@ $labels['junk']   = 'Spam';
 
 // message listing
 $labels['subject'] = 'Betreff';
-$labels['from']    = 'Absender';
+$labels['from']    = 'Von';
 $labels['sender']  = 'Absender';
-$labels['to']      = 'Empfänger';
+$labels['to']      = 'An';
 $labels['cc']      = 'Kopie (CC)';
 $labels['bcc']     = 'Blind-Kopie';
 $labels['replyto'] = 'Antwort an';
@@ -64,6 +64,7 @@ $labels['copy']     = 'Kopieren';
 $labels['move']     = 'Verschieben';
 $labels['moveto']   = 'Verschieben nach...';
 $labels['download'] = 'Download';
+$labels['open']     = 'Öffnen';
 $labels['showattachment'] = 'Anzeigen';
 $labels['showanyway'] = 'Trotzdem anzeigen';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Aktuelle Seite';
 $labels['unread'] = 'Ungelesene';
 $labels['flagged'] = 'Markierte';
 $labels['unanswered'] = 'Unbeantwortete';
+$labels['withattachment'] = 'Mit Anhang';
 $labels['deleted'] = 'Gelöschte';
 $labels['undeleted'] = 'Nicht gelöscht';
 $labels['invert'] = 'Umkehren';
@@ -175,7 +177,7 @@ $labels['threaded'] = 'Gruppiert';
 $labels['autoexpand_threads'] = 'Konversationen aufklappen';
 $labels['do_expand'] = 'alle';
 $labels['expand_only_unread'] = 'nur ungelesene';
-$labels['fromto'] = 'Sender/Empfänger';
+$labels['fromto'] = 'Von/An';
 $labels['flag'] = 'Markierung';
 $labels['attachment'] = 'Anhang';
 $labels['nonesort'] = 'Keine';
@@ -204,6 +206,8 @@ $labels['body']  = 'Inhalt';
 
 $labels['openinextwin'] = 'In neuem Fenster öffnen';
 $labels['emlsave'] = 'Herunterladen (.eml)';
+$labels['changeformattext'] = 'Als reiner Text anzeigen';
+$labels['changeformathtml'] = 'Als original HTML anzeigen';
 
 // message compose
 $labels['editasnew']      = 'Als neue Nachricht öffnen';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'HTML-Nachrichten verfassen';
 $labels['htmlonreply'] = 'nur Antworten auf HTML-Nachrichten';
 $labels['htmlonreplyandforward'] = 'Antworten oder Weiterleiten einer HTML-Nachricht';
 $labels['htmlsignature'] = 'HTML-Signatur';
+$labels['showemail'] = 'E-Mail-Adresse und Namen anzeigen';
 $labels['previewpane'] = 'Nachrichtenvorschau anzeigen';
 $labels['skin'] = 'Oberflächendesign';
 $labels['logoutclear'] = 'Papierkorb beim Abmelden leeren';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Beim Antworten die Signatur der Originalnachr
 $labels['autoaddsignature'] = 'Signatur automatisch einfügen';
 $labels['newmessageonly'] = 'nur bei neuen Nachrichten';
 $labels['replyandforwardonly'] = 'nur bei Antworten und Weiterleitungen';
-$labels['replysignaturepos'] = 'Beim Antworten oder Weiterleiten die Signatur';
-$labels['belowquote'] = 'unter der Originalnachricht einfügen';
-$labels['abovequote'] = 'über der Originalnachricht einfügen';
 $labels['insertsignature'] = 'Signatur einfügen';
 $labels['previewpanemarkread']  = 'Nachricht in Vorschau als gelesen markieren';
 $labels['afternseconds']  = 'nach $n Sekunden';
diff --git a/program/localization/de_CH/messages.inc b/program/localization/de_CH/messages.inc
index 027e2ee..f3697a8 100644
--- a/program/localization/de_CH/messages.inc
+++ b/program/localization/de_CH/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Datenbankfehler!';
 $messages['requesttimedout'] = 'Zeitlimit überschritten';
 $messages['errorreadonly'] = 'Die Aktion kann nicht ausgeführt werden. Der Ordner ist schreibgeschützt.';
 $messages['errornoperm'] = 'Die Aktion kann nicht ausgeführt werden. Zugriff verweigert.';
+$messages['erroroverquota'] = 'Die Aktion kann nicht ausgeführt werden. Keine freier Speicherplatz.';
+$messages['erroroverquotadelete'] = 'Kein freier Speicherplatz. Drücken Sie SHIFT+DEL um die Nachricht zu löschen.';
 $messages['invalidrequest'] = 'Ungültige Anfrage! Es wurden keine Daten gespeichert.';
 $messages['invalidhost'] = 'Ungültiger Servername';
 $messages['nomessagesfound'] = 'Keine Nachrichten in diesem Ordner';
diff --git a/program/localization/de_DE/labels.inc b/program/localization/de_DE/labels.inc
index 6ce679c..d497a6b 100644
--- a/program/localization/de_DE/labels.inc
+++ b/program/localization/de_DE/labels.inc
@@ -40,9 +40,9 @@ $labels['junk']   = 'Spam';
 
 // message listing
 $labels['subject'] = 'Betreff';
-$labels['from']    = 'Absender';
+$labels['from']    = 'Von';
 $labels['sender']  = 'Absender';
-$labels['to']      = 'Empfänger';
+$labels['to']      = 'An';
 $labels['cc']      = 'Kopie';
 $labels['bcc']     = 'Blindkopie';
 $labels['replyto'] = 'Antwort an';
@@ -64,6 +64,7 @@ $labels['copy']     = 'Kopieren';
 $labels['move']     = 'Verschieben';
 $labels['moveto']   = 'Verschieben nach...';
 $labels['download'] = 'Herunterladen';
+$labels['open']     = 'Offen';
 $labels['showattachment'] = 'Anzeigen';
 $labels['showanyway'] = 'Trotzdem anzeigen';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Aktuelle Seite';
 $labels['unread'] = 'Ungelesene';
 $labels['flagged'] = 'Markierte';
 $labels['unanswered'] = 'Unbeantwortete';
+$labels['withattachment'] = 'Mit Anhang';
 $labels['deleted'] = 'Gelöschte';
 $labels['undeleted'] = 'Nicht gelöscht';
 $labels['invert'] = 'Invertieren';
@@ -175,7 +177,7 @@ $labels['threaded'] = 'Gruppiert';
 $labels['autoexpand_threads'] = 'Konversationen aufklappen';
 $labels['do_expand'] = 'alle';
 $labels['expand_only_unread'] = 'nur ungelesene';
-$labels['fromto'] = 'Sender/Empfänger';
+$labels['fromto'] = 'Von/An';
 $labels['flag'] = 'Markierung';
 $labels['attachment'] = 'Anhang';
 $labels['nonesort'] = 'Keine';
@@ -204,6 +206,8 @@ $labels['body']  = 'Inhalt';
 
 $labels['openinextwin'] = 'In neuem Fenster öffnen';
 $labels['emlsave'] = 'Lokal speichern (.eml)';
+$labels['changeformattext'] = 'Als reiner Text anzeigen';
+$labels['changeformathtml'] = 'Als original HTML anzeigen';
 
 // message compose
 $labels['editasnew']      = 'Als neue Nachricht öffnen';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'HTML-Nachrichten verfassen';
 $labels['htmlonreply'] = 'nur Antworten auf HTML-Nachrichten';
 $labels['htmlonreplyandforward'] = 'beim Weiterleiten und  Beantworten auf HTML-Nachrichten';
 $labels['htmlsignature'] = 'HTML-Signatur';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Nachrichtenvorschau anzeigen';
 $labels['skin'] = 'Oberflächendesign';
 $labels['logoutclear'] = 'Papierkorb beim Abmelden leeren';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Beim Antworten Signatur der Originalnachricht
 $labels['autoaddsignature'] = 'Signatur automatisch einfügen';
 $labels['newmessageonly'] = 'nur bei neuen Nachrichten';
 $labels['replyandforwardonly'] = 'nur bei Antworten und Weiterleitungen';
-$labels['replysignaturepos'] = 'Beim Antworten die Signatur';
-$labels['belowquote'] = 'unter der Originalnachricht einfügen';
-$labels['abovequote'] = 'über der Originalnachricht einfügen';
 $labels['insertsignature'] = 'Signatur einfügen';
 $labels['previewpanemarkread']  = 'Nachricht in Vorschau als gelesen markieren';
 $labels['afternseconds']  = 'nach $n Sekunden';
diff --git a/program/localization/de_DE/messages.inc b/program/localization/de_DE/messages.inc
index eeaba7d..ba0936d 100644
--- a/program/localization/de_DE/messages.inc
+++ b/program/localization/de_DE/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Datenbankfehler!';
 $messages['requesttimedout'] = 'Zeitüberschreitung der Anforderung';
 $messages['errorreadonly'] = 'Die Aktion kann nicht ausgeführt werden. Der Ordner ist schreibgeschützt.';
 $messages['errornoperm'] = 'Die Aktion kann nicht ausgeführt werden. Zugriff verweigert.';
+$messages['erroroverquota'] = 'Die Aktion kann nicht ausgeführt werden. Nicht genug freier Speicherplatz.';
+$messages['erroroverquotadelete'] = 'Nicht genug freier Speicherplatz. Verwenden sie SHIFT+ENTF um Nachrichten zu löschen.';
 $messages['invalidrequest'] = 'Ungültige Anfrage! Es wurden keine Daten gespeichert.';
 $messages['invalidhost'] = 'Ungültiger Server Name';
 $messages['nomessagesfound'] = 'Keine Nachrichten in diesem Ordner.';
diff --git a/program/localization/el_GR/labels.inc b/program/localization/el_GR/labels.inc
index 2081647..9f5d818 100644
--- a/program/localization/el_GR/labels.inc
+++ b/program/localization/el_GR/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Αντιγραφή';
 $labels['move']     = 'Μετακίνηση';
 $labels['moveto']   = 'Μετακίνηση σε...';
 $labels['download'] = 'Λήψη';
+$labels['open']     = 'Ανοιγμα';
 $labels['showattachment'] = 'Εμφάνιση';
 $labels['showanyway'] = 'Εμφάνιση';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Τρέχουσα σελίδα';
 $labels['unread'] = 'Μη αναγνωσμένο';
 $labels['flagged'] = 'Σημειωμένο';
 $labels['unanswered'] = 'Αναπάντητο';
+$labels['withattachment'] = 'Με επισύναψη';
 $labels['deleted'] = 'Διεγραμμένο';
 $labels['undeleted'] = 'Μη διεγραμμένο';
 $labels['invert'] = 'Αναστροφή';
@@ -204,6 +206,8 @@ $labels['body']  = 'Σώμα';
 
 $labels['openinextwin'] = 'Άνοιγμα σε νέο παράθυρο';
 $labels['emlsave'] = 'Λήψη αρχείου (.eml)';
+$labels['changeformattext'] = 'Εμφάνιση σε μορφή απλού κειμένου';
+$labels['changeformathtml'] = 'Εμφάνιση σε μορφή HTML';
 
 // message compose
 $labels['editasnew']      = 'Επεξεργασία σαν νέο';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Δημιουργία μηνύματος σε μορφή
 $labels['htmlonreply'] = 'μόνο σε απάντηση μηνύματος μορφής HTML';
 $labels['htmlonreplyandforward'] = 'σε προώθηση ή σε απάντηση σε HTML μήνυμα';
 $labels['htmlsignature'] = 'Υπογραφή HTML';
+$labels['showemail'] = 'Εμφάνιση διεύθυνσης e-mail με το εμφανιζόμενο όνομα';
 $labels['previewpane'] = 'Εμφάνιση προεπισκόπησης';
 $labels['skin'] = 'Θέμα εμφάνισης';
 $labels['logoutclear'] = 'Άδειασμα του κάδου στην έξοδο';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Όταν το μήνυμα είναι απά
 $labels['autoaddsignature'] = 'Η υπογραφή να προστίθεται αυτόματα';
 $labels['newmessageonly'] = 'μόνο στα νέα μηνύματα';
 $labels['replyandforwardonly'] = 'μόνο στις απαντήσεις και προωθήσεις';
-$labels['replysignaturepos'] = 'Όταν γίνεται απάντηση ή προώθηση, η υπογραφή να τοποθετείτε';
-$labels['belowquote'] = 'πάνω από την παράθεση';
-$labels['abovequote'] = 'κάτω από την παράθεση';
 $labels['insertsignature'] = 'Προσθήκη υπογραφής';
 $labels['previewpanemarkread']  = 'Στα μηνύματα που έγινε προεπισκόπηση να μαρκάρονται σαν αναγνωσμένα';
 $labels['afternseconds']  = 'μετά από $n δευτερόλεπτα';
diff --git a/program/localization/el_GR/messages.inc b/program/localization/el_GR/messages.inc
index 542066e..dc2499d 100644
--- a/program/localization/el_GR/messages.inc
+++ b/program/localization/el_GR/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Σφάλμα βάσης δεδομένων!';
 $messages['requesttimedout'] = 'Το αίτημα εξέπνευσε χρονικά';
 $messages['errorreadonly'] = 'Η διαδικασία δεν μπορεί να ολοκληρωθεί. Ο φάκελος είναι μόνο για ανάγνωση.';
 $messages['errornoperm'] = 'Η διαδικασία δεν μπορεί να ολοκληρωθεί. Άρνηση άδειας';
+$messages['erroroverquota'] = 'Δεν είναι δυνατή η εκτέλεση της λειτουργίας. Δεν υπάρχει ελεύθερος χώρος στο δίσκο. ';
+$messages['erroroverquotadelete'] = 'Δεν υπάρχει ελεύθερος χώρος στο δίσκο. Χρησιμοποιήστε το συνδυασμό πλήκτρων SHIFT DEL για να διαγράψετε ένα μήνυμα.';
 $messages['invalidrequest'] = 'Λανθασμένο αίτημα! Δεν αποθηκεύτηκαν δεδομένα.';
 $messages['invalidhost'] = 'Άκυρο όνομα εξυπηρετητή.';
 $messages['nomessagesfound'] = 'Δε βρέθηκαν μηνύματα σε αυτή τη θυρίδα';
@@ -90,8 +92,8 @@ $messages['searching'] = 'Αναζήτηση...';
 $messages['checking'] = 'Έλεγχος...';
 $messages['nospellerrors'] = 'Δε βρέθηκαν ορθογραφικά λάθη';
 $messages['folderdeleted'] = 'Ο φάκελος διαγράφηκε επιτυχώς';
-$messages['foldersubscribed'] = 'Folder successfully subscribed.';
-$messages['folderunsubscribed'] = 'Folder successfully unsubscribed.';
+$messages['foldersubscribed'] = 'Ο φάκελος εχει εγγραφεί με επιτυχία.';
+$messages['folderunsubscribed'] = 'Ο φάκελος διαγράφηκε επιτυχώς';
 $messages['folderpurged'] = 'Ο φάκελος καθαρίστηκε με επιτυχία.';
 $messages['folderexpunged'] = 'Ο φάκελος συμπιέστηκε με επιτυχία.';
 $messages['deletedsuccessfully'] = 'Διαγραφή Επιτυχώς';
@@ -119,9 +121,9 @@ $messages['selectimportfile'] = 'Επιλέξτε αρχείο για ανέβα
 $messages['addresswriterror'] = 'Η επιλεγμένη ατζέντα διευθύνσεων δεν είνα εγγράψιμη';
 $messages['contactaddedtogroup'] = 'Οι επαφές προστέθηκαν στην ομάδα με επιτυχία.';
 $messages['contactremovedfromgroup'] = 'Οι επαφές αφαιρέθηκαν από την ομάδα με επιτυχία.';
-$messages['nogroupassignmentschanged'] = 'No group assignments changed.';
+$messages['nogroupassignmentschanged'] = 'Οι αναθεσεις της ομαδας δεν αλλαξαν.';
 $messages['importwait'] = 'Εισαγωγή, παρακαλώ περιμένετε...';
-$messages['importformaterror'] = 'Import failed! The uploaded file is not a valid import data file.';
+$messages['importformaterror'] = 'Η εισαγωγή απέτυχε! Το αρχείο δεν είναι έγκυρο εισαγωγής δεδομένων.';
 $messages['importconfirm'] = '<b>Εισήχθησαν $inserted επαφές με επιτυχία</b>';
 $messages['importconfirmskipped'] = '<b>Παραλήφθηκαν $skipped υπάρχοντα αντικείμενα</b>';
 $messages['opnotpermitted'] = 'Η λειτουργία δεν επιτρέπεται!';
@@ -140,30 +142,30 @@ $messages['maxgroupmembersreached'] = 'Ο αριθμός των μελών τη
 $messages['internalerror'] = 'Προέκυψε ένα εσωτερικό σφάλμα. Παρακαλώ δοκιμάστε πάλι.';
 $messages['contactdelerror'] = 'Δεν είναι δυνατή η διαγραφή της επαφής/ων';
 $messages['contactdeleted'] = 'Η επαφή/ές διαγράφηκαν με επιτυχία.';
-$messages['contactrestoreerror'] = 'Could not restore deleted contact(s).';
-$messages['contactrestored'] = 'Contact(s) restored successfully.';
-$messages['groupdeleted'] = 'Group deleted successfully.';
-$messages['grouprenamed'] = 'Group renamed successfully.';
-$messages['groupcreated'] = 'Group created successfully.';
-$messages['savedsearchdeleted'] = 'Saved search deleted successfully.';
-$messages['savedsearchdeleteerror'] = 'Could not delete saved search.';
-$messages['savedsearchcreated'] = 'Saved search created successfully.';
-$messages['savedsearchcreateerror'] = 'Could not create saved search.';
-$messages['messagedeleted'] = 'Message(s) deleted successfully.';
-$messages['messagemoved'] = 'Message(s) moved successfully.';
-$messages['messagecopied'] = 'Message(s) copied successfully.';
-$messages['messagemarked'] = 'Message(s) marked successfully.';
-$messages['autocompletechars'] = 'Enter at least $min characters for autocompletion.';
-$messages['autocompletemore'] = 'More matching entries found. Please type more characters.';
-$messages['namecannotbeempty'] = 'Name cannot be empty.';
-$messages['nametoolong'] = 'Name is too long.';
-$messages['folderupdated'] = 'Folder updated successfully.';
-$messages['foldercreated'] = 'Folder created successfully.';
-$messages['invalidimageformat'] = 'Not a valid image format.';
-$messages['mispellingsfound'] = 'Spelling errors detected in the message.';
-$messages['parentnotwritable'] = 'Unable to create/move folder into selected parent folder. No access rights.';
-$messages['messagetoobig'] = 'The message part is too big to process it.';
-$messages['attachmentvalidationerror'] = 'WARNING! This attachment is suspicious because its type doesn\'t match the type declared in the message. If you do not trust the sender, you shouldn\'t open it in the browser because it may contain malicious contents.<br/><br/><em>Expected: $expected; found: $detected</em>';
-$messages['noscriptwarning'] = 'Warning: This webmail service requires Javascript! In order to use it please enable Javascript in your browser\'s settings.';
+$messages['contactrestoreerror'] = 'Οι διαγραφημενη επαφη(ες) δεν μπορουν να επαναφερθουν.';
+$messages['contactrestored'] = 'Η επαφη(ες) επαναφερθηκαν.';
+$messages['groupdeleted'] = 'Η ομαδα διαγράφηκε επιτυχώς.';
+$messages['grouprenamed'] = 'Η ομαδα μετονομαστηκε επιτυχως.';
+$messages['groupcreated'] = 'Η ομαδα δημιουργηθηκε επιτυχως.';
+$messages['savedsearchdeleted'] = 'Η αποθηκευμένη αναζήτηση διαγράφηκε επιτυχως. ';
+$messages['savedsearchdeleteerror'] = 'Δεν ήταν δυνατή η διαγραφή της αποθηκευμένης αναζήτησης.';
+$messages['savedsearchcreated'] = 'Η αποθηκευμένη αναζητήση δημιουργήθηκε με επιτυχία. ';
+$messages['savedsearchcreateerror'] = 'Η αποθηκευμενη αναζητηση δεν μπορεσε να δημιουργηθει.';
+$messages['messagedeleted'] = 'Το μυνημα(τα) διαγραφηκαν επιτυχως.';
+$messages['messagemoved'] = 'Το μυνημα(τα) μετακινηθηκαν επιτυχως.';
+$messages['messagecopied'] = 'Το μυνημα(τα) αντιγραφθηκαν επιτυχως.';
+$messages['messagemarked'] = 'Το μυνημα(τα) μαρκαρισθηκαν επιτυχως.';
+$messages['autocompletechars'] = 'Εισάγετε τουλάχιστον $min χαρακτήρες για αυτόματη συμπλήρωση.';
+$messages['autocompletemore'] = 'Περισσότερες ταιριάστες καταχωρήσεις βρέθηκαν. Πληκτρολογείστε περισσότερους χαρακτήρες.';
+$messages['namecannotbeempty'] = 'Το ονομα δεν μπορεί να είναι κενό.';
+$messages['nametoolong'] = 'Το όνομα είναι πολύ μεγάλο.';
+$messages['folderupdated'] = 'Ο φάκελος ανανεωθηκε επιτυχώς.';
+$messages['foldercreated'] = 'Ο φάκελος δημιουργηθηκε επιτυχώς.';
+$messages['invalidimageformat'] = 'Μη έγκυρη μορφή εικόνας. ';
+$messages['mispellingsfound'] = 'Ορθογραφικά λάθη εντοπίστηκαν στο μήνυμα. ';
+$messages['parentnotwritable'] = 'Δεν είναι δυνατή η δημιουργία/μετακινήση φάκελου σε επιλεγμένο φάκελο γονέα. Κανένα δικαίωμα πρόσβασης. ';
+$messages['messagetoobig'] = 'Το τμήμα μήνυματος είναι πολύ μεγάλο για επεξεργασια. ';
+$messages['attachmentvalidationerror'] = 'ΠΡΟΕΙΔΟΠΟΊΗΣΗ! Αυτή η κατάσχεση είναι ύποπτη, επειδή ο τύπος δεν ταιριάζει με τον τύπο που δηλώνεται στο μήνυμα. Εάν δεν εμπιστεύεστε τον αποστολέα, δεν θα πρέπει να το ανοίγετε στο πρόγραμμα περιήγησης επειδή μπορεί να περιέχει κακόβουλο περιεχόμενο.<br/><br/><em>Expected: $expected; found: $detected</em> ';
+$messages['noscriptwarning'] = 'Προειδοποίηση : Αυτή η υπηρεσία webmail απαιτεί Javascript! Για να ΤΟ χρησιμοποιήσετε ενεργοποιήστε τΟ JavaScript στις ρυθμίσεις του browser σας. ';
 
 ?>
diff --git a/program/localization/en_GB/labels.inc b/program/localization/en_GB/labels.inc
index fb9ebe3..275208a 100644
--- a/program/localization/en_GB/labels.inc
+++ b/program/localization/en_GB/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Copy';
 $labels['move']     = 'Move';
 $labels['moveto']   = 'Move to...';
 $labels['download'] = 'Download';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Show';
 $labels['showanyway'] = 'Show it anyway';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Current page';
 $labels['unread'] = 'Unread';
 $labels['flagged'] = 'Flagged';
 $labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Deleted';
 $labels['undeleted'] = 'Not deleted';
 $labels['invert'] = 'Invert';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'Open in new window';
 $labels['emlsave'] = 'Download (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Edit as new';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Compose HTML messages';
 $labels['htmlonreply'] = 'on reply to HTML message only';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'HTML signature';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Show preview pane';
 $labels['skin'] = 'Interface skin';
 $labels['logoutclear'] = 'Clear Trash on logout';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
 $labels['autoaddsignature'] = 'Automatically add signature';
 $labels['newmessageonly'] = 'new message only';
 $labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
 $labels['insertsignature'] = 'Insert signature';
 $labels['previewpanemarkread']  = 'Mark previewed messages as read';
 $labels['afternseconds']  = 'after $n seconds';
diff --git a/program/localization/en_GB/messages.inc b/program/localization/en_GB/messages.inc
index f819147..21e7539 100644
--- a/program/localization/en_GB/messages.inc
+++ b/program/localization/en_GB/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
 $messages['requesttimedout'] = 'Request timed out';
 $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
 $messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'Invalid request! No data was saved.';
 $messages['invalidhost'] = 'Invalid server name.';
 $messages['nomessagesfound'] = 'No messages found in this mailbox.';
diff --git a/program/localization/eo/labels.inc b/program/localization/eo/labels.inc
index 57d7c2e..c088fc5 100644
--- a/program/localization/eo/labels.inc
+++ b/program/localization/eo/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Kopii';
 $labels['move']     = 'Movi';
 $labels['moveto']   = 'transloku al...';
 $labels['download'] = 'elŝutu';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Show';
 $labels['showanyway'] = 'Show it anyway';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Nuna paĝo';
 $labels['unread'] = 'Nelegitan';
 $labels['flagged'] = 'Markita';
 $labels['unanswered'] = 'Nerespondita';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Forigita';
 $labels['undeleted'] = 'Not deleted';
 $labels['invert'] = 'Inversigu';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'Malfermu en nova fenestro';
 $labels['emlsave'] = 'Elŝutu (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Redaktu kiel nova';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Uzado de HTML-redaktilo';
 $labels['htmlonreply'] = 'on reply to HTML message';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'HTML subskribo';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Montru antaÅ­rigardejon';
 $labels['skin'] = 'Interfaco-etoso';
 $labels['logoutclear'] = 'Malplenigu rubujon je eliro';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
 $labels['autoaddsignature'] = 'Automatically add signature';
 $labels['newmessageonly'] = 'new message only';
 $labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
 $labels['insertsignature'] = 'Insert signature';
 $labels['previewpanemarkread']  = 'Mark previewed messages as read';
 $labels['afternseconds']  = 'after $n seconds';
diff --git a/program/localization/eo/messages.inc b/program/localization/eo/messages.inc
index 3277173..4d72fe5 100644
--- a/program/localization/eo/messages.inc
+++ b/program/localization/eo/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Datumbaz-eraro!';
 $messages['requesttimedout'] = 'Request timed out';
 $messages['errorreadonly'] = 'Ne povis fari agon. Dosierujo estas nurlega';
 $messages['errornoperm'] = 'Ne povis fari agon. Ne havas permeson.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'Nevalida peto';
 $messages['invalidhost'] = 'Invalid server name.';
 $messages['nomessagesfound'] = 'Neniu mesaĝo en ĉi tiu dosierujo';
diff --git a/program/localization/es_AR/labels.inc b/program/localization/es_AR/labels.inc
index d6760ac..d9a83be 100644
--- a/program/localization/es_AR/labels.inc
+++ b/program/localization/es_AR/labels.inc
@@ -41,7 +41,7 @@ $labels['junk']   = 'Basura';
 // message listing
 $labels['subject'] = 'Asunto';
 $labels['from']    = 'Remitente';
-$labels['sender']  = 'Sender';
+$labels['sender']  = 'Remitente';
 $labels['to']      = 'Destinatario';
 $labels['cc']      = 'Copia';
 $labels['bcc']     = 'Cco';
@@ -52,20 +52,21 @@ $labels['size']    = 'Tamaño';
 $labels['priority'] = 'Prioridad';
 $labels['organization'] = 'Organización';
 $labels['readstatus'] = 'Read status';
-$labels['listoptions'] = 'List options...';
+$labels['listoptions'] = 'Listar opciones...';
 
 $labels['mailboxlist'] = 'Carpetas';
 $labels['messagesfromto'] = 'Mensajes $from a $to de $count';
-$labels['threadsfromto'] = 'Threads $from to $to of $count';
+$labels['threadsfromto'] = '$from a $to de $count conversaciones';
 $labels['messagenrof'] = 'Mensaje $nr de $count';
-$labels['fromtoshort'] = '$from – $to of $count';
+$labels['fromtoshort'] = '$from – $to de $count';
 
 $labels['copy']     = 'Copiar';
 $labels['move']     = 'Mover';
 $labels['moveto']   = 'Mover a...';
 $labels['download'] = 'Descargar';
-$labels['showattachment'] = 'Show';
-$labels['showanyway'] = 'Show it anyway';
+$labels['open']     = 'Open';
+$labels['showattachment'] = 'Mostrar';
+$labels['showanyway'] = 'Mostrar esto siempre';
 
 $labels['filename'] = 'Nombre del archivo';
 $labels['filesize'] = 'Tamaño del archivo';
@@ -121,18 +122,18 @@ $labels['longdec']	= 'Diciembre';
 $labels['today'] = 'Hoy';
 
 // toolbar buttons
-$labels['refresh']          = 'Refresh';
+$labels['refresh']          = 'Actualizar';
 $labels['checkmail']        = 'Revisar si hay nuevos mensajes';
 $labels['compose']          = 'Escribir un mensaje';
 $labels['writenewmessage']  = 'Crear nuevo mensaje';
-$labels['reply']            = 'Reply';
+$labels['reply']            = 'Responder';
 $labels['replytomessage']   = 'Responder mensaje';
 $labels['replytoallmessage'] = 'Responder al emisor y a todos los destinatarios';
-$labels['replyall']         = 'Reply all';
-$labels['replylist']        = 'Reply list';
-$labels['forward']          = 'Forward';
-$labels['forwardinline']    = 'Forward inline';
-$labels['forwardattachment'] = 'Forward as attachment';
+$labels['replyall']         = 'Responder a todos';
+$labels['replylist']        = 'Responder a lista';
+$labels['forward']          = 'Reenviar';
+$labels['forwardinline']    = 'Reenviar en linea';
+$labels['forwardattachment'] = 'Reenviar como adjunto';
 $labels['forwardmessage']   = 'Reenviar mensaje';
 $labels['deletemessage']    = 'Eliminar mensaje';
 $labels['movemessagetotrash'] = 'Mover mensaje a la papelera';
@@ -143,16 +144,16 @@ $labels['nextmessage']      = 'Mostrar siguente mensaje';
 $labels['lastmessage']      = 'Mostrar último mensaje';
 $labels['backtolist']       = 'Volver a la lista de mensajes';
 $labels['viewsource']       = 'Mostrar código';
-$labels['mark']             = 'Mark';
+$labels['mark']             = 'Marcar';
 $labels['markmessages']     = 'Marcar mensajes';
 $labels['markread']         = 'Como leído';
 $labels['markunread']       = 'Como no leído';
 $labels['markflagged']      = 'Como marcado';
 $labels['markunflagged']    = 'Como no marcado';
-$labels['moreactions']      = 'More actions...';
-$labels['more']             = 'More';
-$labels['back']             = 'Back';
-$labels['options']          = 'Options';
+$labels['moreactions']      = 'Mas acciones...';
+$labels['more']             = 'Más';
+$labels['back']             = 'Atrás';
+$labels['options']          = 'Opciones';
 
 $labels['select'] = 'Elija';
 $labels['all'] = 'Todos';
@@ -161,34 +162,35 @@ $labels['currpage'] = 'Página actual';
 $labels['unread'] = 'Sin leer';
 $labels['flagged'] = 'Marcado';
 $labels['unanswered'] = 'Sin respuesta';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Eliminado';
-$labels['undeleted'] = 'Not deleted';
+$labels['undeleted'] = 'No eliminado';
 $labels['invert'] = 'Invertir';
 $labels['filter'] = 'Filtrar';
-$labels['list'] = 'List';
-$labels['threads'] = 'Threads';
+$labels['list'] = 'Lista';
+$labels['threads'] = 'Conversaciones';
 $labels['expand-all'] = 'Expandir Todos';
 $labels['expand-unread'] = 'Expandir No Leidos';
 $labels['collapse-all'] = 'Colapsar Todos';
-$labels['threaded'] = 'Threaded';
+$labels['threaded'] = 'Como conversaciones';
 
-$labels['autoexpand_threads'] = 'Expand message threads';
-$labels['do_expand'] = 'all threads';
+$labels['autoexpand_threads'] = 'Expandir mensajes en conversación';
+$labels['do_expand'] = 'todas las conversaciones';
 $labels['expand_only_unread'] = 'solo con mensajes no leídos';
-$labels['fromto'] = 'From/To';
-$labels['flag'] = 'Flag';
+$labels['fromto'] = 'De/A';
+$labels['flag'] = 'Marca';
 $labels['attachment'] = 'Adjunto';
 $labels['nonesort'] = 'Ninguno';
 $labels['sentdate'] = 'Fecha de Enviado';
 $labels['arrival'] = 'Fecha de Recepción';
 $labels['asc'] = 'Ascendente';
 $labels['desc'] = 'Descendente';
-$labels['listcolumns'] = 'List columns';
-$labels['listsorting'] = 'Sorting column';
-$labels['listorder'] = 'Sorting order';
+$labels['listcolumns'] = 'Listar columnas';
+$labels['listsorting'] = 'Ordenar por';
+$labels['listorder'] = 'Ordenado por';
 $labels['listmode'] = 'List view mode';
 
-$labels['folderactions'] = 'Folder actions...';
+$labels['folderactions'] = 'Acciones de carpeta...';
 $labels['compact'] = 'Compactar';
 $labels['empty'] = 'Vaciar';
 
@@ -204,32 +206,34 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'Abrir en ventana nueva';
 $labels['emlsave'] = 'Guardar (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Editar como nuevo';
-$labels['send']           = 'Send';
+$labels['send']           = 'Enviar';
 $labels['sendmessage']    = 'Enviar ahora el mensaje';
 $labels['savemessage']    = 'Guardar como borrador';
 $labels['addattachment']  = 'Añadir un archivo';
 $labels['charset']        = 'Codificación';
 $labels['editortype']     = 'Tipo de editor';
 $labels['returnreceipt']  = 'Acuse de recibo';
-$labels['dsn']            = 'Delivery status notification';
-$labels['mailreplyintro'] = 'On $date, $sender wrote:';
-$labels['originalmessage'] = 'Original Message';
+$labels['dsn']            = 'Notificación de estado del envío';
+$labels['mailreplyintro'] = 'El $date, $sender escribió:';
+$labels['originalmessage'] = 'Mensaje original';
 
-$labels['editidents']    = 'Edit identities';
-$labels['spellcheck']    = 'Spell';
+$labels['editidents']    = 'Editar identidades';
+$labels['spellcheck']    = 'Gramática';
 $labels['checkspelling'] = 'Revisar ortografía';
 $labels['resumeediting'] = 'Continuar edición';
 $labels['revertto']      = 'Revertir a';
 
-$labels['attach'] = 'Attach';
+$labels['attach'] = 'Adjuntar';
 $labels['attachments'] = 'Adjuntos';
 $labels['upload'] = 'Agregar';
-$labels['uploadprogress'] = '$percent ($current from $total)';
+$labels['uploadprogress'] = '$percent ($current de $total)';
 $labels['close']  = 'Cerrar';
-$labels['messageoptions']  = 'Message options...';
+$labels['messageoptions']  = 'Opciones de mensaje...';
 
 $labels['low']     = 'Bajo';
 $labels['lowest']  = 'Bajísimo';
@@ -240,9 +244,9 @@ $labels['highest'] = 'Altísimo';
 $labels['nosubject']  = '(sin asunto)';
 $labels['showimages'] = 'Mostrar imágenes';
 $labels['alwaysshow'] = 'Siempre mostrar imágenes de $sender';
-$labels['isdraft']    = 'This is a draft message.';
-$labels['andnmore']   = '$nr more...';
-$labels['togglemoreheaders'] = 'Show more message headers';
+$labels['isdraft']    = 'Este es un borrador.';
+$labels['andnmore']   = '$nr más...';
+$labels['togglemoreheaders'] = 'Mostrarme más encabezados de mensaje';
 $labels['togglefullheaders'] = 'Toggle raw message headers';
 
 $labels['htmltoggle'] = 'HTML';
@@ -266,68 +270,68 @@ $labels['receiptnote'] = 'Nota: Esta notificación sólo significa que su mensaj
 $labels['name']         = 'Nombre completo';
 $labels['firstname']    = 'Nombre';
 $labels['surname']      = 'Apellido';
-$labels['middlename']   = 'Middle Name';
-$labels['nameprefix']   = 'Prefix';
-$labels['namesuffix']   = 'Suffix';
-$labels['nickname']     = 'Nickname';
-$labels['jobtitle']     = 'Job Title';
-$labels['department']   = 'Department';
-$labels['gender']       = 'Gender';
-$labels['maidenname']   = 'Maiden Name';
+$labels['middlename']   = 'Segundo nombre';
+$labels['nameprefix']   = 'Prefijo';
+$labels['namesuffix']   = 'Subfijo';
+$labels['nickname']     = 'Sobre nombre';
+$labels['jobtitle']     = 'Puesto';
+$labels['department']   = 'Departamento';
+$labels['gender']       = 'Sexo';
+$labels['maidenname']   = 'Apellido de soltera';
 $labels['email']        = 'Correo';
-$labels['phone']        = 'Phone';
-$labels['address']      = 'Address';
-$labels['street']       = 'Street';
-$labels['locality']     = 'City';
-$labels['zipcode']      = 'ZIP Code';
-$labels['region']       = 'State/Province';
-$labels['country']      = 'Country';
-$labels['birthday']     = 'Birthday';
-$labels['anniversary']  = 'Anniversary';
-$labels['website']      = 'Website';
-$labels['instantmessenger'] = 'IM';
-$labels['notes'] = 'Notes';
-$labels['male']   = 'male';
-$labels['female'] = 'female';
-$labels['manager'] = 'Manager';
-$labels['assistant'] = 'Assistant';
-$labels['spouse'] = 'Spouse';
-$labels['allfields'] = 'All fields';
-$labels['search'] = 'Search';
-$labels['advsearch'] = 'Advanced Search';
-$labels['advanced'] = 'Advanced';
-$labels['other'] = 'Other';
-
-$labels['typehome']   = 'Home';
-$labels['typework']   = 'Work';
-$labels['typeother']  = 'Other';
-$labels['typemobile']  = 'Mobile';
-$labels['typemain']  = 'Main';
-$labels['typehomefax']  = 'Home Fax';
-$labels['typeworkfax']  = 'Work Fax';
-$labels['typecar']  = 'Car';
+$labels['phone']        = 'Teléfono';
+$labels['address']      = 'Dirección';
+$labels['street']       = 'Calle';
+$labels['locality']     = 'Ciudad';
+$labels['zipcode']      = 'Código Postal';
+$labels['region']       = 'Estado/Provincia';
+$labels['country']      = 'País';
+$labels['birthday']     = 'Cumpleaños';
+$labels['anniversary']  = 'Aniversario';
+$labels['website']      = 'Sitio Web';
+$labels['instantmessenger'] = 'Mensajería Instantanea';
+$labels['notes'] = 'Notas';
+$labels['male']   = 'masculino';
+$labels['female'] = 'femenino';
+$labels['manager'] = 'Administrador';
+$labels['assistant'] = 'Asistente';
+$labels['spouse'] = 'Cónygue';
+$labels['allfields'] = 'Todos los campos';
+$labels['search'] = 'Buscar';
+$labels['advsearch'] = 'Búsqueda Avanzada';
+$labels['advanced'] = 'Avanzado';
+$labels['other'] = 'Otro';
+
+$labels['typehome']   = 'Particular';
+$labels['typework']   = 'Laboral';
+$labels['typeother']  = 'Otro';
+$labels['typemobile']  = 'Móvil';
+$labels['typemain']  = 'Principal';
+$labels['typehomefax']  = 'Fax Particular';
+$labels['typeworkfax']  = 'Fax Laboral';
+$labels['typecar']  = 'Auto';
 $labels['typepager']  = 'Pager';
 $labels['typevideo']  = 'Video';
-$labels['typeassistant']  = 'Assistant';
-$labels['typehomepage']  = 'Home Page';
+$labels['typeassistant']  = 'Asistente';
+$labels['typehomepage']  = 'Página Personal';
 $labels['typeblog'] = 'Blog';
-$labels['typeprofile'] = 'Profile';
+$labels['typeprofile'] = 'Perfil';
 
-$labels['addfield'] = 'Add field...';
+$labels['addfield'] = 'Agregar campo...';
 $labels['addcontact'] = 'Añadir nuevo contacto';
 $labels['editcontact'] = 'Editar contacto';
-$labels['contacts'] = 'Contacts';
-$labels['contactproperties'] = 'Contact properties';
-$labels['personalinfo'] = 'Personal information';
+$labels['contacts'] = 'Contactos';
+$labels['contactproperties'] = 'Propiedades del contacto';
+$labels['personalinfo'] = 'Información personal';
 
 $labels['edit']   = 'Editar';
 $labels['cancel'] = 'Cancelar';
 $labels['save']   = 'Guardar';
 $labels['delete'] = 'Eliminar';
-$labels['rename'] = 'Rename';
-$labels['addphoto'] = 'Add';
-$labels['replacephoto'] = 'Replace';
-$labels['uploadphoto'] = 'Upload photo';
+$labels['rename'] = 'Renombrar';
+$labels['addphoto'] = 'Agregar';
+$labels['replacephoto'] = 'Reemplazar';
+$labels['uploadphoto'] = 'Subir foto';
 
 $labels['newcontact']     = 'Añadir nuevo contacto';
 $labels['deletecontact']  = 'Eliminar contactos seleccionados';
@@ -339,9 +343,9 @@ $labels['exportall']      = 'Export all';
 $labels['exportsel']      = 'Export selected';
 $labels['exportvcards']   = 'Exportar contactos en format vCard';
 $labels['newcontactgroup'] = 'Crear Nuevo Grupo de Contacto';
-$labels['grouprename']    = 'Rename group';
-$labels['groupdelete']    = 'Delete group';
-$labels['groupremoveselected'] = 'Remove selected contacts from group';
+$labels['grouprename']    = 'Renombrar grupo';
+$labels['groupdelete']    = 'Eliminar grupo';
+$labels['groupremoveselected'] = 'Remover del grupo los contactos seleccionados';
 
 $labels['previouspage']   = 'Mostrar grupo anterior';
 $labels['firstpage']      = 'Mostrar primer grupo';
@@ -352,20 +356,20 @@ $labels['group'] = 'Grupo';
 $labels['groups'] = 'Grupos';
 $labels['personaladrbook'] = 'Direcciones personales';
 
-$labels['searchsave'] = 'Save search';
-$labels['searchdelete'] = 'Delete search';
+$labels['searchsave'] = 'Guardar búsqueda';
+$labels['searchdelete'] = 'Eliminar búsqueda';
 
 $labels['import'] = 'Importar';
 $labels['importcontacts'] = 'Importar contactos';
 $labels['importfromfile'] = 'Importar desde el archivo:';
-$labels['importtarget'] = 'Add new contacts to address book:';
+$labels['importtarget'] = 'Agregar nuevos contactos a la libreta de direcciones:';
 $labels['importreplace'] = 'Reemplazar completamente la lista de contactos';
-$labels['importdesc'] = 'You can upload contacts from an existing address book.<br/>We currently support importing addresses from the <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> or CSV (comma-separated) data format.';
+$labels['importdesc'] = 'Puedes subir contactos desde una libreta de direcciones existente.<br/>Actualmente soportamos la importación de direcciones utilizando el formato <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> o CSV (Valores Separados por Coma).';
 $labels['done'] = 'Hecho';
 
 // settings
 $labels['settingsfor'] = 'Configuración para';
-$labels['about'] = 'About';
+$labels['about'] = 'Acerca de';
 $labels['preferences'] = 'Preferencias';
 $labels['userpreferences'] = 'Preferencias de usuario';
 $labels['editpreferences'] = 'Editar preferencias de usuario';
@@ -382,8 +386,8 @@ $labels['defaultcharset'] = 'Juego de Caracteres por Defecto';
 $labels['htmlmessage'] = 'Mensaje HTML';
 $labels['messagepart'] = 'Part';
 $labels['digitalsig'] = 'Digital Signature';
-$labels['dateformat'] = 'Date format';
-$labels['timeformat'] = 'Time format';
+$labels['dateformat'] = 'Formato de fecha';
+$labels['timeformat'] = 'Formato de tiempo';
 $labels['prettydate'] = 'Fecha detallada';
 $labels['setdefault']  = 'Seleccionar opción por defecto';
 $labels['autodetect']  = 'Automático';
@@ -392,12 +396,13 @@ $labels['timezone']  = 'Zona horaria';
 $labels['pagesize']  = 'Filas por página';
 $labels['signature'] = 'Firma';
 $labels['dstactive']  = 'Cambio de horario';
-$labels['showinextwin'] = 'Open message in a new window';
-$labels['composeextwin'] = 'Compose in a new window';
+$labels['showinextwin'] = 'Abrir mensaje en nueva ventana';
+$labels['composeextwin'] = 'Redactar en nueva ventana';
 $labels['htmleditor'] = 'Componer mensaje en HTML';
-$labels['htmlonreply'] = 'on reply to HTML message';
-$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
+$labels['htmlonreply'] = 'al responder un mensaje HTML';
+$labels['htmlonreplyandforward'] = 'al reenviar o responder un mensaje HTML';
 $labels['htmlsignature'] = 'Firma HTML';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Mostrar vista preliminar';
 $labels['skin'] = 'Apariencia de la interfaz';
 $labels['logoutclear'] = 'Vaciar papelera al cerrar sesión';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Al responder, eliminar la firma del mensaje o
 $labels['autoaddsignature'] = 'Agregar la firma automáticamente';
 $labels['newmessageonly'] = 'nuevos mensajes solamente';
 $labels['replyandforwardonly'] = 'respuestas o reenvios solamente';
-$labels['replysignaturepos'] = 'Agregar firma al responder o reenviar';
-$labels['belowquote'] = 'debajo de la cita';
-$labels['abovequote'] = 'sobre la cita';
 $labels['insertsignature'] = 'Insertar firma';
 $labels['previewpanemarkread']  = 'Marcar mensajes previsualizados como leidos';
 $labels['afternseconds']  = 'despues de $n segundos';
diff --git a/program/localization/es_AR/messages.inc b/program/localization/es_AR/messages.inc
index 167fbe2..1cec9f0 100644
--- a/program/localization/es_AR/messages.inc
+++ b/program/localization/es_AR/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Error en base de datos!';
 $messages['requesttimedout'] = 'Tiempo de espera agotado';
 $messages['errorreadonly'] = 'No se pudo realizar la operación. La carpeta es de sólo lectura.';
 $messages['errornoperm'] = 'No se pudo realizar la operación. Permiso denegado.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'Peteción invalida! No se guardó nada.';
 $messages['invalidhost'] = 'Nombre de servidor inválido.';
 $messages['nomessagesfound'] = 'No se han encontrado mensajes en esta casilla';
diff --git a/program/localization/es_ES/labels.inc b/program/localization/es_ES/labels.inc
index eca1d1e..03f6b48 100644
--- a/program/localization/es_ES/labels.inc
+++ b/program/localization/es_ES/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Copiar';
 $labels['move']     = 'Mover';
 $labels['moveto']   = 'Mover a…';
 $labels['download'] = 'Descargar';
+$labels['open']     = 'Abrir';
 $labels['showattachment'] = 'Mostrar';
 $labels['showanyway'] = 'Mostrarlo de todos modos';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Página actual';
 $labels['unread'] = 'Sin leer';
 $labels['flagged'] = 'Señalado';
 $labels['unanswered'] = 'Sin respuesta';
+$labels['withattachment'] = 'Con adjunto';
 $labels['deleted'] = 'Eliminado';
 $labels['undeleted'] = 'No eliminado';
 $labels['invert'] = 'Invertir';
@@ -204,6 +206,8 @@ $labels['body']  = 'Cuerpo';
 
 $labels['openinextwin'] = 'Abrir en nueva ventana';
 $labels['emlsave'] = 'Descargar (.eml)';
+$labels['changeformattext'] = 'Mostrar en formato de texto sencillo';
+$labels['changeformathtml'] = 'Mostrar en formato HTML';
 
 // message compose
 $labels['editasnew']      = 'Editar como nuevo';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Componer mensaje en HTML';
 $labels['htmlonreply'] = 'sólo en respuesta a un mensaje HTML';
 $labels['htmlonreplyandforward'] = 'en reenvío o respuesta al mensaje HTML';
 $labels['htmlsignature'] = 'Firma HTML';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Mostrar vista preliminar';
 $labels['skin'] = 'Apariencia de la interfaz';
 $labels['logoutclear'] = 'Vaciar papelera al cerrar sesión';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'Eliminar la firma original del mensaje al res
 $labels['autoaddsignature'] = 'Añadir firma automáticamente';
 $labels['newmessageonly'] = 'solamente mensaje nuevo';
 $labels['replyandforwardonly'] = 'respuestas y reenvíos solamente';
-$labels['replysignaturepos'] = 'Colocar firma al responder o reenviar';
-$labels['belowquote'] = 'abajo del texto seleccionado';
-$labels['abovequote'] = 'arriba del texto seleccionado';
 $labels['insertsignature'] = 'Insertar firma';
 $labels['previewpanemarkread']  = 'Marcar mensaje previsualizado como leído';
 $labels['afternseconds']  = 'después de $n segundos';
diff --git a/program/localization/es_ES/messages.inc b/program/localization/es_ES/messages.inc
index 4555220..6c031df 100644
--- a/program/localization/es_ES/messages.inc
+++ b/program/localization/es_ES/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = '¡Error de base de datos!';
 $messages['requesttimedout'] = 'Ha expirado el tiempo de respuesta';
 $messages['errorreadonly'] = 'Imposible realizar la operación. La bandeja es sólo de lectura.';
 $messages['errornoperm'] = 'Imposible realizar la operación. Permiso denegado.';
+$messages['erroroverquota'] = 'No se pudo completar la operación. No queda espacio en el disco.';
+$messages['erroroverquotadelete'] = 'No queda espacio en el disco. Use Shift+Supr para borrar un mensaje.';
 $messages['invalidrequest'] = '¡Petición no válida! No se han guardado los datos.';
 $messages['invalidhost'] = 'Nombre de servidor inválido.';
 $messages['nomessagesfound'] = 'No se han encontrado mensajes en esta casilla.';
diff --git a/program/localization/et_EE/labels.inc b/program/localization/et_EE/labels.inc
index 01c3723..5d23d4d 100644
--- a/program/localization/et_EE/labels.inc
+++ b/program/localization/et_EE/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Mustandid';
 $labels['sent']   = 'Saadetud';
 $labels['trash']  = 'Prügikast';
 $labels['junk']   = 'Rämps';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
 
 // message listing
 $labels['subject'] = 'Pealkiri';
@@ -64,6 +65,7 @@ $labels['copy']     = 'Kopeeri';
 $labels['move']     = 'Liiguta';
 $labels['moveto']   = 'liiguta kausta...';
 $labels['download'] = 'laadi arvutisse';
+$labels['open']     = 'Ava';
 $labels['showattachment'] = 'Näita';
 $labels['showanyway'] = 'Näita ikka';
 
@@ -161,6 +163,7 @@ $labels['currpage'] = 'Praegune leht';
 $labels['unread'] = 'Lugemata';
 $labels['flagged'] = 'Märgistatud';
 $labels['unanswered'] = 'Vastamata';
+$labels['withattachment'] = 'Koos manusega';
 $labels['deleted'] = 'Kustutatud';
 $labels['undeleted'] = 'Pole kustutatud';
 $labels['invert'] = 'Vaheta';
@@ -204,6 +207,8 @@ $labels['body']  = 'Keha';
 
 $labels['openinextwin'] = 'Ava uues aknas';
 $labels['emlsave'] = 'Salvesta (.eml)';
+$labels['changeformattext'] = 'Näita lihttekstina';
+$labels['changeformathtml'] = 'Näita HTMLis';
 
 // message compose
 $labels['editasnew']      = 'Kasuta uue kirja põhjana';
@@ -398,6 +403,7 @@ $labels['htmleditor'] = 'Kasuta HTML redaktorit';
 $labels['htmlonreply'] = 'vaid HTML-vormingus kirjale vastamisel';
 $labels['htmlonreplyandforward'] = 'edastamisel või HTML kirjale vastates';
 $labels['htmlsignature'] = 'HTML allkiri';
+$labels['showemail'] = 'Näita nime juures e-posti aadressi';
 $labels['previewpane'] = 'Näita eelvaate akent';
 $labels['skin'] = 'Kliendi välimus';
 $labels['logoutclear'] = 'Tühjenda väljumisel prügikast';
@@ -451,9 +457,6 @@ $labels['replyremovesignature'] = 'Vastates eemalda kirjast esialgne allkiri';
 $labels['autoaddsignature'] = 'Lisa allkiri automaatselt';
 $labels['newmessageonly'] = 'ainult uutele';
 $labels['replyandforwardonly'] = 'ainult vastates ja edastades';
-$labels['replysignaturepos'] = 'Vastates või edastades aseta allkiri';
-$labels['belowquote'] = 'tsiteeritu alla';
-$labels['abovequote'] = 'tsiteeritu kohale';
 $labels['insertsignature'] = 'Sisesta allkiri';
 $labels['previewpanemarkread']  = 'Märgi eelvaadatud kirjad loetuks';
 $labels['afternseconds']  = '$n sekundi pärast';
@@ -470,6 +473,7 @@ $labels['spellcheckignorenums'] = 'Ignoreeri sõnu, milles on numbreid';
 $labels['spellcheckignorecaps'] = 'Ignoreeri suurte tähtedega kirjutatud sõnu';
 $labels['addtodict'] = 'Lisa sõnastikku';
 $labels['mailtoprotohandler'] = 'Kasuta mailto: linkide avamisel';
+$labels['standardwindows'] = 'Käsitle hüpikaknaid tavaliste akendena';
 $labels['forwardmode'] = 'Kirja edastamine';
 $labels['inline'] = 'kirja sees';
 $labels['asattachment'] = 'manusena';
diff --git a/program/localization/et_EE/messages.inc b/program/localization/et_EE/messages.inc
index 653b48b..c73d92c 100644
--- a/program/localization/et_EE/messages.inc
+++ b/program/localization/et_EE/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Andmebaasi tõrge!';
 $messages['requesttimedout'] = 'Päring aegus';
 $messages['errorreadonly'] = 'Operatsioon nurjus. Kaustale on vaid lugemisõigus';
 $messages['errornoperm'] = 'Operatsioon nurjus. Ligipääsu õigused puuduvad';
+$messages['erroroverquota'] = 'Operatsioon nurjus. Ketas on täis.';
+$messages['erroroverquotadelete'] = 'Ketas on täis. Kirja kustutamiseks vajuta SHIFT+DEL.';
 $messages['invalidrequest'] = 'Lubamatu päring! Andmeid ei salvestatud.';
 $messages['invalidhost'] = 'Lubamatu serveri nimi.';
 $messages['nomessagesfound'] = 'Postkast paistab tühi olevat';
diff --git a/program/localization/eu_ES/labels.inc b/program/localization/eu_ES/labels.inc
index 6b45038..8052d69 100644
--- a/program/localization/eu_ES/labels.inc
+++ b/program/localization/eu_ES/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Kopia';
 $labels['move']     = 'Mugitu';
 $labels['moveto']   = 'mugitu hona...';
 $labels['download'] = 'deskargatu';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Show';
 $labels['showanyway'] = 'Show it anyway';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Uneko orrialdea';
 $labels['unread'] = 'Irakurri gabeak';
 $labels['flagged'] = 'Banderaduna';
 $labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Ezabatuak';
 $labels['undeleted'] = 'Ezabatu gabeak';
 $labels['invert'] = 'Invert';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'Lehio berrian ireki';
 $labels['emlsave'] = 'Download (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Edit as new';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'HTML mezuak sortu';
 $labels['htmlonreply'] = 'on reply to HTML message';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'HTML sinadura';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Aurrebista panela ikusi';
 $labels['skin'] = 'Azal-interfazea';
 $labels['logoutclear'] = 'Garbitu Zakarronzia irtetean';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
 $labels['autoaddsignature'] = 'Automatically add signature';
 $labels['newmessageonly'] = 'new message only';
 $labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
 $labels['insertsignature'] = 'Insert signature';
 $labels['previewpanemarkread']  = 'Mark previewed messages as read';
 $labels['afternseconds']  = 'after $n seconds';
diff --git a/program/localization/eu_ES/messages.inc b/program/localization/eu_ES/messages.inc
index 118f53f..a3985b2 100644
--- a/program/localization/eu_ES/messages.inc
+++ b/program/localization/eu_ES/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
 $messages['requesttimedout'] = 'Request timed out';
 $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
 $messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'Invalid request! No data was saved.';
 $messages['invalidhost'] = 'Invalid server name.';
 $messages['nomessagesfound'] = 'Ez da mezurik aurkitu posta kutxa honetan';
diff --git a/program/localization/fa_AF/labels.inc b/program/localization/fa_AF/labels.inc
index ae38105..70113bc 100644
--- a/program/localization/fa_AF/labels.inc
+++ b/program/localization/fa_AF/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'تکثیر';
 $labels['move']     = 'Move';
 $labels['moveto']   = 'انتقال بدهید به ...';
 $labels['download'] = 'داونلود کردن';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Show';
 $labels['showanyway'] = 'Show it anyway';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Current page';
 $labels['unread'] = 'ناخوانده';
 $labels['flagged'] = 'نشانی شده';
 $labels['unanswered'] = 'پیامهای جواب نداده شده';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Deleted';
 $labels['undeleted'] = 'Not deleted';
 $labels['invert'] = 'Invert';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'در پینجره ای جدید باز کنید';
 $labels['emlsave'] = 'Download (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Edit as new';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'پيغام ايچ ټي ام ايل رانوشته کن
 $labels['htmlonreply'] = 'on reply to HTML message';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'امضای حساب ایمیل بشکل ایچ تی ام ال';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'چوکات پیشنما را نشان دهید';
 $labels['skin'] = 'تمپلیت محیط کاربری';
 $labels['logoutclear'] = 'Clear Trash on logout';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
 $labels['autoaddsignature'] = 'Automatically add signature';
 $labels['newmessageonly'] = 'new message only';
 $labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
 $labels['insertsignature'] = 'Insert signature';
 $labels['previewpanemarkread']  = 'Mark previewed messages as read';
 $labels['afternseconds']  = 'after $n seconds';
diff --git a/program/localization/fa_AF/messages.inc b/program/localization/fa_AF/messages.inc
index aa479b9..4f3d4be 100644
--- a/program/localization/fa_AF/messages.inc
+++ b/program/localization/fa_AF/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
 $messages['requesttimedout'] = 'Request timed out';
 $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
 $messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'Invalid request! No data was saved.';
 $messages['invalidhost'] = 'Invalid server name.';
 $messages['nomessagesfound'] = 'هيچ پيغامی در اين صندوق پستي دريافت نه شد';
diff --git a/program/localization/fa_IR/labels.inc b/program/localization/fa_IR/labels.inc
index 518c674..221e4b8 100644
--- a/program/localization/fa_IR/labels.inc
+++ b/program/localization/fa_IR/labels.inc
@@ -20,9 +20,9 @@ $labels = array();
 
 // login page
 $labels['welcome']   = 'به $product خوش آمدید';
-$labels['username']  = 'نام‌کاربری';
+$labels['username']  = 'نام کاربری';
 $labels['password']  = 'گذرواژه';
-$labels['server']    = 'سرور';
+$labels['server']    = 'سرویس‌دهنده';
 $labels['login']     = 'ورود';
 
 // taskbar
@@ -34,8 +34,8 @@ $labels['addressbook'] = 'دفتر نشانی';
 // mailbox names
 $labels['inbox']  = 'صندوق ورودی';
 $labels['drafts'] = 'پیش‌نویس‌ها';
-$labels['sent']   = 'ارسال شده';
-$labels['trash']  = 'زباله‌دان';
+$labels['sent']   = 'فرستاده شده';
+$labels['trash']  = 'سطل آشغال';
 $labels['junk']   = 'بنجل';
 
 // message listing
@@ -64,6 +64,7 @@ $labels['copy']     = 'رونوشت';
 $labels['move']     = 'انتقال';
 $labels['moveto']   = 'انتقال به...';
 $labels['download'] = 'بارگیری';
+$labels['open']     = 'باز کردن';
 $labels['showattachment'] = 'نمایش';
 $labels['showanyway'] = 'نمایش آن در هر صورت';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'صفحه جاری';
 $labels['unread'] = 'خوانده‌نشده';
 $labels['flagged'] = 'پرچم‌دار';
 $labels['unanswered'] = 'پاسخ داده نشده';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'حذف شده';
 $labels['undeleted'] = 'حذف نشده';
 $labels['invert'] = 'وارونه';
@@ -204,6 +206,8 @@ $labels['body']  = 'بدنه';
 
 $labels['openinextwin'] = 'باز کردن در پنجره‌ی جدید';
 $labels['emlsave'] = 'بارگیری (.eml)';
+$labels['changeformattext'] = 'نمایش در قالب متنی';
+$labels['changeformathtml'] = 'نمایش در قالب اچ‌تی‌ام‌ال';
 
 // message compose
 $labels['editasnew']      = 'ویرایش به عنوان جدید';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'HTML ‌نوشتن پیغام‌های';
 $labels['htmlonreply'] = 'فقط در پاسخ به پیغام HTML';
 $labels['htmlonreplyandforward'] = 'در بازگردانی یا پاسخ به پیغام‌های HTML';
 $labels['htmlsignature'] = 'HTML امضای';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'نمایش قاب پیش‌نمایش';
 $labels['skin'] = 'پوسته ظاهری';
 $labels['logoutclear'] = 'تمیز کردن زباله دان هنگام برون‌رفت';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'هنگام پاسخ امضاء اصلی را
 $labels['autoaddsignature'] = 'اضافه کردن خودکار امضاء';
 $labels['newmessageonly'] = 'فقط پیغام جدید';
 $labels['replyandforwardonly'] = 'فقط پاسخ‌ها و ارجاع‌ها';
-$labels['replysignaturepos'] = 'هنگام پاسخ یا ارجاع امضاء را قرار داده شود';
-$labels['belowquote'] = 'زیر نقل‌قول';
-$labels['abovequote'] = 'بالای نقل‌قول';
 $labels['insertsignature'] = 'درج امضاء';
 $labels['previewpanemarkread']  = 'نشانه‌گذاری پیغام‌های پیش مرور شده به عنوان خوانده شده';
 $labels['afternseconds']  = 'بعد از $s ثانیه';
diff --git a/program/localization/fa_IR/messages.inc b/program/localization/fa_IR/messages.inc
index 5db68b0..ff53c65 100644
--- a/program/localization/fa_IR/messages.inc
+++ b/program/localization/fa_IR/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'خطای پایگاه‌داده';
 $messages['requesttimedout'] = 'زمان درخواست تمام شد';
 $messages['errorreadonly'] = 'ناتوانی در انجام عملیات. پوشه فقط خواندنی است.';
 $messages['errornoperm'] = 'ناتوانی در انجام عملیات. دسترسی وجود ندارد.';
+$messages['erroroverquota'] = 'ناتوانی در انجام عملیات. فضای دیسک خالی نیست.';
+$messages['erroroverquotadelete'] = 'فضای دیسک خالی نیست. برای حذف پیغام از SHIFT+DEL استفاده کنید.';
 $messages['invalidrequest'] = 'درخواست نامعتبر! هیچ داده‌ای ذخیره نشد.';
 $messages['invalidhost'] = 'نام سرور غیرمعتبر.';
 $messages['nomessagesfound'] = 'هیچ پیغامی در این صندوق پیدا نشد.';
diff --git a/program/localization/fi_FI/labels.inc b/program/localization/fi_FI/labels.inc
index 99ccb24..ea856b3 100644
--- a/program/localization/fi_FI/labels.inc
+++ b/program/localization/fi_FI/labels.inc
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Luonnokset';
 $labels['sent']   = 'Lähetetyt';
 $labels['trash']  = 'Roskakori';
 $labels['junk']   = 'Roskaposti';
+$labels['show_real_foldernames'] = 'Show real names for special folders';
 
 // message listing
 $labels['subject'] = 'Aihe';
@@ -64,6 +65,7 @@ $labels['copy']     = 'Kopioi';
 $labels['move']     = 'Siirrä';
 $labels['moveto']   = 'siirrä kansioon...';
 $labels['download'] = 'lataa';
+$labels['open']     = 'Avaa';
 $labels['showattachment'] = 'Näytä';
 $labels['showanyway'] = 'Näytä silti';
 
@@ -161,6 +163,7 @@ $labels['currpage'] = 'Nykyinen sivu';
 $labels['unread'] = 'Lukemattomat';
 $labels['flagged'] = 'Korostettu';
 $labels['unanswered'] = 'Vastaamaton';
+$labels['withattachment'] = 'Liitteen kera';
 $labels['deleted'] = 'Poistettu';
 $labels['undeleted'] = 'Ei poistettu';
 $labels['invert'] = 'Käännä';
@@ -204,6 +207,8 @@ $labels['body']  = 'Runko';
 
 $labels['openinextwin'] = 'Avaa uudessa ikkunassa';
 $labels['emlsave'] = 'Tallenna (.eml)';
+$labels['changeformattext'] = 'Näytä raakatekstimuodossa';
+$labels['changeformathtml'] = 'Näytä HTML-muodossa';
 
 // message compose
 $labels['editasnew']      = 'Muokkaa uutena';
@@ -241,9 +246,9 @@ $labels['nosubject']  = '(ei otsikkoa)';
 $labels['showimages'] = 'Näytä kuvat';
 $labels['alwaysshow'] = 'Näytä aina lähettäjältä $sender saapuneet kuvat';
 $labels['isdraft']    = 'Tämä on luonnosviesti.';
-$labels['andnmore']   = '$nr more...';
+$labels['andnmore']   = '$nr lisää...';
 $labels['togglemoreheaders'] = 'Näytä lisää viestiotsakkeita';
-$labels['togglefullheaders'] = 'Toggle raw message headers';
+$labels['togglefullheaders'] = 'Viestin otsakkeet päällä/pois';
 
 $labels['htmltoggle'] = 'HTML';
 $labels['plaintoggle'] = 'Tavallinen teksti';
@@ -396,8 +401,9 @@ $labels['showinextwin'] = 'Avaa viesti uudessa ikkunassa';
 $labels['composeextwin'] = 'Lähetä viesti uudessa ikkunassa';
 $labels['htmleditor'] = 'Kirjoita HTML-muodossa';
 $labels['htmlonreply'] = 'Vain vastatessa HTML-viesteihin';
-$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
+$labels['htmlonreplyandforward'] = 'välittäessä tai vastatessa HTML-viestiin';
 $labels['htmlsignature'] = 'HTML-allekirjoitus';
+$labels['showemail'] = 'Näytä sähköpostiosoite näyttönimen kanssa';
 $labels['previewpane'] = 'Näytä esikatselulehti';
 $labels['skin'] = 'Käyttöliittymän teema';
 $labels['logoutclear'] = 'Tyhjennä roskakori kirjautuessa ulos';
@@ -451,9 +457,6 @@ $labels['replyremovesignature'] = 'Vastattaessa poista alkuperäinen allekirjoit
 $labels['autoaddsignature'] = 'Lisää allekirjoitus automaattisesti';
 $labels['newmessageonly'] = 'vain uuteen viestiin';
 $labels['replyandforwardonly'] = 'vain vastauksiin ja välityksiin';
-$labels['replysignaturepos'] = 'Vastattaessa tai välitettäessä laita allekirjoitus';
-$labels['belowquote'] = 'lainauksen alle';
-$labels['abovequote'] = 'lainauksen ylle';
 $labels['insertsignature'] = 'Lisää allekirjoitus';
 $labels['previewpanemarkread']  = 'Merkitse esikatsellut viestit luetuiksi';
 $labels['afternseconds']  = '$n sekunnin jälkeen';
@@ -470,6 +473,7 @@ $labels['spellcheckignorenums'] = 'Jätä huomiotta sanat, joissa on numeroita';
 $labels['spellcheckignorecaps'] = 'Jätä huomiotta sanat, joissa kaikki kirjaimet on isoja';
 $labels['addtodict'] = 'Lisää sanakirjaan';
 $labels['mailtoprotohandler'] = 'Rekisteröi mailto:-linkkien protokollakäsitteljä';
+$labels['standardwindows'] = 'Käsittele popup-ikkunoita tavallisina ikkunoina';
 $labels['forwardmode'] = 'Viestin välitys';
 $labels['inline'] = 'inline';
 $labels['asattachment'] = 'liitteenä';
diff --git a/program/localization/fi_FI/messages.inc b/program/localization/fi_FI/messages.inc
index 035ba41..3a8c393 100644
--- a/program/localization/fi_FI/messages.inc
+++ b/program/localization/fi_FI/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Tietokantavirhe!';
 $messages['requesttimedout'] = 'Pyyntö aikakatkaistiin';
 $messages['errorreadonly'] = 'Toiminnon suoritus ei onnistu, koska hakemisto on vain lukutilassa.';
 $messages['errornoperm'] = 'Toimintoa ei voitu suorittaa. Ei oikeuksia.';
+$messages['erroroverquota'] = 'Toiminnon suoritus epäonnistui. Levytila on loppu.';
+$messages['erroroverquotadelete'] = 'Levytila on loppu. Paina SHIFT+DEL poistaaksesi viestin.';
 $messages['invalidrequest'] = 'Virheellinen pyyntö! Tietoa ei tallennettu.';
 $messages['invalidhost'] = 'Virheellinen palvelinnimi.';
 $messages['nomessagesfound'] = 'Kansiossa ei ole sähköpostiviestejä';
diff --git a/program/localization/fr_FR/csv2vcard.inc b/program/localization/fr_FR/csv2vcard.inc
new file mode 100644
index 0000000..bb77001
--- /dev/null
+++ b/program/localization/fr_FR/csv2vcard.inc
@@ -0,0 +1,96 @@
+<?php
+
+/*
+ +-----------------------------------------------------------------------+
+ | localization/<lang>/csv2vcard.inc                                     |
+ |                                                                       |
+ | Localization file of the Roundcube Webmail client                     |
+ | Copyright (C) 2005-2013, The Roundcube Dev Team                       |
+ |                                                                       |
+ | Licensed under the GNU General Public License version 3 or            |
+ | any later version with exceptions for skins & plugins.                |
+ | See the README file for a full license statement.                     |
+ |                                                                       |
+ +-----------------------------------------------------------------------+
+ | Author: Aleksander Machniak <alec at alec.pl>                            |
+ +-----------------------------------------------------------------------+
+*/
+
+// This is a list of CSV column names specified in CSV file header
+// These must be original texts used in Outlook/Thunderbird exported csv files
+// Encoding UTF-8
+
+$map = array();
+
+// MS Outlook 2010
+$map['anniversary'] = "Anniversaire de mariage ou fête";
+$map['assistants_name'] = "Nom de l''assistant(e)";
+$map['assistants_phone'] = "Téléphone de l''assistant(e)";
+$map['birthday'] = "Anniversaire";
+$map['business_city'] = "Ville (bureau)";
+$map['business_countryregion'] = "Pays/Région (bureau)";
+$map['business_fax'] = "Télécopie (bureau)";
+$map['business_phone'] = "Téléphone (bureau)";
+$map['business_phone_2'] = "Téléphone 2 (bureau)";
+$map['business_postal_code'] = "Code postal (bureau)";
+$map['business_state'] = "Dép/Région (bureau)";
+$map['business_street'] = "Rue (bureau)";
+$map['car_phone'] = "Téléphone (voiture)";
+$map['categories'] = "Catégories";
+$map['company'] = "Société";
+$map['department'] = "Service";
+$map['email_address'] = "Adresse de messagerie";
+$map['first_name'] = "Prénom";
+$map['gender'] = "Sexe";
+$map['home_city'] = "Ville (domicile)";
+$map['home_countryregion'] = "Pays/Région (domicile)";
+$map['home_fax'] = "Télécopie (domicile)";
+$map['home_phone'] = "Téléphone (domicile)";
+$map['home_phone_2'] = "Téléphone 2 (domicile)";
+$map['home_postal_code'] = "Code postal (domicile)";
+$map['home_state'] = "Dép/Région (domicile)";
+$map['home_street'] = "Rue (domicile)";
+$map['job_title'] = "Profession";
+$map['last_name'] = "Nom";
+$map['managers_name'] = "Manager's Name";
+$map['middle_name'] = "Deuxième prénom";
+$map['mobile_phone'] = "Tél. mobile";
+$map['notes'] = "Notes";
+$map['other_city'] = "Ville (autre)";
+$map['other_countryregion'] = "Pays/Région (autre)";
+$map['other_fax'] = "Télécopie (autre)";
+$map['other_phone'] = "Téléphone (autre)";
+$map['other_postal_code'] = "Code postal (autre)";
+$map['other_state'] = "Dép/Région (autre)";
+$map['other_street'] = "Rue (autre)";
+$map['pager'] = "Récepteur de radiomessagerie";
+$map['primary_phone'] = "Téléphone principal";
+$map['spouse'] = "Conjoint(e)";
+$map['suffix'] = "Suffixe";
+$map['title'] = "Titre";
+$map['web_page'] = "Page Web";
+
+// Thunderbird
+$map['birth_day'] = "Jour";
+$map['birth_month'] = "Mois";
+$map['birth_year'] = "Année de naissance";
+$map['display_name'] = "Nom à afficher";
+$map['fax_number'] = "Fax";
+$map['home_address'] = "Adresse privée";
+$map['home_country'] = "Région";
+$map['home_zipcode'] = "Code postal";
+$map['mobile_number'] = "Portable";
+$map['nickname'] = "Surnom";
+$map['organization'] = "Société";
+$map['pager_number'] = "Pager";
+$map['primary_email'] = "Adresse électronique principale";
+$map['secondary_email'] = "Adresse électronique secondaire";
+$map['web_page_1'] = "Site Web 1";
+$map['web_page_2'] = "Site Web 2";
+$map['work_phone'] = "Tél. professionnel";
+$map['work_address'] = "Adresse professionnelle";
+$map['work_country'] = "Région";
+$map['work_zipcode'] = "Code postal";
+
+// Other
+$map['_home_city'] = "Ville";
diff --git a/program/localization/fr_FR/labels.inc b/program/localization/fr_FR/labels.inc
index 29e2c02..8331bbb 100644
--- a/program/localization/fr_FR/labels.inc
+++ b/program/localization/fr_FR/labels.inc
@@ -26,9 +26,9 @@ $labels['server']    = 'Serveur';
 $labels['login']     = 'Connexion';
 
 // taskbar
-$labels['logout']   = 'Quitter';
+$labels['logout']   = 'Déconnexion';
 $labels['mail']     = 'Courriel';
-$labels['settings'] = 'Préférences';
+$labels['settings'] = 'Paramètres';
 $labels['addressbook'] = 'Carnet d\'adresses';
 
 // mailbox names
@@ -37,6 +37,7 @@ $labels['drafts'] = 'Brouillons';
 $labels['sent']   = 'Messages envoyés';
 $labels['trash']  = 'Corbeille';
 $labels['junk']   = 'Indésirables';
+$labels['show_real_foldernames'] = 'Montrer les noms réels pour les dossiers spéciaux';
 
 // message listing
 $labels['subject'] = 'Objet';
@@ -64,6 +65,7 @@ $labels['copy']     = 'Copier';
 $labels['move']     = 'Déplacer';
 $labels['moveto']   = 'Déplacer vers...';
 $labels['download'] = 'Télécharger';
+$labels['open']     = 'Ouvrir';
 $labels['showattachment'] = 'Afficher';
 $labels['showanyway'] = 'Afficher quand même';
 
@@ -126,7 +128,7 @@ $labels['checkmail']        = 'Vérification des nouveaux messages';
 $labels['compose']          = 'Composer un nouveau message';
 $labels['writenewmessage']  = 'Écrire un nouveau message';
 $labels['reply']            = 'Répondre';
-$labels['replytomessage']   = 'Répondre au message';
+$labels['replytomessage']   = 'Répondre à l\'expéditeur';
 $labels['replytoallmessage'] = 'Répondre à tous';
 $labels['replyall']         = 'Répondre à tous';
 $labels['replylist']        = 'Répondre à la liste';
@@ -142,13 +144,13 @@ $labels['firstmessage']     = 'Voir le premier message';
 $labels['nextmessage']      = 'Voir le message suivant';
 $labels['lastmessage']      = 'Voir le dernier message';
 $labels['backtolist']       = 'Retourner à la liste des messages';
-$labels['viewsource']       = 'Voir le source';
+$labels['viewsource']       = 'Voir la source';
 $labels['mark']             = 'Marquer';
 $labels['markmessages']     = 'Marquer les messages';
-$labels['markread']         = 'Comme lus';
-$labels['markunread']       = 'Comme non lus';
-$labels['markflagged']      = 'Comme suivi';
-$labels['markunflagged']    = 'Comme non-suivi';
+$labels['markread']         = 'Comme lu(s)';
+$labels['markunread']       = 'Comme non lu(s)';
+$labels['markflagged']      = 'Comme suivi(s)';
+$labels['markunflagged']    = 'Comme non-suivi(s)';
 $labels['moreactions']      = 'Plus d\'actions...';
 $labels['more']             = 'Plus';
 $labels['back']             = 'Retour';
@@ -158,18 +160,19 @@ $labels['select'] = 'Sélectionner';
 $labels['all'] = 'Tous';
 $labels['none'] = 'Aucun';
 $labels['currpage'] = 'Page courante';
-$labels['unread'] = 'Non lus';
-$labels['flagged'] = 'Marqué';
-$labels['unanswered'] = 'Non répondu';
-$labels['deleted'] = 'Supprimé';
-$labels['undeleted'] = 'Non supprimé';
+$labels['unread'] = 'Non lu(s)';
+$labels['flagged'] = 'Marqué(s)';
+$labels['unanswered'] = 'Non répondu(s)';
+$labels['withattachment'] = 'Avec pièce jointe';
+$labels['deleted'] = 'Supprimé(s)';
+$labels['undeleted'] = 'Non supprimé(s)';
 $labels['invert'] = 'Inverser';
 $labels['filter'] = 'Filtre';
 $labels['list'] = 'Lister';
 $labels['threads'] = 'Sujets';
-$labels['expand-all'] = 'Afficher Tous';
-$labels['expand-unread'] = 'Afficher Non-lus';
-$labels['collapse-all'] = 'Fermer Tous';
+$labels['expand-all'] = 'Tout afficher';
+$labels['expand-unread'] = 'Afficher non-lu(s)';
+$labels['collapse-all'] = 'Fermer tous';
 $labels['threaded'] = 'Par sujet';
 
 $labels['autoexpand_threads'] = 'Développer les sujets';
@@ -188,7 +191,7 @@ $labels['listsorting'] = 'Colonne de tri';
 $labels['listorder'] = 'Ordre de tri';
 $labels['listmode'] = 'Mode d\'affichage de la liste';
 
-$labels['folderactions'] = 'Actions du dossier';
+$labels['folderactions'] = 'Actions du dossier...';
 $labels['compact'] = 'Compacter';
 $labels['empty'] = 'Vider';
 
@@ -204,12 +207,14 @@ $labels['body']  = 'Corps';
 
 $labels['openinextwin'] = 'Ouvrir dans une nouvelle fenêtre';
 $labels['emlsave'] = 'Télécharger (.eml)';
+$labels['changeformattext'] = 'Afficher au format texte';
+$labels['changeformathtml'] = 'Afficher au format HTML';
 
 // message compose
 $labels['editasnew']      = 'Éditer en tant que nouveau message';
 $labels['send']           = 'Envoyer';
-$labels['sendmessage']    = 'Envoyer';
-$labels['savemessage']    = 'Enregistrer';
+$labels['sendmessage']    = 'Envoyer un message';
+$labels['savemessage']    = 'Sauvegarder comme brouillon';
 $labels['addattachment']  = 'Joindre un fichier';
 $labels['charset']        = 'Encodage';
 $labels['editortype']     = 'Type d\'éditeur';
@@ -219,14 +224,14 @@ $labels['mailreplyintro'] = 'Le $date, $sender a écrit :';
 $labels['originalmessage'] = 'Message original';
 
 $labels['editidents']    = 'Modifier les identités';
-$labels['spellcheck']    = 'Vérifier l\'orthographe';
+$labels['spellcheck']    = 'Orthographe';
 $labels['checkspelling'] = 'Vérifier l\'orthographe';
 $labels['resumeediting'] = 'Retourner à l\'édition';
 $labels['revertto']      = 'Revenir à';
 
 $labels['attach'] = 'Joindre';
 $labels['attachments'] = 'Fichiers joints';
-$labels['upload'] = 'Joindre';
+$labels['upload'] = 'Transférer';
 $labels['uploadprogress'] = '$percent ($current sur $total)';
 $labels['close']  = 'Fermer';
 $labels['messageoptions']  = 'Options du message';
@@ -246,7 +251,7 @@ $labels['togglemoreheaders'] = 'Afficher plus d\'en-têtes du message';
 $labels['togglefullheaders'] = 'Afficher/Cacher l\'entête du message';
 
 $labels['htmltoggle'] = 'HTML';
-$labels['plaintoggle'] = 'texte brut';
+$labels['plaintoggle'] = 'Texte brut';
 $labels['savesentmessagein'] = 'Enregistrer le message envoyé dans';
 $labels['dontsave'] = 'ne pas enregistrer';
 $labels['maxuploadsize'] = 'La taille maximum autorisée pour un fichier est $size';
@@ -260,7 +265,7 @@ $labels['addfollowupto'] = 'Ajouter Faire suivre à';
 $labels['mdnrequest'] = 'L\'expéditeur de ce message a demandé d\'être prévenu quand vous lirez ce message. Souhaitez-vous prévenir l\'expéditeur ?';
 $labels['receiptread'] = 'Accusé de réception (lu)';
 $labels['yourmessage'] = 'Ceci est un accusé de réception pour votre message';
-$labels['receiptnote'] = 'Note : Cet accusé de réception indique seulement que le message a été affiché sur l\'ordinateur du destinataire. Il n\'y a aucune garantie que le destinataire a lu ou compris le contenu du message.';
+$labels['receiptnote'] = 'Note : Cet accusé de réception indique seulement que le message a été affiché sur l\'ordinateur du destinataire. Il n\'y a aucune garantie que le destinataire ait lu ou compris le contenu du message.';
 
 // address boook
 $labels['name']         = 'Nom à afficher';
@@ -271,9 +276,9 @@ $labels['nameprefix']   = 'Préfixe';
 $labels['namesuffix']   = 'Suffixe';
 $labels['nickname']     = 'Surnom';
 $labels['jobtitle']     = 'Fonction';
-$labels['department']   = 'Département';
+$labels['department']   = 'Service';
 $labels['gender']       = 'Sexe';
-$labels['maidenname']   = 'Nom de naissance';
+$labels['maidenname']   = 'Nom de jeune fille';
 $labels['email']        = 'Courriel';
 $labels['phone']        = 'Téléphone';
 $labels['address']      = 'Adresse';
@@ -314,7 +319,7 @@ $labels['typeblog'] = 'Blog';
 $labels['typeprofile'] = 'Profil';
 
 $labels['addfield'] = 'Ajouter un champ...';
-$labels['addcontact'] = 'Ajouter le contact sélectionné à votre Carnet d\'adresses';
+$labels['addcontact'] = 'Ajouter le contact sélectionné à votre carnet d\'adresses';
 $labels['editcontact'] = 'Modifier le contact';
 $labels['contacts'] = 'Contacts';
 $labels['contactproperties'] = 'Propriétés du contact';
@@ -327,7 +332,7 @@ $labels['delete'] = 'Supprimer';
 $labels['rename'] = 'Renommer';
 $labels['addphoto'] = 'Ajouter';
 $labels['replacephoto'] = 'Remplacer';
-$labels['uploadphoto'] = 'Envoyer une photo';
+$labels['uploadphoto'] = 'Transférer une photo';
 
 $labels['newcontact']     = 'Créer un nouveau contact';
 $labels['deletecontact']  = 'Supprimer les contacts sélectionnés';
@@ -341,7 +346,7 @@ $labels['exportvcards']   = 'Exporter les contacts au format vCard';
 $labels['newcontactgroup'] = 'Créer un nouveau groupe de contacts';
 $labels['grouprename']    = 'Renommer le groupe';
 $labels['groupdelete']    = 'Supprimer le groupe';
-$labels['groupremoveselected'] = 'Retiré les contacts sélectionnés du groupe';
+$labels['groupremoveselected'] = 'Retirer les contacts sélectionnés du groupe';
 
 $labels['previouspage']   = 'Montrer page précédente';
 $labels['firstpage']      = 'Voir la première page';
@@ -358,9 +363,9 @@ $labels['searchdelete'] = 'Supprimer la recherche';
 $labels['import'] = 'Importer';
 $labels['importcontacts'] = 'Importer les contacts';
 $labels['importfromfile'] = 'Importer depuis un fichier :';
-$labels['importtarget'] = 'Ajouter de nouveaux contact au carnet d’adresse :';
-$labels['importreplace'] = 'Remplacer le carnet d\'adresse entier';
-$labels['importdesc'] = 'Vous pouvez télécharger des contacts à partir d\'un carnet d\'adresses existant.<br/>Nous supportons actuellement l\'importation d\'adresses à partir des format de données <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ou CSV (comma -séparés).';
+$labels['importtarget'] = 'Ajouter de nouveaux contact au carnet d’adresses :';
+$labels['importreplace'] = 'Remplacer le carnet d\'adresses entier';
+$labels['importdesc'] = 'Vous pouvez transférer des contacts à partir d\'un carnet d\'adresses existant.<br/>Nous supportons actuellement l\'importation d\'adresses à partir des format de données <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ou CSV (champs séparés par une virgule).';
 $labels['done'] = 'Terminé';
 
 // settings
@@ -398,12 +403,13 @@ $labels['htmleditor'] = 'Composer un message au format HTML';
 $labels['htmlonreply'] = 'en réponse aux messages HTML uniquement';
 $labels['htmlonreplyandforward'] = 'Transférer ou répondre au message HTML';
 $labels['htmlsignature'] = 'Signature HTML';
+$labels['showemail'] = 'Montrer l\'adresse mail avec le nom complet';
 $labels['previewpane'] = 'Afficher le panneau d\'aperçu';
 $labels['skin'] = 'Thème de l\'interface';
 $labels['logoutclear'] = 'Vider la corbeille à la déconnexion';
 $labels['logoutcompact'] = 'Compacter la boite de réception à la déconnexion';
 $labels['uisettings'] = 'Interface utilisateur';
-$labels['serversettings'] = 'Préférences du serveur';
+$labels['serversettings'] = 'Paramètres du serveur';
 $labels['mailboxview'] = 'Vue du courrier';
 $labels['mdnrequests'] = 'Notifications à l\'expéditeur';
 $labels['askuser'] = 'demander à l\'utilisateur';
@@ -447,20 +453,17 @@ $labels['whenreplying'] = 'En répondant';
 $labels['replyempty'] = 'Ne pas citer le message original';
 $labels['replytopposting'] = 'commencer le nouveau message au-dessus de l\'original';
 $labels['replybottomposting'] = 'commencer le nouveau message en-dessous de l\'original';
-$labels['replyremovesignature'] = 'En répondant, supprimer la signature d\'origine du message';
+$labels['replyremovesignature'] = 'Supprimer la signature d\'origine du message lors de la réponse';
 $labels['autoaddsignature'] = 'Ajouter la signature automatiquement';
 $labels['newmessageonly'] = 'nouveau message uniquement';
 $labels['replyandforwardonly'] = 'réponses et transferts uniquement';
-$labels['replysignaturepos'] = 'En répondant ou en transférant, placer la signature';
-$labels['belowquote'] = 'en-dessous de la citation';
-$labels['abovequote'] = 'au-dessus de la citation';
 $labels['insertsignature'] = 'Insérer la signature';
 $labels['previewpanemarkread']  = 'Marquer les messages prévisualisés comme lus';
 $labels['afternseconds']  = 'après $n secondes';
 $labels['reqmdn'] = 'Toujours demander un avis de réception';
 $labels['reqdsn'] = 'Toujours demander une notification d\'état de distribution';
 $labels['replysamefolder'] = 'Placer les réponses dans le dossier du message auquel il est répondu';
-$labels['defaultabook'] = 'Carnet d\'adresse par défaut';
+$labels['defaultabook'] = 'Carnet d\'adresses par défaut';
 $labels['autocompletesingle'] = 'Ne pas tenir compte des adresses emails alternatives dans l\'autoremplissage';
 $labels['listnamedisplay'] = 'Lister les contacts comme';
 $labels['spellcheckbeforesend'] = 'Vérifier l’orthographe avant l’envoie d’un message';
@@ -470,6 +473,7 @@ $labels['spellcheckignorenums'] = 'Ignorer les mots avec des nombres';
 $labels['spellcheckignorecaps'] = 'Ignorer les mots entièrement en majuscule';
 $labels['addtodict'] = 'Ajouter au dictionnaire';
 $labels['mailtoprotohandler'] = 'Enregistrer le gestionnaire de protocole pour les liens mailto:';
+$labels['standardwindows'] = 'Manipuler les menus surgissants comme des fenêtres standards';
 $labels['forwardmode'] = 'Transfert des messages';
 $labels['inline'] = 'dans le corps';
 $labels['asattachment'] = 'en pièce jointe';
@@ -505,7 +509,7 @@ $labels['plugin'] = 'Plugin';
 $labels['version'] = 'Version';
 $labels['source'] = 'Source';
 $labels['license'] = 'Licence';
-$labels['support'] = 'Support';
+$labels['support'] = 'Obtenir un support technique';
 
 // units
 $labels['B'] = 'o';
diff --git a/program/localization/fr_FR/messages.inc b/program/localization/fr_FR/messages.inc
index bd3fd20..8de50e9 100644
--- a/program/localization/fr_FR/messages.inc
+++ b/program/localization/fr_FR/messages.inc
@@ -18,148 +18,150 @@
 
 $messages = array();
 $messages['errortitle']  = 'Une erreur est survenue !';
-$messages['loginfailed']  = 'L\'authentification a échoué';
-$messages['cookiesdisabled'] = 'Votre navigateur n\'accepte pas les cookies';
-$messages['sessionerror'] = 'Votre session est invalide ou a expiré';
-$messages['storageerror'] = 'Erreur de connexion au serveur IMAP';
+$messages['loginfailed']  = 'L\'authentification a échoué.';
+$messages['cookiesdisabled'] = 'Votre navigateur n\'accepte pas les cookies.';
+$messages['sessionerror'] = 'Votre session est invalide ou a expiré.';
+$messages['storageerror'] = 'Erreur de connexion au serveur IMAP.';
 $messages['servererror'] = 'Erreur Serveur !';
-$messages['servererrormsg'] = 'Erreur du serveur: $msg';
-$messages['dberror'] = 'Erreur avec la base de donnée!';
+$messages['servererrormsg'] = 'Erreur du serveur : $msg';
+$messages['dberror'] = 'Erreur avec la base de données !';
 $messages['requesttimedout'] = 'Délai de la requête expiré';
-$messages['errorreadonly'] = 'Impossible d\'effectuer cette opération. Le dossier est en lecture seule';
-$messages['errornoperm'] = 'Impossible d\'effectuer cette opération. Permission refusée';
+$messages['errorreadonly'] = 'Impossible d\'effectuer cette opération. Le dossier est en lecture seule.';
+$messages['errornoperm'] = 'Impossible d\'effectuer cette opération. Permission refusée.';
+$messages['erroroverquota'] = 'Impossible d\'effectuer cette opération. Plus d\'espace libre.';
+$messages['erroroverquotadelete'] = 'Plus d\'espace libre. Utilisez SHIFT+DEL pour supprimer un message.';
 $messages['invalidrequest'] = 'Requête invalide ! Aucune donnée n\'a été sauvegardée.';
 $messages['invalidhost'] = 'Nom du serveur invalide.';
 $messages['nomessagesfound'] = 'Cette boîte aux lettres ne contient aucun message.';
-$messages['loggedout'] = 'Vous venez de vous déconnecter avec succès. Au revoir !';
+$messages['loggedout'] = 'Vous vous êtes correctement déconnecté. Au revoir !';
 $messages['mailboxempty'] = 'La boîte aux lettres est vide.';
 $messages['refreshing'] = 'Rafraîchissement en cours...';
-$messages['loading'] = 'Chargement...';
-$messages['uploading'] = 'Envoi du fichier...';
-$messages['uploadingmany'] = 'Envoi des fichiers ...';
-$messages['loadingdata'] = 'Chargement des données...';
+$messages['loading'] = 'Chargement en cours...';
+$messages['uploading'] = 'Transfert du fichier en cours...';
+$messages['uploadingmany'] = 'Transfert des fichiers en cours...';
+$messages['loadingdata'] = 'Chargement des données en cours...';
 $messages['checkingmail'] = 'Vérification des nouveaux messages...';
-$messages['sendingmessage'] = 'Expédition du message...';
-$messages['messagesent'] = 'Message expédié.';
-$messages['savingmessage'] = 'Sauvegarde du message...';
-$messages['messagesaved'] = 'Message sauvegardé dans Brouillons';
-$messages['successfullysaved'] = 'Sauvegarde effectuée';
-$messages['addedsuccessfully'] = 'Contact ajouté dans le carnet d\'adresses';
-$messages['contactexists'] = 'Cette adresse courriel est utilisée par un autre contact';
+$messages['sendingmessage'] = 'Envoi du message en cours...';
+$messages['messagesent'] = 'Le message a bien été expédié.';
+$messages['savingmessage'] = 'Sauvegarde du message en cours...';
+$messages['messagesaved'] = 'Message sauvegardé dans Brouillons.';
+$messages['successfullysaved'] = 'La sauvegarde a bien été effectuée.';
+$messages['addedsuccessfully'] = 'Le contact a bien été ajouté dans le carnet d\'adresses.';
+$messages['contactexists'] = 'Cette adresse courriel est utilisée par un autre contact.';
 $messages['contactnameexists'] = 'Il existe déjà un contact nommé ainsi.';
 $messages['blockedimages'] = 'Les images distantes sont bloquées pour protéger votre vie privée.';
 $messages['encryptedmessage'] = 'Désolé, ce message est chiffré et ne peut être affiché.';
-$messages['nocontactsfound'] = 'Aucun contact n\'a pu être trouvé';
+$messages['nocontactsfound'] = 'Aucun contact n\'a pu être trouvé.';
 $messages['contactnotfound'] = 'Le contact demandé n\'a pas été trouvé.';
-$messages['contactsearchonly'] = 'Entrez un ou plusieurs mots clés pour trouver des contacts';
-$messages['sendingfailed'] = 'L\'envoi du message a échoué';
-$messages['senttooquickly'] = 'Vous devez attendre $sec s. pour envoyer le message';
-$messages['errorsavingsent'] = 'Une erreur est survenue pendant la sauvegarde du message envoyé';
-$messages['errorsaving'] = 'Une erreur a empêché la sauvegarde';
-$messages['errormoving'] = 'Impossible de déplacer le message';
-$messages['errorcopying'] = 'La copie de ce(s) message(s) a échoué.';
-$messages['errordeleting'] = 'Impossible d\'effacer le message';
-$messages['errormarking'] = 'Impossible de marquer le message';
+$messages['contactsearchonly'] = 'Entrez un ou plusieurs mots clés pour trouver des contacts.';
+$messages['sendingfailed'] = 'L\'envoi du message a échoué.';
+$messages['senttooquickly'] = 'Veuillez patienter $sec s. pour envoyer ce message.';
+$messages['errorsavingsent'] = 'Une erreur est survenue pendant la sauvegarde du message envoyé.';
+$messages['errorsaving'] = 'Une erreur est survenue pendant la sauvegarde.';
+$messages['errormoving'] = 'Impossible de déplacer le(s) message(s).';
+$messages['errorcopying'] = 'Impossible de copier le(s) message(s).';
+$messages['errordeleting'] = 'Impossible de supprimer le(s) message(s).';
+$messages['errormarking'] = 'Impossible de marquer le(s) message(s).';
 $messages['deletecontactconfirm']  = 'Êtes-vous sûr de vouloir supprimer le(s) contact(s) sélectionné(s) ?';
 $messages['deletegroupconfirm']  = 'Êtes-vous sûr de vouloir supprimer le groupe sélectionné ?';
 $messages['deletemessagesconfirm'] = 'Êtes-vous sûr de vouloir supprimer le(s) message(s) sélectionné(s) ?';
 $messages['deletefolderconfirm']  = 'Êtes-vous sûr de vouloir supprimer ce dossier ?';
 $messages['purgefolderconfirm']  = 'Êtes-vous sûr de vouloir supprimer tous les messages de ce dossier ?';
-$messages['contactdeleting'] = 'Suppression de contact(s)...';
-$messages['groupdeleting'] = 'Suppression du groupe ...';
+$messages['contactdeleting'] = 'Suppression de contact(s) en cours...';
+$messages['groupdeleting'] = 'Suppression du groupe...';
 $messages['folderdeleting'] = 'Suppression du dossier...';
 $messages['foldermoving'] = 'Déplacement du dossier...';
 $messages['foldersubscribing'] = 'Inscription du dossier...';
 $messages['folderunsubscribing'] = 'Désinscription du dossier...';
-$messages['formincomplete'] = 'Le formulaire n\'a pas été entièrement rempli';
-$messages['noemailwarning'] = 'Veuillez spécifier un courriel valide';
-$messages['nonamewarning']  = 'Veuillez fournir un nom';
-$messages['nopagesizewarning'] = 'Veuillez indiquer une taille de page';
-$messages['nosenderwarning'] = 'Veuillez renseigner l\'adresse d\'expéditeur';
-$messages['norecipientwarning'] = 'Veuillez ajouter au moins un destinataire';
+$messages['formincomplete'] = 'Le formulaire n\'a pas été entièrement rempli.';
+$messages['noemailwarning'] = 'Veuillez spécifier un courriel valide.';
+$messages['nonamewarning']  = 'Veuillez fournir un nom.';
+$messages['nopagesizewarning'] = 'Veuillez indiquer une taille de page.';
+$messages['nosenderwarning'] = 'Veuillez renseigner l\'adresse d\'expéditeur.';
+$messages['norecipientwarning'] = 'Veuillez ajouter au moins un destinataire.';
 $messages['nosubjectwarning']  = 'Le champ «Objet» est vide. Souhaitez-vous le renseigner maintenant ?';
 $messages['nobodywarning'] = 'Envoyer ce message sans texte ?';
 $messages['notsentwarning'] = 'Le message n\'a pas été envoyé. Voulez-vous abandonner ce message ?';
-$messages['noldapserver'] = 'Choisissez un serveur LDAP pour la recherche';
-$messages['nosearchname'] = 'Entrez un nom de contact ou un courriel';
-$messages['notuploadedwarning'] = 'Certaines pièces jointes sont en cours d\'expédition : attendez ou annulez l\'envoi.';
-$messages['searchsuccessful'] = '$nr messages trouvés';
+$messages['noldapserver'] = 'Choisissez un serveur LDAP pour la recherche.';
+$messages['nosearchname'] = 'Entrez un nom de contact ou un courriel.';
+$messages['notuploadedwarning'] = 'Toutes les pièces jointes n\'ont pas encore été transférées. Veuillez patienter ou annuler cette opération.';
+$messages['searchsuccessful'] = '$nr message(s) trouvé(s).';
 $messages['contactsearchsuccessful'] = '$nr contact(s) trouvé(s).';
-$messages['searchnomatch'] = 'La recherche ne donne aucun résultat';
-$messages['searching'] = 'En cours de recherche...';
-$messages['checking'] = 'Vérification...';
-$messages['nospellerrors'] = 'Aucune faute trouvée';
-$messages['folderdeleted'] = 'Dossier effacé';
-$messages['foldersubscribed'] = 'Le dossier a bien été inscrit';
-$messages['folderunsubscribed'] = 'Le dossier a bien été désinscrit';
-$messages['folderpurged'] = 'Le dossier a bien été vidé';
-$messages['folderexpunged'] = 'Le dossier a bien été compacté';
-$messages['deletedsuccessfully'] = 'Supprimé(s) avec succès';
+$messages['searchnomatch'] = 'La recherche n\'a donné aucun résultat.';
+$messages['searching'] = 'Recherche en cours...';
+$messages['checking'] = 'Vérification en cours...';
+$messages['nospellerrors'] = 'Aucune faute d\'orthographe trouvée.';
+$messages['folderdeleted'] = 'Le dossier a bien été effacé.';
+$messages['foldersubscribed'] = 'Le dossier a bien été inscrit.';
+$messages['folderunsubscribed'] = 'Le dossier a bien été désinscrit.';
+$messages['folderpurged'] = 'Le dossier a bien été vidé.';
+$messages['folderexpunged'] = 'Le dossier a bien été compacté.';
+$messages['deletedsuccessfully'] = 'Correctement supprimé(s).';
 $messages['converting'] = 'Suppression de la mise en forme...';
-$messages['messageopenerror'] = 'Impossible de charger le message depuis serveur';
+$messages['messageopenerror'] = 'Impossible de charger le message depuis serveur.';
 $messages['fileuploaderror'] = 'Transfert du fichier échoué';
-$messages['filesizeerror'] = 'Le fichier transféré dépasse la taille maximale de $size';
-$messages['copysuccess'] = 'Succès de la copie des $nr adresses';
-$messages['copyerror'] = 'Ne peut pas copier les adresses';
-$messages['sourceisreadonly'] = 'Cette source d\'adresse est en lecture seule';
-$messages['errorsavingcontact'] = 'Ne peut pas enregistrer l\'adresse du contact';
-$messages['movingmessage'] = 'Déplacement du message...';
-$messages['copyingmessage'] = 'Copie du message ...';
-$messages['copyingcontact'] = 'Copie des contacts ...';
-$messages['deletingmessage'] = 'Suppression des messages...';
-$messages['markingmessage'] = 'Marquage des messages...';
-$messages['addingmember'] = 'Ajout des contacts dans le groupe ...';
-$messages['removingmember'] = 'Suppression des contacts du groupe ...';
-$messages['receiptsent'] = 'L\'accusé de réception a bien été envoyé';
-$messages['errorsendingreceipt'] = 'L\'accusé de réception n\'a pas pu être envoyé';
-$messages['deleteidentityconfirm'] = 'Voulez vous vraiment supprimer cette identités ?';
+$messages['filesizeerror'] = 'Le fichier transféré dépasse la taille maximale de $size.';
+$messages['copysuccess'] = 'Les $nr adresses ont bien été copiées.';
+$messages['copyerror'] = 'Impossible de copier des adresses.';
+$messages['sourceisreadonly'] = 'Cette source d\'adresse est en lecture seule.';
+$messages['errorsavingcontact'] = 'Impossible de sauvegarder l\'adresse du contact.';
+$messages['movingmessage'] = 'Message(s) en cours de déplacement...';
+$messages['copyingmessage'] = 'Message(s) en cours de copie...';
+$messages['copyingcontact'] = 'Contact(s) en cours de copie...';
+$messages['deletingmessage'] = 'Message(s) en cours de suppression...';
+$messages['markingmessage'] = 'Message(s) en cours de marquage...';
+$messages['addingmember'] = 'Contact(s) en cours d\'ajout dans le groupe...';
+$messages['removingmember'] = 'Contact(s) en cours de suppression du groupe...';
+$messages['receiptsent'] = 'L\'accusé de réception a bien été envoyé.';
+$messages['errorsendingreceipt'] = 'Impossible d\'envoyer l\'accusé de réception.';
+$messages['deleteidentityconfirm'] = 'Voulez vous vraiment supprimer cette identité ?';
 $messages['nodeletelastidentity'] = 'Vous ne pouvez pas effacer votre seule identité.';
-$messages['forbiddencharacter'] = 'Le nom du dossier contient un caractère interdit';
-$messages['selectimportfile'] = 'Veuillez sélectionner un fichier à envoyer';
-$messages['addresswriterror'] = 'Impossible d\'écrire dans le carnet d\'adresse sélectionné';
-$messages['contactaddedtogroup'] = 'Les contacts ont bien été ajoutés à ce groupe';
-$messages['contactremovedfromgroup'] = 'Les contacts ont bien été supprimés de ce groupe';
+$messages['forbiddencharacter'] = 'Le nom du dossier contient un caractère interdit.';
+$messages['selectimportfile'] = 'Veuillez sélectionner un fichier à transférer.';
+$messages['addresswriterror'] = 'Impossible d\'écrire dans le carnet d\'adresse sélectionné.';
+$messages['contactaddedtogroup'] = 'Les contacts ont bien été ajoutés à ce groupe.';
+$messages['contactremovedfromgroup'] = 'Les contacts ont bien été supprimés de ce groupe.';
 $messages['nogroupassignmentschanged'] = 'Appartenance aux groupes inchangée.';
-$messages['importwait'] = 'Importation, veuillez patienter...';
-$messages['importformaterror'] = 'Echec de l\'import ! Le fichier n\'est pas un fichier d\'import de données valide.';
-$messages['importconfirm'] = '<b>$inserted contacts importés avec succès, $skipped entrées existantes ignorées</b>:<p><em>$names</em></p>';
+$messages['importwait'] = 'Import en cours, veuillez patienter...';
+$messages['importformaterror'] = 'L\'import a échoué ! Le fichier transféré n\'est pas un fichier d\'import de données valide.';
+$messages['importconfirm'] = '<b>Les $inserted contacts ont bien été importés</b>';
 $messages['importconfirmskipped'] = '<b>$skipped entrée(s) déjà existante(s)</b>';
 $messages['opnotpermitted'] = 'Cette opération n\'est pas permise !';
-$messages['nofromaddress'] = 'Il manque une adresse e-mail dans l\'identité sélectionnée';
-$messages['editorwarning'] = 'Passer à l\'éditeur texte seul causera la perte du formatage du texte. Voulez-vous continuer ?';
+$messages['nofromaddress'] = 'Courriel manquant dans l\'identité sélectionnée.';
+$messages['editorwarning'] = 'Passer à l\'éditeur de texte brut causera la perte du formatage du texte. Souhaitez-vous continuer ?';
 $messages['httpreceivedencrypterror'] = 'Une erreur fatale de configuration est survenue. Veuillez contacter votre administrateur immédiatement. <b>Votre message n\'a pas pu être envoyé.</b>';
-$messages['smtpconnerror'] = 'Erreur SMTP ($code): Echec de la connexion au serveur';
-$messages['smtpautherror'] = 'Erreur SMTP ($code): Echec de l\'authentification';
-$messages['smtpfromerror'] = 'Erreur SMTP ($code): Impossible de définir l\'expéditeur "$from" ($msg)';
-$messages['smtptoerror'] = 'Erreur SMTP ($code): Impossible d\'ajouter le destinataire "$to" ($msg)';
-$messages['smtprecipientserror'] = 'Erreur SMTP: Impossible de lire la liste des destinataires';
-$messages['smtperror'] = 'Erreur SMTP: $msg';
-$messages['emailformaterror'] = 'Adresse email incorrecte: $email';
+$messages['smtpconnerror'] = 'Erreur SMTP ($code) : Échec de la connexion au serveur.';
+$messages['smtpautherror'] = 'Erreur SMTP ($code) : Échec de l\'authentification.';
+$messages['smtpfromerror'] = 'Erreur SMTP ($code) : Impossible de définir l\'expéditeur "$from" ($msg)';
+$messages['smtptoerror'] = 'Erreur SMTP ($code) : Impossible d\'ajouter le destinataire "$to" ($msg)';
+$messages['smtprecipientserror'] = 'Erreur SMTP : Impossible de lire la liste des destinataires.';
+$messages['smtperror'] = 'Erreur SMTP : $msg';
+$messages['emailformaterror'] = 'Courriel incorrect : $email';
 $messages['toomanyrecipients'] = 'Trop de destinataires. Réduisez leur nombre à $max maximum.';
 $messages['maxgroupmembersreached'] = 'Le nombre de membres du groupe dépasse le maximum de $max.';
-$messages['internalerror'] = 'Une erreur interne est survenue. Merci de réessayer';
-$messages['contactdelerror'] = 'Les contacts n\'ont pas pu être supprimés';
-$messages['contactdeleted'] = 'Les contacts ont bien été supprimés';
-$messages['contactrestoreerror'] = 'Impossible de restaurer les contacts supprimés.';
-$messages['contactrestored'] = 'Les contacts ont bien été restaurés.';
-$messages['groupdeleted'] = 'Le groupe a bien été supprimé';
-$messages['grouprenamed'] = 'Le groupe a bien été renommé';
-$messages['groupcreated'] = 'Le groupe a bien été créé';
+$messages['internalerror'] = 'Une erreur interne est survenue. Veuillez réessayer.';
+$messages['contactdelerror'] = 'Impossible de supprimer le(s) contact(s).';
+$messages['contactdeleted'] = 'Contact(s) correctement supprimé(s).';
+$messages['contactrestoreerror'] = 'Impossible de restaurer le(s) contact(s) supprimé(s).';
+$messages['contactrestored'] = 'Contact(s) correctement restauré(s).';
+$messages['groupdeleted'] = 'Le groupe a bien été supprimé.';
+$messages['grouprenamed'] = 'Le groupe a bien été renommé.';
+$messages['groupcreated'] = 'Le groupe a bien été créé.';
 $messages['savedsearchdeleted'] = 'La recherche enregistrée a bien été supprimée.';
 $messages['savedsearchdeleteerror'] = 'Impossible de supprimer la recherche enregistrée.';
-$messages['savedsearchcreated'] = 'La recherche enregistrée a bien été crée.';
+$messages['savedsearchcreated'] = 'La recherche enregistrée a bien été créée.';
 $messages['savedsearchcreateerror'] = 'Impossible de créer la recherche enregistrée.';
-$messages['messagedeleted'] = 'Les messages ont bien été supprimés';
-$messages['messagemoved'] = 'Les messages ont bien été déplacés';
-$messages['messagecopied'] = 'Les messages ont bien été copiés';
-$messages['messagemarked'] = 'Les messages ont bien été marqués';
-$messages['autocompletechars'] = 'Entrez au moins $min caractères pour l\'auto-complétion';
-$messages['autocompletemore'] = 'Plusieurs entrées trouvées. Tapez plus de caractères.';
-$messages['namecannotbeempty'] = 'Le nom ne peut pas être vide';
-$messages['nametoolong'] = 'Le nom est trop long';
-$messages['folderupdated'] = 'Le dossier a bien été mis à jour';
-$messages['foldercreated'] = 'Le dossier a bien été créé';
-$messages['invalidimageformat'] = 'Format d\'image invalide';
+$messages['messagedeleted'] = 'Message(s) correctement supprimé(s).';
+$messages['messagemoved'] = 'Message(s) correctement déplacé(s).';
+$messages['messagecopied'] = 'Message(s) correctement copié(s).';
+$messages['messagemarked'] = 'Message(s) correctement marqué(s).';
+$messages['autocompletechars'] = 'Entrez au moins $min caractères pour l\'auto-complétion.';
+$messages['autocompletemore'] = 'Plusieurs entrées trouvées. Veuillez taper plus de caractères.';
+$messages['namecannotbeempty'] = 'Le nom ne peut pas être vide.';
+$messages['nametoolong'] = 'Le nom est trop long.';
+$messages['folderupdated'] = 'Le dossier a bien été mis à jour.';
+$messages['foldercreated'] = 'Le dossier a bien été créé.';
+$messages['invalidimageformat'] = 'Format d\'image invalide.';
 $messages['mispellingsfound'] = 'Des fautes d\'orthographe ont été détectées dans le message.';
 $messages['parentnotwritable'] = 'Impossible de créer/déplacer le dossier dans le dossier parent sélectionné. Aucun droit d\'accès.';
 $messages['messagetoobig'] = 'Le message est trop gros pour être traité.';
diff --git a/program/localization/fy_NL/labels.inc b/program/localization/fy_NL/labels.inc
index cd61546..891371f 100644
--- a/program/localization/fy_NL/labels.inc
+++ b/program/localization/fy_NL/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Kopieare';
 $labels['move']     = 'Ferplaatse';
 $labels['moveto']   = 'Move to...';
 $labels['download'] = 'Delhelje';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Toane';
 $labels['showanyway'] = 'Show it anyway';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Current page';
 $labels['unread'] = 'Unread';
 $labels['flagged'] = 'Flagged';
 $labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Deleted';
 $labels['undeleted'] = 'Not deleted';
 $labels['invert'] = 'Invert';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'Open in new window';
 $labels['emlsave'] = 'Download (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Edit as new';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Compose HTML messages';
 $labels['htmlonreply'] = 'on reply to HTML message';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'HTML signature';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Show preview pane';
 $labels['skin'] = 'Interface skin';
 $labels['logoutclear'] = 'Clear Trash on logout';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
 $labels['autoaddsignature'] = 'Automatically add signature';
 $labels['newmessageonly'] = 'new message only';
 $labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
 $labels['insertsignature'] = 'Insert signature';
 $labels['previewpanemarkread']  = 'Mark previewed messages as read';
 $labels['afternseconds']  = 'after $n seconds';
diff --git a/program/localization/ga_IE/labels.inc b/program/localization/ga_IE/labels.inc
index 795295e..9f0da65 100755
--- a/program/localization/ga_IE/labels.inc
+++ b/program/localization/ga_IE/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'Cóipeáil';
 $labels['move']     = 'Bog';
 $labels['moveto']   = 'bog go...';
 $labels['download'] = 'síos-luchtú';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Show';
 $labels['showanyway'] = 'Show it anyway';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Current page';
 $labels['unread'] = 'Na rudaí nach bhuil corraithe';
 $labels['flagged'] = 'Flagged';
 $labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Deleted';
 $labels['undeleted'] = 'Not deleted';
 $labels['invert'] = 'Invert';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'Open in new window';
 $labels['emlsave'] = 'Download (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Edit as new';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'Scríobh teachtaireachta HTML';
 $labels['htmlonreply'] = 'on reply to HTML message';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'Mana clabhsúir HTML';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Taispeáin an pána réamhamharc';
 $labels['skin'] = 'Interface skin';
 $labels['logoutclear'] = 'Clear Trash on logout';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
 $labels['autoaddsignature'] = 'Automatically add signature';
 $labels['newmessageonly'] = 'new message only';
 $labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
 $labels['insertsignature'] = 'Insert signature';
 $labels['previewpanemarkread']  = 'Mark previewed messages as read';
 $labels['afternseconds']  = 'after $n seconds';
diff --git a/program/localization/ga_IE/messages.inc b/program/localization/ga_IE/messages.inc
index 140b886..70aa28a 100755
--- a/program/localization/ga_IE/messages.inc
+++ b/program/localization/ga_IE/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
 $messages['requesttimedout'] = 'Request timed out';
 $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
 $messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'Invalid request! No data was saved.';
 $messages['invalidhost'] = 'Invalid server name.';
 $messages['nomessagesfound'] = 'Ní bhfuair mé aon teachtaireacht i bosca postas seo';
diff --git a/program/localization/gl_ES/labels.inc b/program/localization/gl_ES/labels.inc
index 3c5b600..5905ea4 100644
--- a/program/localization/gl_ES/labels.inc
+++ b/program/localization/gl_ES/labels.inc
@@ -41,7 +41,7 @@ $labels['junk']   = 'Correo lixo';
 // message listing
 $labels['subject'] = 'Asunto';
 $labels['from']    = 'Remitente';
-$labels['sender']  = 'Sender';
+$labels['sender']  = 'Remitente';
 $labels['to']      = 'Destinatario';
 $labels['cc']      = 'Copia (Cc)';
 $labels['bcc']     = 'Copia oculta (Cco)';
@@ -58,14 +58,15 @@ $labels['mailboxlist'] = 'Cartafoles';
 $labels['messagesfromto'] = 'Mensaxes da $from á $to de $count';
 $labels['threadsfromto'] = 'Fíos do $from ao $to de $count';
 $labels['messagenrof'] = 'Mensaxe $nr de $count';
-$labels['fromtoshort'] = '$from – $to of $count';
+$labels['fromtoshort'] = '$from - $to de $count';
 
 $labels['copy']     = 'Copiar';
 $labels['move']     = 'Mover';
 $labels['moveto']   = 'Mover a...';
 $labels['download'] = 'Descargar';
-$labels['showattachment'] = 'Show';
-$labels['showanyway'] = 'Show it anyway';
+$labels['open']     = 'Abrir';
+$labels['showattachment'] = 'Amosar';
+$labels['showanyway'] = 'Amosala de tódolos xeitos';
 
 $labels['filename'] = 'Nome de ficheiro';
 $labels['filesize'] = 'Tamaño de ficheiro';
@@ -130,7 +131,7 @@ $labels['replytomessage']   = 'Respostar a mensaxe';
 $labels['replytoallmessage'] = 'Respostar á lista ou ao remitente e a tódolos destinatarios';
 $labels['replyall']         = 'Respostar a todos';
 $labels['replylist']        = 'Respostar á lista de correo';
-$labels['forward']          = 'Forward';
+$labels['forward']          = 'Reenviar';
 $labels['forwardinline']    = 'Reenviar inserido';
 $labels['forwardattachment'] = 'Reenviar como anexo';
 $labels['forwardmessage']   = 'Reenviar a mensaxe';
@@ -143,7 +144,7 @@ $labels['nextmessage']      = 'Amosar a seguinte mensaxe';
 $labels['lastmessage']      = 'Amosar a última mensaxe';
 $labels['backtolist']       = 'Voltar á lista de mensaxes';
 $labels['viewsource']       = 'Ver código fonte';
-$labels['mark']             = 'Mark';
+$labels['mark']             = 'Marcar';
 $labels['markmessages']     = 'Marcar mensaxes';
 $labels['markread']         = 'Como lidas';
 $labels['markunread']       = 'Como non lidas';
@@ -161,8 +162,9 @@ $labels['currpage'] = 'Páxina actual';
 $labels['unread'] = 'Non lidas';
 $labels['flagged'] = 'Marcadas';
 $labels['unanswered'] = 'Non respostadas';
+$labels['withattachment'] = 'Con anexo';
 $labels['deleted'] = 'Marcadas como eliminadas';
-$labels['undeleted'] = 'Not deleted';
+$labels['undeleted'] = 'Non borradas';
 $labels['invert'] = 'Inverter';
 $labels['filter'] = 'Filtrar';
 $labels['list'] = 'Lista';
@@ -200,14 +202,16 @@ $labels['quicksearch']  = 'Busca rápida';
 $labels['resetsearch']  = 'Restablecer a busca';
 $labels['searchmod']  = 'Modificadores de busca';
 $labels['msgtext']  = 'Mensaxe enteira';
-$labels['body']  = 'Body';
+$labels['body']  = 'Corpo';
 
 $labels['openinextwin'] = 'Abrir nunha nova fiestra';
 $labels['emlsave'] = 'Gardar (.eml)';
+$labels['changeformattext'] = 'Amosar en texto plano';
+$labels['changeformathtml'] = 'Amosar en HTML';
 
 // message compose
 $labels['editasnew']      = 'Editar como nova';
-$labels['send']           = 'Send';
+$labels['send']           = 'Enviar';
 $labels['sendmessage']    = 'Enviar a mensaxe agora';
 $labels['savemessage']    = 'Gardar a mensaxe como borrador';
 $labels['addattachment']  = 'Anexar un ficheiro';
@@ -219,12 +223,12 @@ $labels['mailreplyintro'] = 'O $date, $sender escribiu:';
 $labels['originalmessage'] = 'Mensaxe orixinal';
 
 $labels['editidents']    = 'Modificar identidades';
-$labels['spellcheck']    = 'Spell';
+$labels['spellcheck']    = 'Ortografía';
 $labels['checkspelling'] = 'Revisar a ortografía';
 $labels['resumeediting'] = 'Voltar á edición';
 $labels['revertto']      = 'Voltar a';
 
-$labels['attach'] = 'Attach';
+$labels['attach'] = 'Anexar';
 $labels['attachments'] = 'Ficheiros anexos';
 $labels['upload'] = 'Cargar';
 $labels['uploadprogress'] = '$percent ($current de $total)';
@@ -241,9 +245,9 @@ $labels['nosubject']  = '(Sen asunto)';
 $labels['showimages'] = 'Amosar as imaxes';
 $labels['alwaysshow'] = 'Amosar sempre as imaxes nas mensaxes de $sender';
 $labels['isdraft']    = 'Esta mensaxe é un borrador';
-$labels['andnmore']   = '$nr more...';
-$labels['togglemoreheaders'] = 'Show more message headers';
-$labels['togglefullheaders'] = 'Toggle raw message headers';
+$labels['andnmore']   = '$nr máis...';
+$labels['togglemoreheaders'] = 'Amosar máis cabecerias';
+$labels['togglefullheaders'] = 'Conmutar cabeceiras en bruto';
 
 $labels['htmltoggle'] = 'HTML';
 $labels['plaintoggle'] = 'Só texto';
@@ -335,13 +339,13 @@ $labels['composeto']      = 'Redactar mensaxe para';
 $labels['contactsfromto'] = 'Contactos do $from ao $to de $count';
 $labels['print']          = 'Imprimir';
 $labels['export']         = 'Exportar';
-$labels['exportall']      = 'Export all';
-$labels['exportsel']      = 'Export selected';
+$labels['exportall']      = 'Exportar todas';
+$labels['exportsel']      = 'Exportar as seleccionadas';
 $labels['exportvcards']   = 'Exportar os contactos en formato vCard';
 $labels['newcontactgroup'] = 'Crear novo grupo de contactos';
 $labels['grouprename']    = 'Mudar o nome do grupo';
 $labels['groupdelete']    = 'Borrar o grupo';
-$labels['groupremoveselected'] = 'Remove selected contacts from group';
+$labels['groupremoveselected'] = 'Eliminar do grupo os contactos seleccionados';
 
 $labels['previouspage']   = 'Amosar o grupo anterior';
 $labels['firstpage']      = 'Amosar o primeiro grupo';
@@ -360,7 +364,7 @@ $labels['importcontacts'] = 'Importar contactos';
 $labels['importfromfile'] = 'Importar desde ficheiro:';
 $labels['importtarget'] = 'Engadir contactos ao caderno de enderezos:';
 $labels['importreplace'] = 'Substituír completamente o caderno de enderezos';
-$labels['importdesc'] = 'You can upload contacts from an existing address book.<br/>We currently support importing addresses from the <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> or CSV (comma-separated) data format.';
+$labels['importdesc'] = 'Pode cargar contactos desde un caderno de enderezos preexistente.<br/>Pódense importar enderezos en formato <a href="http://en.wikipedia.org/wiki/VCard">vCard</a> ou CSV (valores separados por comas)';
 $labels['done'] = 'Rematado';
 
 // settings
@@ -380,8 +384,8 @@ $labels['edititem'] = 'Editar';
 $labels['preferhtml'] = 'Prefiro HTML';
 $labels['defaultcharset'] = 'Xogo de caracteres por omisión';
 $labels['htmlmessage'] = 'Mensaxe HTML';
-$labels['messagepart'] = 'Part';
-$labels['digitalsig'] = 'Digital Signature';
+$labels['messagepart'] = 'Parte';
+$labels['digitalsig'] = 'Sinatura dixital';
 $labels['dateformat'] = 'Formato da data';
 $labels['timeformat'] = 'Formato da hora';
 $labels['prettydate'] = 'Data decorada';
@@ -392,12 +396,13 @@ $labels['timezone']  = 'Zona horaria';
 $labels['pagesize']  = 'Liñas por páxina';
 $labels['signature'] = 'Sinatura';
 $labels['dstactive']  = 'Cambio de hora según horario de verán';
-$labels['showinextwin'] = 'Open message in a new window';
-$labels['composeextwin'] = 'Compose in a new window';
+$labels['showinextwin'] = 'Abrir a mensaxe nunha nova xanela';
+$labels['composeextwin'] = 'Redactar nunha xanela nova';
 $labels['htmleditor'] = 'Redactar mensaxes HTML';
 $labels['htmlonreply'] = 'só cando se resposte a unha mensaxe HTML';
-$labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
+$labels['htmlonreplyandforward'] = 'ao reenviar ou respostar a unha mensaxe HTML';
 $labels['htmlsignature'] = 'Sinatura HTML';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'Amosar previsualización';
 $labels['skin'] = 'Aspecto da interface';
 $labels['logoutclear'] = 'Baleirar o cubo do lixo ao saír';
@@ -415,14 +420,14 @@ $labels['readwhendeleted'] = 'Marcar a mensaxe como lida ao eliminar';
 $labels['flagfordeletion'] = 'Marcar a mensaxe para eliminar no canto de eliminar';
 $labels['skipdeleted'] = 'Non amosar as mensaxes marcadas como eliminadas';
 $labels['deletealways'] = 'Eliminar as mensaxes aínda que non se poidan gardar no cubo do lixo';
-$labels['deletejunk'] = 'Directly delete messages in Junk';
+$labels['deletejunk'] = 'Borrar automáticamente as mensaxes no cartafol "Correo lixo"';
 $labels['showremoteimages'] = 'Amosar as imaxes remotas';
 $labels['fromknownsenders'] = 'de remitentes coñecidos';
 $labels['always'] = 'sempre';
 $labels['showinlineimages'] = 'Amosar as imaxes anexas baixo a mensaxe';
 $labels['autosavedraft']  = 'Gardar borrador automáticamente';
 $labels['everynminutes']  = 'cada $n minuto(s)';
-$labels['refreshinterval']  = 'Refresh (check for new messages, etc.)';
+$labels['refreshinterval']  = 'Refrescar (buscar novas mensaxes, etc)';
 $labels['never']  = 'nunca';
 $labels['immediately']  = 'de inmediato';
 $labels['messagesdisplaying'] = 'Visualización das mensaxes';
@@ -444,35 +449,32 @@ $labels['maintenance'] = 'Mantemento';
 $labels['newmessage'] = 'Mensaxes novas';
 $labels['signatureoptions'] = 'Opcións da firma';
 $labels['whenreplying'] = 'Ao respostar';
-$labels['replyempty'] = 'do not quote the original message';
+$labels['replyempty'] = 'non citar a mensaxe orixinal';
 $labels['replytopposting'] = 'comezar a nova mensaxe enriba da orixinal';
 $labels['replybottomposting'] = 'comezar a nova mensaxe embaixo da orixinal';
 $labels['replyremovesignature'] = 'Eliminar a firma do remitente ao respostar';
 $labels['autoaddsignature'] = 'Engadir firma automáticamente';
 $labels['newmessageonly'] = 'só nas mensaxes novas';
 $labels['replyandforwardonly'] = 'só nas respostas e reenvíos';
-$labels['replysignaturepos'] = 'Ao respostar ou reenviar colocar a firma';
-$labels['belowquote'] = 'embaixo do texto citado';
-$labels['abovequote'] = 'enriba do texto citado';
 $labels['insertsignature'] = 'Engadir firma';
 $labels['previewpanemarkread']  = 'Marcar como lidas as mensaxes previsualizadas';
 $labels['afternseconds']  = 'logo de $n segundos';
 $labels['reqmdn'] = 'Solicitar sempre unha notificación da entrega';
 $labels['reqdsn'] = 'Solicitar sempre unha notificación do estado de envío';
 $labels['replysamefolder'] = 'Deixar as respostas no cartafol onde está a mensaxe á que se responde';
-$labels['defaultabook'] = 'Default address book';
+$labels['defaultabook'] = 'Caderno de enderezos por defecto';
 $labels['autocompletesingle'] = 'Ignorar as direccións alternativas no autocompletado';
-$labels['listnamedisplay'] = 'List contacts as';
+$labels['listnamedisplay'] = 'Listar os contactos coma';
 $labels['spellcheckbeforesend'] = 'Revisar a ortografía antes de enviar unha mensaxe';
 $labels['spellcheckoptions'] = 'Opción da revisión ortográfica';
 $labels['spellcheckignoresyms'] = 'Ignorar as palabras con símbolos';
 $labels['spellcheckignorenums'] = 'Ignorar as palabras con números';
 $labels['spellcheckignorecaps'] = 'Ignorar as palabras escritas en maiúsculas';
 $labels['addtodict'] = 'Engadir ao diccionario';
-$labels['mailtoprotohandler'] = 'Register protocol handler for mailto: links';
-$labels['forwardmode'] = 'Messages forwarding';
-$labels['inline'] = 'inline';
-$labels['asattachment'] = 'as attachment';
+$labels['mailtoprotohandler'] = 'Rexistrar o manexador de protocolo para as ligazóns "mailto:"';
+$labels['forwardmode'] = 'Reenvio de mensaxes';
+$labels['inline'] = 'inserido';
+$labels['asattachment'] = 'coma anexo';
 
 $labels['folder']  = 'Cartafol';
 $labels['folders']  = 'Cartafoles';
@@ -500,7 +502,7 @@ $labels['sortasc']  = 'Orde ascendente';
 $labels['sortdesc'] = 'Orde descendente';
 $labels['undo'] = 'Desfacer';
 
-$labels['installedplugins'] = 'Installed plugins';
+$labels['installedplugins'] = 'Complementos instalados';
 $labels['plugin'] = 'Complemento';
 $labels['version'] = 'Versión';
 $labels['source'] = 'Fonte';
diff --git a/program/localization/gl_ES/messages.inc b/program/localization/gl_ES/messages.inc
index 6f230bc..207a016 100644
--- a/program/localization/gl_ES/messages.inc
+++ b/program/localization/gl_ES/messages.inc
@@ -17,7 +17,7 @@
 */
 
 $messages = array();
-$messages['errortitle']  = 'An error occurred!';
+$messages['errortitle']  = 'Ocurreu un erro!';
 $messages['loginfailed']  = 'O contrasinal ou o nome de usuario son incorrectos.';
 $messages['cookiesdisabled'] = 'O seu navegador non acepta galletas.';
 $messages['sessionerror'] = 'A súa sesión non é válida ou expirou.';
@@ -25,15 +25,17 @@ $messages['storageerror'] = 'Fallou a conexión co servidor IMAP.';
 $messages['servererror'] = 'Erro do servidor!';
 $messages['servererrormsg'] = 'Erro do servidor: $msg';
 $messages['dberror'] = 'Erro na base de datos!';
-$messages['requesttimedout'] = 'Request timed out';
+$messages['requesttimedout'] = 'A petición expirou';
 $messages['errorreadonly'] = 'Non foi posible realizar a operación. O cartafol é de só lectura.';
 $messages['errornoperm'] = 'Non foi posible realizar a operación. Permiso denegado.';
+$messages['erroroverquota'] = 'Non se pode realizar a operación, non hai espacio no disco.';
+$messages['erroroverquotadelete'] = 'Non hai espacio no disco. Utilice Maiúsculas+Supr para borrar unha mensaxe.';
 $messages['invalidrequest'] = 'Petición inválida!. Non se gardou ningún dato.';
-$messages['invalidhost'] = 'Invalid server name.';
+$messages['invalidhost'] = 'O nome do servidor non é válido.';
 $messages['nomessagesfound'] = 'Non se atoparon mensaxes nesta caixa de correo.';
 $messages['loggedout'] = 'Rematou correctamente a súa sesión. Ata logo!';
 $messages['mailboxempty'] = 'A caixa de correo está vacía.';
-$messages['refreshing'] = 'Refreshing...';
+$messages['refreshing'] = 'A refrescar...';
 $messages['loading'] = 'Cargando...';
 $messages['uploading'] = 'Cargando ficheiro...';
 $messages['uploadingmany'] = 'Cargando ficheiros...';
@@ -112,16 +114,16 @@ $messages['addingmember'] = 'Engadindo o(s) contacto(s) ao grupo...';
 $messages['removingmember'] = 'Eliminando o(s) contacto(s) do grupo...';
 $messages['receiptsent'] = 'A notificación da entrega enviouse correctamente.';
 $messages['errorsendingreceipt'] = 'Non foi posible enviar a notificación da entrega.';
-$messages['deleteidentityconfirm'] = 'Do you really want to delete this identity?';
+$messages['deleteidentityconfirm'] = 'Quere eliminar esta identidade?';
 $messages['nodeletelastidentity'] = 'Non pode eliminar esta identidade, é a última.';
 $messages['forbiddencharacter'] = 'O nome do cartafol contén un carácter non válido.';
 $messages['selectimportfile'] = 'Por favor, escolla un ficheiro para cargar.';
 $messages['addresswriterror'] = 'Non se pode escribir no caderno de enderezos que escolleu.';
 $messages['contactaddedtogroup'] = 'Engadiuse correctamente o contacto a este grupo.';
 $messages['contactremovedfromgroup'] = 'Suprimiuse correctamente o contacto deste grupo.';
-$messages['nogroupassignmentschanged'] = 'No group assignments changed.';
+$messages['nogroupassignmentschanged'] = 'Non cambiou ningunha asignación de grupo.';
 $messages['importwait'] = 'A importar. Por favor, agarde...';
-$messages['importformaterror'] = 'Import failed! The uploaded file is not a valid import data file.';
+$messages['importformaterror'] = 'Fallou a importación! O ficheiro cargado non contén datos válidos.';
 $messages['importconfirm'] = '<b>Importáronse correctamente $inserted contactos. Ignoráronse $skipped contactos que xa existían</b>:<p><em>$names</em></p>';
 $messages['importconfirmskipped'] = '<b>Ignoráronse $skipped existing entradas</b>';
 $messages['opnotpermitted'] = 'Operación non permitida!';
@@ -162,8 +164,8 @@ $messages['foldercreated'] = 'O cartafol creouse correctamente.';
 $messages['invalidimageformat'] = 'O formato da imaxe non é válido.';
 $messages['mispellingsfound'] = 'Atopáronse erros ortográficos na mensaxe.';
 $messages['parentnotwritable'] = 'Non foi posible crear/mover o cartafol no cartafol padre escollido porque non ten permisos.';
-$messages['messagetoobig'] = 'The message part is too big to process it.';
-$messages['attachmentvalidationerror'] = 'WARNING! This attachment is suspicious because its type doesn\'t match the type declared in the message. If you do not trust the sender, you shouldn\'t open it in the browser because it may contain malicious contents.<br/><br/><em>Expected: $expected; found: $detected</em>';
-$messages['noscriptwarning'] = 'Warning: This webmail service requires Javascript! In order to use it please enable Javascript in your browser\'s settings.';
+$messages['messagetoobig'] = 'A mensaxe é demasiado grande para procesala';
+$messages['attachmentvalidationerror'] = 'ATENCIÓN! Este anexo é sospeitoso porque o seu tipo non coincide o tipo declarado na mensaxe. Se non confía no remitente, non debería abrilo, porque podería conter un virus ou malware.<br/><br/><em>Tipo agardado: $expected; Tipo detectado: $detected</em>';
+$messages['noscriptwarning'] = 'Atención: Este servicio de correo web precisa de Javascript!. Por favor, active javascript nas opción do seu navegador.';
 
 ?>
diff --git a/program/localization/he_IL/labels.inc b/program/localization/he_IL/labels.inc
index 8cf6101..bfb9e2f 100644
--- a/program/localization/he_IL/labels.inc
+++ b/program/localization/he_IL/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'העתק';
 $labels['move']     = 'העבר';
 $labels['moveto']   = 'תיוק ב...';
 $labels['download'] = 'הורדה';
+$labels['open']     = 'לפתוח';
 $labels['showattachment'] = 'הצגה';
 $labels['showanyway'] = 'להציג בכל מקרה';
 
@@ -132,7 +133,7 @@ $labels['replyall']         = 'מענה לכולם';
 $labels['replylist']        = 'מענה לרשימת תפוצה';
 $labels['forward']          = 'העברה';
 $labels['forwardinline']    = 'העבר בגוף ההודעה';
-$labels['forwardattachment'] = 'העבר כקובץ מצורף';
+$labels['forwardattachment'] = 'העבר כצרופה';
 $labels['forwardmessage']   = 'העבר הודעה';
 $labels['deletemessage']    = 'מחיקה';
 $labels['movemessagetotrash'] = 'השלכה לאשפה';
@@ -161,6 +162,7 @@ $labels['currpage'] = 'דף נוכחי';
 $labels['unread'] = 'לא נקראו';
 $labels['flagged'] = 'מסומן';
 $labels['unanswered'] = 'לא נענה';
+$labels['withattachment'] = 'עם צרופה';
 $labels['deleted'] = 'נמחק';
 $labels['undeleted'] = 'לא נמחק';
 $labels['invert'] = 'היפוך הסימון';
@@ -204,6 +206,8 @@ $labels['body']  = 'גוף ההודעה';
 
 $labels['openinextwin'] = 'פתיחה בחלון חדש';
 $labels['emlsave'] = 'הורדת הודעה בפורמט  EML';
+$labels['changeformattext'] = 'הצגה בפורמט לא מעוצב';
+$labels['changeformathtml'] = 'הצגה בפורמט HTML';
 
 // message compose
 $labels['editasnew']      = 'עריכת ההודעה כחדשה';
@@ -225,7 +229,7 @@ $labels['resumeediting'] = 'המשך עריכה';
 $labels['revertto']      = 'חזור למצב קודם';
 
 $labels['attach'] = 'צירוף';
-$labels['attachments'] = 'קבצים מצורפים';
+$labels['attachments'] = 'צרופות';
 $labels['upload'] = 'העלאה';
 $labels['uploadprogress'] = '( $total  מתוך  $current )  $percent';
 $labels['close']  = 'סגירה';
@@ -400,6 +404,7 @@ $labels['htmleditor'] = 'יצירת הודעה מעוצבת';
 $labels['htmlonreply'] = 'רק במענה להודעת HTML';
 $labels['htmlonreplyandforward'] = 'להעביר או להשיב להודעה שהגיעה בפורמט HTML';
 $labels['htmlsignature'] = 'חתימה מעוצבת';
+$labels['showemail'] = 'הצגת כתובת דוא"ל עם שם השולח';
 $labels['previewpane'] = 'תצוגה מוקדמת';
 $labels['skin'] = 'ערכת מראה';
 $labels['logoutclear'] = 'ריקון סל אשפה ביציאה';
@@ -453,9 +458,6 @@ $labels['replyremovesignature'] = 'החתימה תוסר מההודעה המקו
 $labels['autoaddsignature'] = 'הוספה אוטומטית של חתימה';
 $labels['newmessageonly'] = 'הודעה חדשה בלבד';
 $labels['replyandforwardonly'] = 'מענה והעברת הודעה בלבד';
-$labels['replysignaturepos'] = 'במענה או בהעברת הודעה, החתימה תופיע';
-$labels['belowquote'] = 'בסוף ההודעה המקורית';
-$labels['abovequote'] = 'בתחילת ההודעה המקורית';
 $labels['insertsignature'] = 'שיבוץ חתימה';
 $labels['previewpanemarkread']  = 'סימון הודעה שנצפתה כנקראה';
 $labels['afternseconds']  = 'לאחר $n שניות';
diff --git a/program/localization/he_IL/messages.inc b/program/localization/he_IL/messages.inc
index be4ef28..7d9b87c 100644
--- a/program/localization/he_IL/messages.inc
+++ b/program/localization/he_IL/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = '! שגיאה במסד הנתונים';
 $messages['requesttimedout'] = 'תם הזמן המוקצב לבקשה';
 $messages['errorreadonly'] = 'לא ניתן לבצע הפעולה כי התיק ניתן לקריאה בלבד';
 $messages['errornoperm'] = 'לא ניתן לבצע הפעולה כי אין הרשאה לבצעה';
+$messages['erroroverquota'] = 'לא ניתן לבצע הפעולה כי לא מקום פנוי על הדיסק';
+$messages['erroroverquotadelete'] = 'אין מקום פנוי על הדיסק. יש להשתמש ב SHIFT+DELETE כדי למחוק ההודעה';
 $messages['invalidrequest'] = 'בקשה לא חוקית. המידע לא נשמר';
 $messages['invalidhost'] = 'שם שרת לא חוקי';
 $messages['nomessagesfound'] = 'לא נמצאו הודעות בתיבה זו';
diff --git a/program/localization/hi_IN/labels.inc b/program/localization/hi_IN/labels.inc
index 8188b8e..3b8279f 100644
--- a/program/localization/hi_IN/labels.inc
+++ b/program/localization/hi_IN/labels.inc
@@ -64,6 +64,7 @@ $labels['copy']     = 'कार्बन';
 $labels['move']     = 'स्थानांतरित करें';
 $labels['moveto']   = 'खीस्काऐं...';
 $labels['download'] = 'डाऊनलोड';
+$labels['open']     = 'Open';
 $labels['showattachment'] = 'Show';
 $labels['showanyway'] = 'Show it anyway';
 
@@ -161,6 +162,7 @@ $labels['currpage'] = 'Current page';
 $labels['unread'] = 'अनदेखी';
 $labels['flagged'] = 'Flagged';
 $labels['unanswered'] = 'Unanswered';
+$labels['withattachment'] = 'With attachment';
 $labels['deleted'] = 'Deleted';
 $labels['undeleted'] = 'Not deleted';
 $labels['invert'] = 'Invert';
@@ -204,6 +206,8 @@ $labels['body']  = 'Body';
 
 $labels['openinextwin'] = 'Open in new window';
 $labels['emlsave'] = 'Download (.eml)';
+$labels['changeformattext'] = 'Display in plain text format';
+$labels['changeformathtml'] = 'Display in HTML format';
 
 // message compose
 $labels['editasnew']      = 'Edit as new';
@@ -398,6 +402,7 @@ $labels['htmleditor'] = 'मेल ऐच-टी-ऐम-एल (HTML) मे ल
 $labels['htmlonreply'] = 'on reply to HTML message';
 $labels['htmlonreplyandforward'] = 'on forward or reply to HTML message';
 $labels['htmlsignature'] = 'ऐच-टी-ऐम-एल (HTML) दस्तखत';
+$labels['showemail'] = 'Show email address with display name';
 $labels['previewpane'] = 'झलक पट्टी दिखाऐं';
 $labels['skin'] = 'Interface skin';
 $labels['logoutclear'] = 'Clear Trash on logout';
@@ -451,9 +456,6 @@ $labels['replyremovesignature'] = 'When replying remove original signature from
 $labels['autoaddsignature'] = 'Automatically add signature';
 $labels['newmessageonly'] = 'new message only';
 $labels['replyandforwardonly'] = 'replies and forwards only';
-$labels['replysignaturepos'] = 'When replying or forwarding place signature';
-$labels['belowquote'] = 'below the quote';
-$labels['abovequote'] = 'above the quote';
 $labels['insertsignature'] = 'Insert signature';
 $labels['previewpanemarkread']  = 'Mark previewed messages as read';
 $labels['afternseconds']  = 'after $n seconds';
diff --git a/program/localization/hi_IN/messages.inc b/program/localization/hi_IN/messages.inc
index 328dbe0..1d55f5c 100644
--- a/program/localization/hi_IN/messages.inc
+++ b/program/localization/hi_IN/messages.inc
@@ -28,6 +28,8 @@ $messages['dberror'] = 'Database Error!';
 $messages['requesttimedout'] = 'Request timed out';
 $messages['errorreadonly'] = 'Unable to perform operation. Folder is read-only.';
 $messages['errornoperm'] = 'Unable to perform operation. Permission denied.';
+$messages['erroroverquota'] = 'Unable to perform operation. No free disk space.';
+$messages['erroroverquotadelete'] = 'No free disk space. Use SHIFT+DEL to delete a message.';
 $messages['invalidrequest'] = 'Invalid request! No data was saved.';
 $mes