Loading ...
Sorry, an error occurred while loading the content.

Re: Postfix doesn't create maildirs

Expand Messages
  • mouss
    ... well, since you use courier-imap, maildrop will be relatively easy to setup. it will also give you the ability to classify mail into folders based on
    Message 1 of 9 , May 2 2:11 PM
    • 0 Attachment
      Matthias Dietrich a écrit :
      > Am 02.05.2009 um 22:15 schrieb Darren Pilgrim:
      >> Mail store folder creation is the responsibility of your delivery
      >> agent, but you didn't state which delivery agent you're using.
      >
      > I'm really new to mail servers and followed this tutorial:
      > http://flurdy.com/docs/postfix/
      >
      > When going through the tutorial I didn't thought about MDAs, but as I
      > see now there is none described there. If there is no "default" one, I
      > missed that. A quick search said that maildrop would be a good choice.
      > Do you agree?
      >

      well, since you use courier-imap, maildrop will be relatively easy to
      setup. it will also give you the ability to classify mail into folders
      based on maildrop rules.

      but maildrop will not create the maildirs automatically. you'll need to
      add commands to do that in maildroprc...
    • LuKreme
      ... send the welcome mail when you create the account in postfixadmin.. The Maildirs are not created until a mail is delivered. If you want to create them
      Message 2 of 9 , May 2 2:33 PM
      • 0 Attachment
        On 2-May-2009, at 14:05, Matthias Dietrich wrote:
        > I use Postfix with virtual mailboxes for virtual domain hosting.
        > Authentication is done with mysql, creating of new mailboxes is done
        > via postfixadmin. I add a new Domain (example.com) and Mailbox
        > (postmaster). Trying to log in after that brings the following
        > error in /var/log/syslog:
        >
        > imapd: chdir /var/spool/mail/example.com/postmaster/: No such file
        > or directory

        send the welcome mail when you create the account in postfixadmin..
        The Maildirs are not created until a mail is delivered.

        If you want to create them manually the command is maildirmake.


        --
        There are 10 types of people in the world: Those who understand
        binary and those who don't.
      • Darren Pilgrim
        ... You re using Courier-IMAP, so yes. Maildrop can execute external programs using backtick expansion, so you can easily create a system-wide maildroprc that
        Message 3 of 9 , May 2 2:50 PM
        • 0 Attachment
          Matthias Dietrich wrote:
          > Am 02.05.2009 um 22:15 schrieb Darren Pilgrim:
          >> Mail store folder creation is the responsibility of your delivery
          >> agent, but you didn't state which delivery agent you're using.
          >
          > When going through the tutorial I didn't thought about MDAs, but as I
          > see now there is none described there. If there is no "default" one,
          > I missed that. A quick search said that maildrop would be a good
          > choice. Do you agree?

          You're using Courier-IMAP, so yes. Maildrop can execute external
          programs using backtick expansion, so you can easily create a
          system-wide maildroprc that checks for (and creates, if missing) a
          standard set of folders using Courier-IMAP's maildirmake program. If
          you want them, I still have the scripts I used before I switched to Dovecot.
        • Matthias Dietrich
          ... That doesn t work... If I create the domain directory, the dir for the user won t be created either. ... I m a bit confused about what I use now... In
          Message 4 of 9 , May 2 3:29 PM
          • 0 Attachment
            Am 02.05.2009 um 23:09 schrieb mouss:
            > you need to create the /var/spool/mail/example.com directory. after
            > that, postfix will create the maildir for each user.

            That doesn't work... If I create the domain directory, the dir for
            the user won't be created either.

            > I am assuming that you deliver with virtual (and not with an
            > external MDA).

            I'm a bit confused about what I use now... In main.cf is says:

            mailbox_command = procmail -a "$EXTENSION"

            which was a default value after installation (note: it's a Ubuntu
            system). In master.cf there are following lines:

            maildrop unix - n n - - pipe
            flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

            maildrop was not installed before. In the database tables I created
            while going through the tutorial was a "transport" column which
            defaults to "virtual:"; but I cannot see where this column is read.
            So...?


            Am 02.05.2009 um 23:34 schrieb LuKreme:
            > send the welcome mail when you create the account in postfixadmin..
            > The Maildirs are not created until a mail is delivered.

            Hell, yeah! That worked now! After I installed postfixadmin, the
            mail sending process took so long that the apache crashed (no process
            lived after submitting the form that should add new mailboxes :o!), so
            I commented that thing out. Thanks for that hint... The domain
            folder is created, too. Great :)!

            However that still doesn't make sense to me, that the "reader" (IMAP)
            "crashes" when there is no directory and the writer (MDA) needs to
            create the directory. If I don't want to send the welcome mail I have
            to initiate the Maildir creation process on my own. What would be the
            best way to do that? Using procmail oder maildrop? Or is there a way
            without using another software?

            Thank you all that helped and mailed!

            Regards,
            Matthias
          • mouss
            ... did you send a message to the user? ... this is for local users, not virtual users. if you don t want procmail, just remove this. ... what matters first
            Message 5 of 9 , May 2 6:02 PM
            • 0 Attachment
              Matthias Dietrich a écrit :
              >
              > Am 02.05.2009 um 23:09 schrieb mouss:
              >> you need to create the /var/spool/mail/example.com directory. after
              >> that, postfix will create the maildir for each user.
              >
              > That doesn't work... If I create the domain directory, the dir for the
              > user won't be created either.
              >

              did you send a message to the user?

              >> I am assuming that you deliver with virtual (and not with an external
              >> MDA).
              >
              > I'm a bit confused about what I use now... In main.cf is says:
              >
              > mailbox_command = procmail -a "$EXTENSION"
              >

              this is for "local" users, not virtual users. if you don't want
              procmail, just remove this.

              > which was a default value after installation (note: it's a Ubuntu
              > system). In master.cf there are following lines:
              >
              > maildrop unix - n n - - pipe
              > flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
              >
              > maildrop was not installed before. In the database tables I created
              > while going through the tutorial was a "transport" column which defaults
              > to "virtual:"; but I cannot see where this column is read. So...?
              >

              what matters first is postfix configuration. you should always send us
              the output of 'postconf -n'.

              >
              > Am 02.05.2009 um 23:34 schrieb LuKreme:
              >> send the welcome mail when you create the account in postfixadmin..
              >> The Maildirs are not created until a mail is delivered.
              >
              > Hell, yeah! That worked now! After I installed postfixadmin, the mail
              > sending process took so long that the apache crashed (no process lived
              > after submitting the form that should add new mailboxes :o!), so I
              > commented that thing out. Thanks for that hint... The domain folder is
              > created, too. Great :)!
              >
              > However that still doesn't make sense to me, that the "reader" (IMAP)
              > "crashes" when there is no directory and the writer (MDA) needs to
              > create the directory. If I don't want to send the welcome mail I have
              > to initiate the Maildir creation process on my own. What would be the
              > best way to do that? Using procmail oder maildrop?

              if you don't want to send a welcome message, then you need to create the
              Maildir when you add the user. because maildrop and procmail won't be
              run until a mail is received.

              instead, use a script to add users to your "database" and at the same
              time, create the necessary maildirs and folders.

              > Or is there a way
              > without using another software?
              >
              > Thank you all that helped and mailed!
              >
              > Regards,
              > Matthias
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.