[Maildir] Converting from Qmail to Postfix

Discussion in 'HOWTO-Related Questions' started by Wido, May 12, 2006.

  1. Wido

    Wido New Member


    Right now i am running a Qmail box with Vpopmail.

    It saves his mail like this:


    I followed this howto: http://www.howtoforge.com/virtual_postfix_mysql_quota_courier

    It works ok, but it saves his mail without /Maildir/ in the path.

    I have to convert about 12.000 domains, so it would be very nice if i could force Postfix to also use that directory structure.

    I assume i have to change something in the main.cf and something in authmysqlrc of courier, right?

    I already added home_mailbox = Maildir/ to postfix's main.cf, but that does not add the Maildir directory to the path.

    So what i want:

    Mail to be delivered in: /home/vmail/domain/user/Maildir/(new|cur|tmp)

    Can anyone help me with this?

    Thank you!
  2. falko

    falko Super Moderator ISPConfig Developer

    I think you'll have to change select_field in /etc/postfix/mysql-virtual_mailboxes.cf and MYSQL_MAILDIR_FIELD in /etc/courier/authmysqlrc.
  3. Wido

    Wido New Member

    Thanks! That worked :)

    select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/Maildir/')
    MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/Maildir/')

Share This Page