On Sat, Jun 18, 2022 at 09:27:52PM -0600, Austin Witmer wrote:

> Using
> https://wiki.alpinelinux.org/wiki/Setting_up_postfix_with_virtual_domains
> <https://wiki.alpinelinux.org/wiki/Setting_up_postfix_with_virtual_domains>
> as a bit of a tutorial, I got one of my domains switched over to being
> a virtual domain and was able to send and receive email for a user on
> the domain I transferred.
> 
> Do I have to have the users setup now both in my postgresql database
> and also in the /etc/postfix/virtual_mailbox_maps file? That would
> seem redundant.

The "virtual_mailbox_maps" table can query postgresql (typically as

    main.cf:
        pgsql = proxy:pgsql:${config_directory}/
        virtual_mailbox_maps = ${pgsql}vmbox.cf

    vmbox.cf:
        # See http://www.postfix.org/pgsql_table.5.html
        # If delivery is via virtual(8), then the RHS must be a
        # suitable path (typically maildir directory)
        # If delivery is via LMTP or dovecot LDA, then RHS can
        # be any non-empty token.
        ...

> Is there a way to use virtual domains and have all the user info
> stored in my postgresql database?

Of course.

-- 
    Viktor.

Reply via email to