Setting up Postfix on Ubuntu 16.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am following this tutorial from Digital Ocean and trying to configre Postfix to work properly, so far without success.



It all goes well until I try to list the directory
ls -R ~/Maildir



I get this error ls: cannot access '/home/petar/Maildir': No such file or directory



I tried manually creating the directory /home/petar/Maildir



However no directory structure is never created.



There are not folders - cur, tmp or new inside.







share|improve this question















  • 1




    It won't create directories until you actually receive mail messages. This applies for the older-style mbox where the mailbox file is not created until the system needs it (to hold mail messages). Check /var/log/mail.log to determine what's going on, and see if there's some other errors with mail delivery. Note that Maildir folders won't be made until you receive mail, so if mail receiving is a problem and it's not working properly you won't get any maildir folders.
    – Thomas Ward
    May 17 at 15:08







  • 1




    Also, you need to set mailbox_command = in the Postfix config so it doesn't use procmail anymore for delivery (and yes, it's supposed to be equal to nothing)
    – Thomas Ward
    May 17 at 15:20






  • 1




    I added the line you suggested, then I restarted the postfix using sudo killall sendmail-mta sudo service postfix restart and now it is all working fine!
    – nikksan
    May 18 at 6:53














up vote
0
down vote

favorite












I am following this tutorial from Digital Ocean and trying to configre Postfix to work properly, so far without success.



It all goes well until I try to list the directory
ls -R ~/Maildir



I get this error ls: cannot access '/home/petar/Maildir': No such file or directory



I tried manually creating the directory /home/petar/Maildir



However no directory structure is never created.



There are not folders - cur, tmp or new inside.







share|improve this question















  • 1




    It won't create directories until you actually receive mail messages. This applies for the older-style mbox where the mailbox file is not created until the system needs it (to hold mail messages). Check /var/log/mail.log to determine what's going on, and see if there's some other errors with mail delivery. Note that Maildir folders won't be made until you receive mail, so if mail receiving is a problem and it's not working properly you won't get any maildir folders.
    – Thomas Ward
    May 17 at 15:08







  • 1




    Also, you need to set mailbox_command = in the Postfix config so it doesn't use procmail anymore for delivery (and yes, it's supposed to be equal to nothing)
    – Thomas Ward
    May 17 at 15:20






  • 1




    I added the line you suggested, then I restarted the postfix using sudo killall sendmail-mta sudo service postfix restart and now it is all working fine!
    – nikksan
    May 18 at 6:53












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am following this tutorial from Digital Ocean and trying to configre Postfix to work properly, so far without success.



It all goes well until I try to list the directory
ls -R ~/Maildir



I get this error ls: cannot access '/home/petar/Maildir': No such file or directory



I tried manually creating the directory /home/petar/Maildir



However no directory structure is never created.



There are not folders - cur, tmp or new inside.







share|improve this question











I am following this tutorial from Digital Ocean and trying to configre Postfix to work properly, so far without success.



It all goes well until I try to list the directory
ls -R ~/Maildir



I get this error ls: cannot access '/home/petar/Maildir': No such file or directory



I tried manually creating the directory /home/petar/Maildir



However no directory structure is never created.



There are not folders - cur, tmp or new inside.









share|improve this question










share|improve this question




share|improve this question









asked May 17 at 14:56









nikksan

104




104







  • 1




    It won't create directories until you actually receive mail messages. This applies for the older-style mbox where the mailbox file is not created until the system needs it (to hold mail messages). Check /var/log/mail.log to determine what's going on, and see if there's some other errors with mail delivery. Note that Maildir folders won't be made until you receive mail, so if mail receiving is a problem and it's not working properly you won't get any maildir folders.
    – Thomas Ward
    May 17 at 15:08







  • 1




    Also, you need to set mailbox_command = in the Postfix config so it doesn't use procmail anymore for delivery (and yes, it's supposed to be equal to nothing)
    – Thomas Ward
    May 17 at 15:20






  • 1




    I added the line you suggested, then I restarted the postfix using sudo killall sendmail-mta sudo service postfix restart and now it is all working fine!
    – nikksan
    May 18 at 6:53












  • 1




    It won't create directories until you actually receive mail messages. This applies for the older-style mbox where the mailbox file is not created until the system needs it (to hold mail messages). Check /var/log/mail.log to determine what's going on, and see if there's some other errors with mail delivery. Note that Maildir folders won't be made until you receive mail, so if mail receiving is a problem and it's not working properly you won't get any maildir folders.
    – Thomas Ward
    May 17 at 15:08







  • 1




    Also, you need to set mailbox_command = in the Postfix config so it doesn't use procmail anymore for delivery (and yes, it's supposed to be equal to nothing)
    – Thomas Ward
    May 17 at 15:20






  • 1




    I added the line you suggested, then I restarted the postfix using sudo killall sendmail-mta sudo service postfix restart and now it is all working fine!
    – nikksan
    May 18 at 6:53







1




1




It won't create directories until you actually receive mail messages. This applies for the older-style mbox where the mailbox file is not created until the system needs it (to hold mail messages). Check /var/log/mail.log to determine what's going on, and see if there's some other errors with mail delivery. Note that Maildir folders won't be made until you receive mail, so if mail receiving is a problem and it's not working properly you won't get any maildir folders.
– Thomas Ward
May 17 at 15:08





It won't create directories until you actually receive mail messages. This applies for the older-style mbox where the mailbox file is not created until the system needs it (to hold mail messages). Check /var/log/mail.log to determine what's going on, and see if there's some other errors with mail delivery. Note that Maildir folders won't be made until you receive mail, so if mail receiving is a problem and it's not working properly you won't get any maildir folders.
– Thomas Ward
May 17 at 15:08





1




1




Also, you need to set mailbox_command = in the Postfix config so it doesn't use procmail anymore for delivery (and yes, it's supposed to be equal to nothing)
– Thomas Ward
May 17 at 15:20




Also, you need to set mailbox_command = in the Postfix config so it doesn't use procmail anymore for delivery (and yes, it's supposed to be equal to nothing)
– Thomas Ward
May 17 at 15:20




1




1




I added the line you suggested, then I restarted the postfix using sudo killall sendmail-mta sudo service postfix restart and now it is all working fine!
– nikksan
May 18 at 6:53




I added the line you suggested, then I restarted the postfix using sudo killall sendmail-mta sudo service postfix restart and now it is all working fine!
– nikksan
May 18 at 6:53










1 Answer
1






active

oldest

votes

















up vote
2
down vote













What the Digital Ocean tutorial doesn't touch upon is eliminating the default procmail from being used. However, thankfully the Ubuntu Wiki documentation on a basic postfix setup does touch upon it.



Postfix by default uses procmail for local user delivery. Unfortunately, procmail supports old-style mbox and not Maildir. We need to tell Postfix to not use procmail.



Your Postfix configuration needs to have the following two lines to properly use Maildir with Postfix:



home_mailbox = Maildir/
mailbox_command =


The mailbox_command directive is intentionally set equal to nothing.



Once this is set, you can simply do sudo systemctl restart postfix (or the more traditional sudo service postfix restart method, which calls the aforementioned systemctl command). You should then have Maildir working properly.






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',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f444395%2fsetting-up-postfix-on-ubuntu-16-04%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    What the Digital Ocean tutorial doesn't touch upon is eliminating the default procmail from being used. However, thankfully the Ubuntu Wiki documentation on a basic postfix setup does touch upon it.



    Postfix by default uses procmail for local user delivery. Unfortunately, procmail supports old-style mbox and not Maildir. We need to tell Postfix to not use procmail.



    Your Postfix configuration needs to have the following two lines to properly use Maildir with Postfix:



    home_mailbox = Maildir/
    mailbox_command =


    The mailbox_command directive is intentionally set equal to nothing.



    Once this is set, you can simply do sudo systemctl restart postfix (or the more traditional sudo service postfix restart method, which calls the aforementioned systemctl command). You should then have Maildir working properly.






    share|improve this answer



























      up vote
      2
      down vote













      What the Digital Ocean tutorial doesn't touch upon is eliminating the default procmail from being used. However, thankfully the Ubuntu Wiki documentation on a basic postfix setup does touch upon it.



      Postfix by default uses procmail for local user delivery. Unfortunately, procmail supports old-style mbox and not Maildir. We need to tell Postfix to not use procmail.



      Your Postfix configuration needs to have the following two lines to properly use Maildir with Postfix:



      home_mailbox = Maildir/
      mailbox_command =


      The mailbox_command directive is intentionally set equal to nothing.



      Once this is set, you can simply do sudo systemctl restart postfix (or the more traditional sudo service postfix restart method, which calls the aforementioned systemctl command). You should then have Maildir working properly.






      share|improve this answer

























        up vote
        2
        down vote










        up vote
        2
        down vote









        What the Digital Ocean tutorial doesn't touch upon is eliminating the default procmail from being used. However, thankfully the Ubuntu Wiki documentation on a basic postfix setup does touch upon it.



        Postfix by default uses procmail for local user delivery. Unfortunately, procmail supports old-style mbox and not Maildir. We need to tell Postfix to not use procmail.



        Your Postfix configuration needs to have the following two lines to properly use Maildir with Postfix:



        home_mailbox = Maildir/
        mailbox_command =


        The mailbox_command directive is intentionally set equal to nothing.



        Once this is set, you can simply do sudo systemctl restart postfix (or the more traditional sudo service postfix restart method, which calls the aforementioned systemctl command). You should then have Maildir working properly.






        share|improve this answer















        What the Digital Ocean tutorial doesn't touch upon is eliminating the default procmail from being used. However, thankfully the Ubuntu Wiki documentation on a basic postfix setup does touch upon it.



        Postfix by default uses procmail for local user delivery. Unfortunately, procmail supports old-style mbox and not Maildir. We need to tell Postfix to not use procmail.



        Your Postfix configuration needs to have the following two lines to properly use Maildir with Postfix:



        home_mailbox = Maildir/
        mailbox_command =


        The mailbox_command directive is intentionally set equal to nothing.



        Once this is set, you can simply do sudo systemctl restart postfix (or the more traditional sudo service postfix restart method, which calls the aforementioned systemctl command). You should then have Maildir working properly.







        share|improve this answer















        share|improve this answer



        share|improve this answer








        edited May 18 at 16:05


























        answered May 18 at 12:29









        Thomas Ward

        1,3182927




        1,3182927






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444395%2fsetting-up-postfix-on-ubuntu-16-04%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay