Thunderbird and other mail clients create unwanted directories

Discussion in 'Installation/Configuration' started by Hans-Linux, Mar 4, 2017.

  1. Hans-Linux

    Hans-Linux New Member HowtoForge Supporter

    Thunderbird and other mail clients create unwanted directories on startup of the mail client.

    I use Dovecot 2.1.7. on Debian 3.2.68-1+deb7u6 x86_64 with ISPConfig Version: 3.1.2 and like to know how to force the IMAP directory structure to be:
    The IMAP server's desired directory structure is:
    /var/vmail/c5ace.com/test/Maildir#
    /.INBOX
    /.INBOX.Archives
    /.INBOX.Drafts
    /.INBOX.Junk
    /.INBOX.Sent
    /.INBOX.Templates
    /.INBOX.Trash

    and to prevent the mail clients like Thunderbird, Claws Mail, etc. to automatically on startup add additional out of tree directories such as:
    /.INBOX
    /.INBOX.Archives
    /.INBOX.Drafts
    /.INBOX.Junk
    /.INBOX.Sent
    /.INBOX.Templates
    /.INBOX.Trash
    /.trash <<< unwanted directory

    Thanks in advance.
     
    Last edited: Mar 4, 2017
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    As you indicate, this is the behavior of the client, not the server - the options of what can be done and how differ for each client. About the only thing that comes to mind for doing something server-side is to write a script that automatically deletes known "bad" folder names like your /.trash example; of course nothing prevents them from being created again if the client isn't configured not to do so.

    That's my understanding at least, maybe someone else has a better solution to this?
     
  3. Hans-Linux

    Hans-Linux New Member HowtoForge Supporter

    This does not work. After deleting the unwanted directory and the unwanted entry in the 'subscription' file, Dovecot immediately creates again the unwanted directory when the client logs in.
     
  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Yes, dovecot does that because the client sends the command to do so. I don't know of a solution to prevent clients from doing that, but it seems like something that would be desirable, so keep searching/asking. Eg. maybe search for other terms like how to prevent a client from creating a folder in the root, etc.? What would be really nice is folder flags so you could tell the client, "this is the Trash folder" .. but I don't believe those exist (I believe flags are only for messages, not folders).
     

Share This Page