[#6140] Ingo mangles paths to subfolders
Summary Ingo mangles paths to subfolders
Queue Ingo
Queue Version 1.1.5
Type Bug
State No Feedback
Priority 2. Medium
Owners Jan Schneider <jan (at) horde (dot) org>, Ben Chavet <ben (at) horde (dot) org>
Requester rhoneyager (at) gmail (dot) com
Created 01/23/2008 (109 days ago)
Due
Updated 03/06/2008 (66 days ago)
Assigned 02/26/2008 (75 days ago)
Resolved 03/06/2008 (66 days ago)
Attachments
Milestone
Patch

History
03/06/2008 Jan Schneider State ⇒ No Feedback
 
02/26/2008 Jan Schneider Comment #7
State ⇒ Feedback
Reply to this comment
Looking at the code that you pasted it should work, if you set 'path_style' to 'mbox' for your configuration.
02/17/2008 Chuck Hagenbuch Comment #6
State ⇒ Assigned
Assigned to Jan Schneider
Assigned to Ben Chavet
Reply to this comment
Hopefully someone can take a peek at this soon... Ben? :)
02/01/2008 rhoneyager (at) gmail (dot) com Comment #5 Reply to this comment
Yes, it still happens.

I think the problem is caused by this function in ingo/lib/Script/procmail.php

    function procmailPath($folder)
    {
        /* NOTE: '$DEFAULT' here is a literal, not a PHP variable. */
        if (isset($this->_params) &&
            ($this->_params['path_style'] == 'maildir')) {
            if (empty($folder) || ($folder == 'INBOX')) {
                return '$DEFAULT';
            }
            if (substr($folder, 0, 6) == 'INBOX.') {
                $folder = substr($folder, 6);
            }
            return '"$DEFAULT/.' . escapeshellcmd($folder) . '/"';
        } else {
            if (empty($folder) || ($folder == 'INBOX')) {
                return '$DEFAULT';
            }
            return str_replace(' ', '\ ', escapeshellcmd($folder));
        }
    }


There should be an option somewhere to set how ingo handles subfolders of inbox. Right now, it always just removes the INBOX. part of the subfolder's name, which changes it to a top-level folder.
02/01/2008 Jan Schneider Comment #4 Reply to this comment
Can you test if this still happens with Ingo 2.2 RC2?
01/31/2008 rhoneyager (at) gmail (dot) com Comment #3 Reply to this comment
I should have been more specific.
My imap folders look like this:

-Inbox
--Facebook
--Daily
-College
--Lab
--Classes
-Sent
-Trash
-Old Mail

Inbox is not the only folder with subfolders inside it that recieve mail. Some mail is also delivered to the .College.Classes and .College.Lab folders. The script that ingo generates creates the correct path for these folders.
My problem was that, when I select a subfolder of inbox (and only inbox), the rules that Ingo generates assume that it is a top-level folder.
01/31/2008 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
'DEFAULT' should be set to the .INBOX directory in config/backends.php, no?
01/23/2008 rhoneyager (at) gmail (dot) com Comment #1
Queue ⇒ Ingo
Summary ⇒ Ingo mangles paths to subfolders
Type ⇒ Bug
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Reply to this comment
In Ingo, I created a set of procmail rules were supposed to deliver mail to a subfolder of my inbox folder. When ingo generates the rules, however, it forgets that the folder is a subfolder of inbox.
I am using a fresh install of Dovecot 1.0.10 as my IMAP server.


example:
Ingo Generates:
26: ##### Facebook #####
27: :0
28: * ^From:.*facebook
29: "$DEFAULT/.Facebook/"

It's supposed to be:
26: ##### Facebook #####
27: :0
28: * ^From:.*facebook
29: $DEFAULT/.INBOX.Facebook/