Find the answer to your Linux question:
Results 1 to 6 of 6
Iam using postfix 2.3.3 with LDAP, courier-imap and squirrel mail It is working fine. Now when i add users to LDAP, the maildirectories should be created auotmatically with username and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    22

    Automatic creation of maildirs in postfix


    Iam using postfix 2.3.3 with LDAP, courier-imap and squirrel mail
    It is working fine. Now when i add users to LDAP, the maildirectories should be created auotmatically with username and maildirsize .(IN LDAP maildirpath=/var/postfix/maildirs/username).

    But with qmail, it is automatically creating. How can do in postfix????

    whether maildrop maildirmake or /etc/skel have to use achieve this.
    ??????????????
    Any help Appreciated...................

  2. #2
    Just Joined!
    Join Date
    Sep 2011
    Posts
    19
    Postfix is known not to create directories for you, I always fix this by modifying /etc/skel as you suggest, or adding it to your create user script somewhere.

    --Eric

  3. #3
    Just Joined!
    Join Date
    Jun 2009
    Posts
    22

    How to fix with /etc/skel

    How to fix this problem with /etc/skel??? can u give me detailed steps???

    Any create user script is available for that??????
    Plz help me

  4. #4
    Just Joined!
    Join Date
    Sep 2011
    Posts
    52
    Just copy an existing empty(with no mail files in it) Maildir to /etc/skel.

    From my experience I learned that the maildir is added automatically when you login via POP/IMAP or an email is sent to the newly created mail account. Doesn't it happen to you the same?

  5. #5
    Just Joined!
    Join Date
    Jun 2009
    Posts
    22

    maildrop - maildirmake

    i have installed maildrop. in that using maildirmake only iam manually creating maildirs.
    maildirmake /var/postfix/maildrs/sample
    chown -R vmail:vmail /var/postfix/maildirs/sample
    then cur,tmp,new folder is coming.........
    when i login IMAP server , maildirsize is created automatically....
    But i want to create maildir automatically..........

  6. #6
    Just Joined!
    Join Date
    Sep 2011
    Posts
    19
    I do not believe there is a way for Courier IMAP to create this automatically, but you could put this command in Cron and run every five minutes; then when you add users to the system their mail directory will be created within five minutes:

    getent passwd | cut -f1 -d: | while read u; do
    if ! [ -d "/var/postfix/maildirs/$u" ]; then
    mkdir -p "/var/postfix/maildirs/$u/"{cur,tmp,new}
    chown -R vmail:vmail "/var/spool/maildirs/$u"
    fi
    done

    It is a bit of a hack, it would work!


    -Eric

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •