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

    Hello,

    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:

    /vmail/examplehost.com/angel/
    /vmail/examplehost.com/mark/

    My goal is to have Postfix deliver an e-mail for angel@examplehost.com to both directories!
    I have the next parameters in Postfix's main.cf configuration file:

    virtual_mailbox_base = /vmail
    virtual_mailbox_maps = mysql:/etc/postfix/virtual_mysql_map.cf

    In MySql table I have:

    mail-----------------------------------------destination
    angel@examplehost.com----------examplehost.com/angel/
    mark@examplehost.com----------examplehost.com/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: examplehost.com/angel/, examplehost.com/mark/
    but the virtual daemon does not like that.

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

    but this parameter's conventions are:

    test@test.com test@test2.com
    and not
    test@test.com test.com/test/ (as in virtual_mailbox_maps)


    I will extremely apreciate help for this issue.

    Thank you
    Angel.
     
  2. topdog

    topdog 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:

    angel@examplehost.com mark@examplehost.com

    ... will make Postfix drop a copy of an email in /vmail/examplehost.com/angel/ and deliver another copy in /vmail/examplehost.com/mark/ 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 HowtoForge Supporter

    I think you need it this way
    Code:
    angel@examplehost.com angel@examplehost.com, mark@examplehost.com
    
     

Share This Page