On Mon, Sep 23, 2013 at 04:58:07PM -0400, Tim Prepscius wrote:

> I'm having some problems with virtual domains.  The goal of the
> virtual domains is to enumerate the domains which I'm ok with
> receiving mail.
> 
> So in my main.cf file I have:
> 
> virtual_mailbox_domains = hash:/etc/postfix/config/virtual_domains

It is far simpler when the domain list is short and relatively stable
to simply list the domains in main.cf:

        virtual_mailbox_domains = example.com, example.org

> And the /etc/postfix/config/virtual_domains looks like:
> mydomain.com
> 

If you want an external file with just a list of domains (that
is loaded into memory by Postfix processes) then the syntax is:

    virtual_mailbox_domains = /etc/postfix/config/virtual_domains

without the "hash:" prefix.  If you want an indexed table, which
is not loaded into memory (scales better for large lists, and
typically does not require a "reload" after updates), then use
"cdb:", "hash:", "btree:", ...

> Firstly:
> postfix complains that it can't find "/etc/postfix/config/virtual_domains.db"
> so I renamed /etc/postfix/config/virtual_domains to
> /etc/postfix/config/virtual_domains.db...

        http://www.postfix.org/DATABASE_README.html#types
        http://www.postfix.org/DATABASE_README.html#safe_db

With indexed files, you need to run "postmap type:file" to generate
the indexed table from the raw ASCII source.

-- 
        Viktor.

Reply via email to