> On Nov 10, 2017, at 8:22 AM, Tom Marcoen <tom.marc...@gmail.com> wrote:
> 
> Last week however, I was reading a book on Dovecot written by Peer
> Heinlein and he says that if you put a Postfix server in front of
> Dovecot you should use 'relay_domains' for these domains, combined
> with 'transport_maps'.

This is not necessary.  LMTP is not SMTP, and you're not relaying
the mail.  And even if you were, the destination is not a store-
and-forward MTA, but a mailstore.  So it is not unreasonable to
model the associated domain as a virtual mailbox domain.  You
can in that case put anything you want in the RHS of the virtual
mailbox table:

        user@virtual.example    VALID

the table is only used for recipient validation, not mailbox
location, which is determined by the mailstore.

> Is there any real difference in using one method or the other and,

That said, much the same works with relay_domains and
relay_recipient_maps.  Provided, with relay_domains, you
are careful with "parent_domain_matches_subdomains" and
avoid accidentally accepting mails for subdomains when
you only intend to receive email for the domain.

I'd be inclined to stick with virtual mailbox.

> perhaps more importantly, what is the recommended way of sending
> emails from Postfix to Dovecot? The advantage of Peer's method is that
> you can place the Postfix server in a DMZ and it does not need access
> to your MySQL/... database for username information.

Losing recipient validation is NOT an advantage.  Either way,
you need to have a table of valid recipients to avoid backscatter.

-- 
        Viktor.

Reply via email to