postfix-users October 2010 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: Aliases LDAP maps from the MX ?

Re: Aliases LDAP maps from the MX ?

From: Victor Duchovni <Victor.Duchovni_at_nospam>
Date: Fri Oct 08 2010 - 15:47:30 GMT
To: postfix-users@postfix.org

On Fri, Oct 08, 2010 at 11:15:46AM -0400, Wietse Venema wrote:

> > > /etc/postfix/main.cf:
> > > transport_maps = mapping from example.com to smtp:mailhub.example.com
> > > relay_domains = example.com
> > > virtual_alias_maps =
> > > mappings from external-user@example.com to internal-user(s)@example.com
> > >
> > > Unless I am missing something obvious (in which case Victor will
> > > helpfully point out what's missing).
>
> The only problem I see is that this would accept mail for non-existent
> recipients, so you still need to specify relay_recipient_maps but the
> table can be empty. The recipient address validation is then done by
> virtual_alias_maps.
>
> /etc/postfix/main.cf:
> transport_maps = mapping from example.com to smtp:mailhub.example.com
> relay_domains = example.com
> relay_recipient_maps =
> some table that can be empty.
> virtual_alias_maps =
> mappings from external-user@example.com to internal-user(s)@example.com

I avoid the need for such empty relay tables, by making all my
externally-facing domains (the domains in which users get their
primary email addresses) be virtual alias domains. All internal
delivery is to "mailbox" domains that are the result of virtual
alias rewrites:

    main.cf:
        virtual_alias_domains = example.com

        indexed = ${default_database_type}:${config_directory}/
        virtual_alias_maps = ${indexed}virtual
        transport_maps = ${indexed}transport

    virtual:
            user@example.com user@mbox-domain.example.com

    transport:
        # Mbox domain has MX hosts:
            mbox-domain.example.com mbox-domain.example.com

        # Mbox domain has a gateway:
            # mbox-domain.example.com [mbox-domain.example.com]

-- Viktor.