Postfix Virtual accounts, virtual daemon; Delivery to to Maildirs at same time.

Discussion in 'Server Operation' started by Angelito, Jan 30, 2008.

  1. Angelito

    Angelito New Member


    I have Postfix running in a test server; I have the installation set for Maildir delivery using virtual accounts (virtual mailboxes-non existing linux accounts) and I am able to send and receive e-mails.

    I am looking for a way to make Postfix deliver an e-mail to two (or more if specified) Maildir (s) at the same time; for example, I have set two directories for virtual-mailbox delivery:


    My goal is to have Postfix deliver an e-mail for [email protected] to both directories!
    I have the next parameters in Postfix's configuration file:

    virtual_mailbox_base = /vmail
    virtual_mailbox_maps = mysql:/etc/postfix/

    In MySql table I have:

    [email protected]/angel/
    [email protected]/mark/

    This and the rest of the configuration is working fine, but I just can't get to a solution for what I want to do.

    I try inserting in the table's destination field:,
    but the virtual daemon does not like that.

    I have also tried the Postfix's parameter in
    virtual_alias_maps = hash:/etc/postfix/virtual_alias

    but this parameter's conventions are:

    [email protected] [email protected]
    and not
    [email protected] (as in virtual_mailbox_maps)

    I will extremely apreciate help for this issue.

    Thank you
  2. topdog

    topdog Active Member HowtoForge Supporter

    I dont see why virtual_alias_maps will not work because the users maildir is not a different one from the default i mean if you want to deliver the same mail to two mail boxes belonging to two users its simply an aliasing issue.
  3. Angelito

    Angelito New Member

    Thank you for your reply topdog!

    so if virtual_alias_maps should be able to do the job, it would mean that having the next entry for this parameter:

    [email protected] [email protected]

    ... will make Postfix drop a copy of an email in /vmail/ and deliver another copy in /vmail/ without erasing the first copy dropped?

    If this is the case my issue is solved.

    once again thank you.
    any comments/help/suggestions are welcome.
  4. topdog

    topdog Active Member HowtoForge Supporter

    I think you need it this way
    [email protected] [email protected], [email protected]

Share This Page