Answers.Body: <p>You can aslo create an issue on <a href="https://lab.civicrm.org/dev/core/issues" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/issues</a> and then send a Pull Request on GitHub. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-31T08:06:21.703Z
Answers.LastActivityDate: 2018-05-31T08:06:21.703Z
Answers.UserDisplayName: Jaap Jansma - CiviCooP
Answers.Body: <p>When you say "doesn't support this", it sounds like it isn't returning an error(?), so it might be that the hierarchy separator isn't being determined correctly. Also I've seen some imap servers are case sensitive or just picky, so INBOX might be treated differently from Inbox when you specify the prefix.</p>
  
  <p>Which imap server brand is it? Besides playing a bit with the Source settings on the Mail Account page where you set it up, try to confirm what the separator is (can put some debug code in the same place you've linked to see what it's returning from getHierarchyDelimiter()).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-02T13:21:10.013Z
Answers.Text: Ok. So as Jaap says in his answer if you're able to submit a patch that allows for a blank Source prefix without breaking other setups then it will probably be accepted into core. For backwards compatibility you'd need to either also include upgrade code to convert any existing blanks to "INBOX", or else you would have to do something like use a lone period "." to mean blank, or a special string like "<blank>". Otherwise people's setups might stop working. The former is probably preferred. See e.g. CRM/Upgrade/Incremental/sql
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-31T15:45:46.840Z
Answers.Text: It's Dovecot.  I had a search around and found some articles that suggested in some configurations of Dovecot, you can't create subfolders of the inbox, so I think it is just a mail server issue.  Dovecot is quite widely used though so I'm surprised this isn't a more common issue.  I don't have any control over the mail server sadly.
Answers.UserDisplayName: Anna Sidwell
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-05-28T17:19:55.123Z
Answers.LastActivityDate: 2018-05-28T17:19:55.123Z
Answers.UserDisplayName: Demerit
Body: <p>When setting up a Civi site for a client, I turned on email-to-activity processing.  When you do this, Civi tries to set up two folders ('CiviMail/ignored' and 'CiviMail/processed') as subfolders of the inbox folder.  However, the mail server doesn't support this, and puts them in a different place in the folder hierarchy (on the same level as the inbox).</p>
  
  <p>I've patched this for now but it doesn't seem like a good long-term solution. 
   Has any one else run into this?  Any ideas on how I might deal with it in a longer-term way?  Seems like something that would be good to make configurable.</p>
  
  <p>(The relevant code in Civi is in <a href="https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/MailStore/Imap.php#L56" rel="nofollow noreferrer">CRM/Mailing/MailStore/Imap.php</a>)</p>
  
Tags: <email>
Title: Email-to-activity processing – can't create subfolders of the inbox
ThreadText: # Email-to-activity processing – can't create subfolders of the inbox
  
  (Asked by: username_0 on 2018-05-27)
  
  When setting up a Civi site for a client, I turned on email-to-activity processing. When you do this, Civi tries to set up two folders ('CiviMail/ignored' and 'CiviMail/processed') as subfolders of the inbox folder. However, the mail server doesn't support this, and puts them in a different place in the folder hierarchy (on the same level as the inbox).
  
  I've patched this for now but it doesn't seem like a good long-term solution.
  Has any one else run into this? Any ideas on how I might deal with it in a longer-term way? Seems like something that would be good to make configurable.
  
  (The relevant code in Civi is in [CRM/Mailing/MailStore/Imap.php](https://github.com/civicrm/civicrm-core/blob/master/CRM/Mailing/MailStore/Imap.php#L56))
  
  **Tags:** email
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-05-31. Score: 2
  
  You can aslo create an issue on <https://lab.civicrm.org/dev/core/issues> and then send a Pull Request on GitHub.
  
  
  ---
  
  ### Answer by username_2 on 2018-05-28. Score: 1
  
  When you say "doesn't support this", it sounds like it isn't returning an error(?), so it might be that the hierarchy separator isn't being determined correctly. Also I've seen some imap servers are case sensitive or just picky, so INBOX might be treated differently from Inbox when you specify the prefix.
  
  Which imap server brand is it? Besides playing a bit with the Source settings on the Mail Account page where you set it up, try to confirm what the separator is (can put some debug code in the same place you've linked to see what it's returning from getHierarchyDelimiter()).
  
  > **Comments:**
  > **username_0**: It's Dovecot.  I had a search around and found some articles that suggested in some configurations of Dovecot, you can't create subfolders of the inbox, so I think it is just a mail server issue.  Dovecot is quite widely used though so I'm surprised this isn't a more common issue.  I don't have any control over the mail server sadly.  
  > **username_2**: Ok. So as username_1 says in his answer if you're able to submit a patch that allows for a blank Source prefix without breaking other setups then it will probably be accepted into core. For backwards compatibility you'd need to either also include upgrade code to convert any existing blanks to "INBOX", or else you would have to do something like use a lone period "." to mean blank, or a special string like "<blank>". Otherwise people's setups might stop working. The former is probably preferred. See e.g. CRM/Upgrade/Incremental/sql  
  
  ---
  
  