How does IMAP physically store mails?












0















I am at last planning to move from POP3 to IMAP. I use maildir format to store mails and I want, at least for a short time, to keep a fallback route.



I'm trying without success to find out how IMAP organizes and stores mails. As far as I can see I can continue to use my current MTA to prefilter and store mails in maildir structure. I can configure an IMAP server to operate with that structure.



The core of my question is, does an IMAP server leave mails in the maildir folder and simply create indexes to set up virtual user folders, while the [maildir]/new/ folder expands indefinitely? Or does it move/copy mails to its own physical storage - so that e.g. they can mirror the user's folder structure better and avoid possible file system inefficiencies from having all mails in one huge folder?










share|improve this question


















  • 1





    Like POP3, IMAP is a protocol, it specifies how to communicate with a mail server but not how the server stores email. Are you planning on running your own IMAP server? If so, which one?

    – Stephen Kitt
    Mar 7 at 11:07
















0















I am at last planning to move from POP3 to IMAP. I use maildir format to store mails and I want, at least for a short time, to keep a fallback route.



I'm trying without success to find out how IMAP organizes and stores mails. As far as I can see I can continue to use my current MTA to prefilter and store mails in maildir structure. I can configure an IMAP server to operate with that structure.



The core of my question is, does an IMAP server leave mails in the maildir folder and simply create indexes to set up virtual user folders, while the [maildir]/new/ folder expands indefinitely? Or does it move/copy mails to its own physical storage - so that e.g. they can mirror the user's folder structure better and avoid possible file system inefficiencies from having all mails in one huge folder?










share|improve this question


















  • 1





    Like POP3, IMAP is a protocol, it specifies how to communicate with a mail server but not how the server stores email. Are you planning on running your own IMAP server? If so, which one?

    – Stephen Kitt
    Mar 7 at 11:07














0












0








0








I am at last planning to move from POP3 to IMAP. I use maildir format to store mails and I want, at least for a short time, to keep a fallback route.



I'm trying without success to find out how IMAP organizes and stores mails. As far as I can see I can continue to use my current MTA to prefilter and store mails in maildir structure. I can configure an IMAP server to operate with that structure.



The core of my question is, does an IMAP server leave mails in the maildir folder and simply create indexes to set up virtual user folders, while the [maildir]/new/ folder expands indefinitely? Or does it move/copy mails to its own physical storage - so that e.g. they can mirror the user's folder structure better and avoid possible file system inefficiencies from having all mails in one huge folder?










share|improve this question














I am at last planning to move from POP3 to IMAP. I use maildir format to store mails and I want, at least for a short time, to keep a fallback route.



I'm trying without success to find out how IMAP organizes and stores mails. As far as I can see I can continue to use my current MTA to prefilter and store mails in maildir structure. I can configure an IMAP server to operate with that structure.



The core of my question is, does an IMAP server leave mails in the maildir folder and simply create indexes to set up virtual user folders, while the [maildir]/new/ folder expands indefinitely? Or does it move/copy mails to its own physical storage - so that e.g. they can mirror the user's folder structure better and avoid possible file system inefficiencies from having all mails in one huge folder?







directory-structure imap






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 7 at 11:00









adrianhbadrianhb

11




11








  • 1





    Like POP3, IMAP is a protocol, it specifies how to communicate with a mail server but not how the server stores email. Are you planning on running your own IMAP server? If so, which one?

    – Stephen Kitt
    Mar 7 at 11:07














  • 1





    Like POP3, IMAP is a protocol, it specifies how to communicate with a mail server but not how the server stores email. Are you planning on running your own IMAP server? If so, which one?

    – Stephen Kitt
    Mar 7 at 11:07








1




1





Like POP3, IMAP is a protocol, it specifies how to communicate with a mail server but not how the server stores email. Are you planning on running your own IMAP server? If so, which one?

– Stephen Kitt
Mar 7 at 11:07





Like POP3, IMAP is a protocol, it specifies how to communicate with a mail server but not how the server stores email. Are you planning on running your own IMAP server? If so, which one?

– Stephen Kitt
Mar 7 at 11:07










2 Answers
2






active

oldest

votes


















1














IMAP is a communication protocol not a server! Theoretically a server can store files however it likes but you haven't specified which server you will be using. If you use Dovecot then you can stick with maildir format:



https://wiki.dovecot.org/MailLocation/Maildir



Dovecot will use the users's mail directory as the inbox. Dovecot will store other IMAP user directories as hidden maildir formatted directories as inside the inbox.



Eg:



user/cur
user/new
user/tmp
user/.Sent
user/.Sent/cur
user/.Sent/new
user/.Sent/tmp
user/.Drafts
user/.Drafts/cur
user/.Drafts/new
user/.Drafts/tmp


As far as I know, Dovecot requires no secondary index so you should be able to hand it an existing user's mail directory and it will just work.






share|improve this answer





















  • 1





    Same with courier

    – Stéphane Chazelas
    Mar 7 at 11:12



















0














Thanks all. I have Dovecot installed and should have found that wiki page myself. So in terms of my original question, Dovecot does move mail files into dirs that mirror the user's folder arrangement, but the new dirs are hidden ones within the existing maildir structure.






share|improve this answer
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f504894%2fhow-does-imap-physically-store-mails%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    IMAP is a communication protocol not a server! Theoretically a server can store files however it likes but you haven't specified which server you will be using. If you use Dovecot then you can stick with maildir format:



    https://wiki.dovecot.org/MailLocation/Maildir



    Dovecot will use the users's mail directory as the inbox. Dovecot will store other IMAP user directories as hidden maildir formatted directories as inside the inbox.



    Eg:



    user/cur
    user/new
    user/tmp
    user/.Sent
    user/.Sent/cur
    user/.Sent/new
    user/.Sent/tmp
    user/.Drafts
    user/.Drafts/cur
    user/.Drafts/new
    user/.Drafts/tmp


    As far as I know, Dovecot requires no secondary index so you should be able to hand it an existing user's mail directory and it will just work.






    share|improve this answer





















    • 1





      Same with courier

      – Stéphane Chazelas
      Mar 7 at 11:12
















    1














    IMAP is a communication protocol not a server! Theoretically a server can store files however it likes but you haven't specified which server you will be using. If you use Dovecot then you can stick with maildir format:



    https://wiki.dovecot.org/MailLocation/Maildir



    Dovecot will use the users's mail directory as the inbox. Dovecot will store other IMAP user directories as hidden maildir formatted directories as inside the inbox.



    Eg:



    user/cur
    user/new
    user/tmp
    user/.Sent
    user/.Sent/cur
    user/.Sent/new
    user/.Sent/tmp
    user/.Drafts
    user/.Drafts/cur
    user/.Drafts/new
    user/.Drafts/tmp


    As far as I know, Dovecot requires no secondary index so you should be able to hand it an existing user's mail directory and it will just work.






    share|improve this answer





















    • 1





      Same with courier

      – Stéphane Chazelas
      Mar 7 at 11:12














    1












    1








    1







    IMAP is a communication protocol not a server! Theoretically a server can store files however it likes but you haven't specified which server you will be using. If you use Dovecot then you can stick with maildir format:



    https://wiki.dovecot.org/MailLocation/Maildir



    Dovecot will use the users's mail directory as the inbox. Dovecot will store other IMAP user directories as hidden maildir formatted directories as inside the inbox.



    Eg:



    user/cur
    user/new
    user/tmp
    user/.Sent
    user/.Sent/cur
    user/.Sent/new
    user/.Sent/tmp
    user/.Drafts
    user/.Drafts/cur
    user/.Drafts/new
    user/.Drafts/tmp


    As far as I know, Dovecot requires no secondary index so you should be able to hand it an existing user's mail directory and it will just work.






    share|improve this answer















    IMAP is a communication protocol not a server! Theoretically a server can store files however it likes but you haven't specified which server you will be using. If you use Dovecot then you can stick with maildir format:



    https://wiki.dovecot.org/MailLocation/Maildir



    Dovecot will use the users's mail directory as the inbox. Dovecot will store other IMAP user directories as hidden maildir formatted directories as inside the inbox.



    Eg:



    user/cur
    user/new
    user/tmp
    user/.Sent
    user/.Sent/cur
    user/.Sent/new
    user/.Sent/tmp
    user/.Drafts
    user/.Drafts/cur
    user/.Drafts/new
    user/.Drafts/tmp


    As far as I know, Dovecot requires no secondary index so you should be able to hand it an existing user's mail directory and it will just work.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Mar 7 at 11:12

























    answered Mar 7 at 11:09









    Philip CoulingPhilip Couling

    2,2881122




    2,2881122








    • 1





      Same with courier

      – Stéphane Chazelas
      Mar 7 at 11:12














    • 1





      Same with courier

      – Stéphane Chazelas
      Mar 7 at 11:12








    1




    1





    Same with courier

    – Stéphane Chazelas
    Mar 7 at 11:12





    Same with courier

    – Stéphane Chazelas
    Mar 7 at 11:12













    0














    Thanks all. I have Dovecot installed and should have found that wiki page myself. So in terms of my original question, Dovecot does move mail files into dirs that mirror the user's folder arrangement, but the new dirs are hidden ones within the existing maildir structure.






    share|improve this answer




























      0














      Thanks all. I have Dovecot installed and should have found that wiki page myself. So in terms of my original question, Dovecot does move mail files into dirs that mirror the user's folder arrangement, but the new dirs are hidden ones within the existing maildir structure.






      share|improve this answer


























        0












        0








        0







        Thanks all. I have Dovecot installed and should have found that wiki page myself. So in terms of my original question, Dovecot does move mail files into dirs that mirror the user's folder arrangement, but the new dirs are hidden ones within the existing maildir structure.






        share|improve this answer













        Thanks all. I have Dovecot installed and should have found that wiki page myself. So in terms of my original question, Dovecot does move mail files into dirs that mirror the user's folder arrangement, but the new dirs are hidden ones within the existing maildir structure.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 7 at 11:38









        adrianhbadrianhb

        11




        11






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f504894%2fhow-does-imap-physically-store-mails%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to make a Squid Proxy server?

            Is this a new Fibonacci Identity?

            19世紀