6.0.0-beta1
7/7/25

[#14429] Procmail rule with Umlaut wrong folder because backslash
Summary Procmail rule with Umlaut wrong folder because backslash
Queue Ingo
Queue Version 3.2.11
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester samuel.wolf (at) wolf-maschinenbau (dot) de
Created 07/27/2016 (3267 days ago)
Due
Updated 10/20/2017 (2817 days ago)
Assigned 07/31/2016 (3263 days ago)
Resolved 08/01/2016 (3262 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/20/2017 08:33:42 PM Git Commit Comment #14 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit 657fa85d249ba4bf7a62f51f7be78bf7289b8943
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Fri, 29 Jul 2016 11:22:10 -0400

Bug: 14429 Escape mailbox before converting to utf7imap.

  M lib/Script/Procmail/Recipe.php

https://github.com/horde/ingo/commit/657fa85d249ba4bf7a62f51f7be78bf7289b8943
08/01/2016 08:14:59 AM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #13 Reply to this comment
08/01/2016 03:21:03 AM Michael Rubinsky Comment #12
State ⇒ Resolved
Reply to this comment
Actually, this is all moot anyway. For utf7-imap encoded mailbox 
names, using escapeshellcmd will corrupt mailbox names that contain 
things like '&' anyway since these are encoded in a different way. 
I.e, we can't escape here anyway.

Fixed in Git:
https://github.com/horde/horde/commit/fe8e7606e6e06626f574877b0ff0e6e1f963d099
07/31/2016 10:41:42 PM Michael Rubinsky Comment #11 Reply to this comment
Maybe https://bugs.php.net/bug.php?id=54391, though not sure why it's 
not happening on my system.
07/31/2016 10:04:39 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #10 Reply to this comment
Specifically, the LC_ALL or LANG environment variables.
LC_ALL         de_DE.UTF-8

LANGUAGE         de_DE.UTF-8

07/31/2016 10:01:06 PM Michael Rubinsky Comment #9 Reply to this comment
Can you get the output of:

phpinfo();


from within the administrative phpshell page? Specifically, the LC_ALL 
or LANG environment variables.

07/31/2016 09:54:06 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #8 Reply to this comment
Are you sure the changes were applied correctly?
root@wolfmailserver:/var/www/https/horde# tail 
ingo/lib/Script/Procmail/Recipe.php
                 $folder = substr($folder, 6);
             }

            $mbox = new Horde_Imap_Client_Mailbox(escapeshellcmd($folder));

            return '".' . $mbox->utf7imap . '/"';
         }
         return str_replace(' ', '\ ', escapeshellcmd($folder));
     }
}
root@wolfmailserver:/var/www/https/horde#
What version of PHP are you using?
php5-common 5.6.24+dfsg-0+deb8u1 amd64
07/31/2016 09:22:13 PM Michael Rubinsky Comment #7 Reply to this comment
What version of PHP are you using? There were bugs in earlier versions 
with regard to special characters and escapeshell* functions.
07/31/2016 08:51:26 PM Michael Rubinsky Comment #6
State ⇒ Feedback
Reply to this comment
Cannot reproduce this.

Are you sure the changes were applied correctly? The lines in question 
in  ingo/lib/Script/Procmail/Recipe.php should look like this 
(starting at line 470):

             $mbox = new Horde_Imap_Client_Mailbox(escapeshellcmd($folder));
             return '".' . $mbox->utf7imap . '/"';
07/31/2016 03:51:21 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #5 Reply to this comment
Apply this patch to Ingo 3.2.11

But the procmail script missing the Umlaut now completely:
##### Horde #####
:0
* ^From:.*@horde\.org
".Umlaute-/"
07/29/2016 03:24:26 PM Michael Rubinsky Comment #4
Assigned to Michael Rubinsky
State ⇒ Resolved
Reply to this comment
Ingo 3.2.12
07/29/2016 03:23:38 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git (FRAMEWORK_5_2):

commit fba0d5ff4d8f74f3ca6ccf5e60664db0d0c8d4f4
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Fri Jul 29 11:17:06 2016 -0400

     Bug: 14429 Escape mailbox before converting to utf7imap.

  ingo/lib/Script/Procmail/Recipe.php | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

http://github.com/horde/horde/commit/fba0d5ff4d8f74f3ca6ccf5e60664db0d0c8d4f4
07/29/2016 03:17:41 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 58f170c7ce44f73f9d96516e42459179864f27eb
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Fri Jul 29 11:17:06 2016 -0400

     Bug: 14429 Escape mailbox before converting to utf7imap.

  ingo/lib/Script/Procmail/Recipe.php | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

http://github.com/horde/horde/commit/58f170c7ce44f73f9d96516e42459179864f27eb
07/27/2016 04:22:10 PM samuel (dot) wolf (at) wolf-maschinenbau (dot) de Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Procmail rule with Umlaut wrong folder because backslash
Queue ⇒ Ingo
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
I have a folder "Umlaute-ä" in IMP / my maildir.

Create a filte rule with Ingo "Deliver to folder... [Umlaute-ä]" 
generate following procmail script:
[...]
140: ##### Horde #####
141: :0
142: * ^From:.*@horde\.org
143: ".Umlaute-\&AOQ-/"

But the folder in the maildir is named ".Umlaute-&AOQ-", as soon the 
filter match procmail create a new folder named ".Umlaute-\&AOQ-" and 
deliver the mail into it.

Saved Queries