Listener: Dovecot remove prefix INBOX.

  • If you use Dovecot on a standard installation on Debian, the prefix is not set.
    With i-MSCP the prefix is set to INBOX. because Courier use it as standard.


    I personally do not like that and on the basis of this topic Dovecot Namespace und Quota , I wrote a listener. :)


    I will use in future no Courier, so I don't care if there are problems with the prefix. :)


    Everyone thinks the same way, can use this listener. :D

  • I like this variant as it's quick and dirty. I do not yet understand those listeners that well. But I do know dovecot... so here is the variant I'm using:


    this is the normal namespace with removed prefix.

    Code
    1. namespace inbox { inbox = yes prefix = separator = .}


    Below that you can add another namespace:


    Code
    1. namespace compat {
    2. hidden = yes
    3. inbox = no
    4. list = no
    5. prefix = INBOX.
    6. separator = .
    7. alias_for =
    8. }

    Could that be incorporated to this listener? Then anyone could use it even when coming from Courier.


    Background story: actually Mac OSX Notes.app has a problem with prefixes on IMAP sync. So I looked out to find a way to satisfy both worlds, those with and without prefix set.

  • @bytesplit


    I use a listener file with exactly the same namespaces, how you described it here.
    Maybe I'll expand it a bit to be more flexible and then I could share it.

    Patched i-MSCP 1.5.4 on Debian Stretch | Apache 2.4.52 | Nginx 1.21.4 | OpenSSL 1.1.1 | php 7.0 - 8.1 | Dovecot 2.3.17.1 | Bind 9.16.25 | Postfix 3.1.15 | MariaDB 10.1.48 | ProFTPD 1.3.5b | Rspamd 2.7 | ClamAV 0.103.4 | Roundcube 1.5.2 | CrowdSec 1.3.0

  • The attached listener file 10_dovecot_namespace.pl changes the namespace back to dovecot default:


    Code
    1. namespace inbox { separator = / prefix = inbox = yes type = private}


    and also creates a new namespace entry as backward compatibility for Courier IMAP:


    Code
    1. namespace compat {
    2. separator = .
    3. prefix = INBOX.
    4. inbox = no
    5. hidden = yes
    6. list = no
    7. alias_for =
    8. }


    For more information about this options please read http://wiki2.dovecot.org/Namespaces


    Usage: Copy the file to your server into the /etc/imscp/listeners.d/ directory and remove the .txt extension. Run the setup engine to activate it immediately:


    /var/www/imscp/engine/setup/imscp-setup -dn

    Files

    Patched i-MSCP 1.5.4 on Debian Stretch | Apache 2.4.52 | Nginx 1.21.4 | OpenSSL 1.1.1 | php 7.0 - 8.1 | Dovecot 2.3.17.1 | Bind 9.16.25 | Postfix 3.1.15 | MariaDB 10.1.48 | ProFTPD 1.3.5b | Rspamd 2.7 | ClamAV 0.103.4 | Roundcube 1.5.2 | CrowdSec 1.3.0

  • @mrpink


    Can you PR this again the 1.2.x branch (contrib directory)? THX

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Nuxwin


    Yes, sure I'll do that soon.
    I have a lot of listener files on my production system which are on my agenda to review for a public release.

    Patched i-MSCP 1.5.4 on Debian Stretch | Apache 2.4.52 | Nginx 1.21.4 | OpenSSL 1.1.1 | php 7.0 - 8.1 | Dovecot 2.3.17.1 | Bind 9.16.25 | Postfix 3.1.15 | MariaDB 10.1.48 | ProFTPD 1.3.5b | Rspamd 2.7 | ClamAV 0.103.4 | Roundcube 1.5.2 | CrowdSec 1.3.0

  • Thank my friend ;) All your listeners are welcome ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206