Local delivery with virtual_mailbox_domains

Wojtek
2013-06-10
2013-06-10
  • Wojtek

    Wojtek - 2013-06-10

    I have setup virtual mailboxes and those are working just fine. Now I want to have also e-mail delivered to some local unix accounts like postmaster, abuse etc.

    What is the proper way to do ? According to the postfix documentation virtual alias map should be enough.

    This is pretty much my config:

    #cat /etc/postfix/main.cf
    myhostname = mail.example.com
    mydomain = example.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = $mydomain
    relayhost =
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
    smtpd_helo_restrictions = reject_invalid_helo_hostname,
    smtpd_client_restrictions = reject_rbl_client dnsbl.sorbs.net
    #Use virtual mailbox system class to not create UNIX accounts on the system
    virtual_mailbox_base = /var/vmail
    virtual_mailbox_domains = example.com
    virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox-maps
    virtual_minimum_uid = 500
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    virtual_alias_maps = hash:/etc/postfix/virtual

    #cat /etc/postfix/virtual
    postmaster@example.com root

    With this configuration postfix is bouncing the message back saying 'unknown user root@example.com' because the user doesn't exist in virtual domain I assume.

    Thanks for help or hints.
    Wojtek

     
  • Christian Boltz

    Christian Boltz - 2013-06-10

    mydomain = example.com
    virtual_mailbox_domains = example.com

    That's the error - you can't have a domain in local and virtual. (If you look in your mail log, you'll probably notice that Postfix also complains about this.)

    BTW: This forum is about PostfixAdmin, a web interface to manage virtual domains, mailboxes etc. in a database. For general Postfix questions, please ask on a mailinglist or forum dedicated to Postfix. You can find them on postfix.org.

     
  • Wojtek

    Wojtek - 2013-06-10

    OK, thank You and sorry for getting into a wrong place.

     

Log in to post a comment.