On Tue, Jun 30, 2020 at 12:05:27AM +0300, Dima Veselov wrote:

> > The "uid" attribute is too "flat" for use in routing email to
> > distributed mail stores.  Therefore you need a second
> > email-address-valued attribute that holds the destination mailbox
> > address:
> > 
> >      uid: ivan
> >      initials: i.denisovich
> >      mail: i.denisov...@example.com
> >      maildrop: i.denisov...@moscow.example.com
> > 
> > At any site other than moscow, the "moscow.example.com" domain would be
> > remote, and email to the user will be forwarded via SMTP.  However, at
> > the "moscow.example.com" site, the domain would be considered "local",
> > and local aliases(5) would rewrite the address to "ivan" (possibly
> > with an appropriate @domain suffix), and deliver to the user's mailbox.
> 
> That is what I am wondering most about. Do we really have to rewrite 
> anything? Or you just mean aliases(5) will find proper mailbox to drop
> mail in?

Yes, rewrites are the best way to do this.  Aliases(5) is not the right
mechanism, because it only applies to local(8) delivery, which you
should avoid except perhaps at the actual destination mailstore.  And
ever there, you're better off with LMTP or another virtual mailbox
delivery mechanism.

Use local(8) *ONLY* for mail to pipes and ":include:" lists with
owner aliases.

Ordinary address -> address rewriting should be done via virtual(5)
not aliases(5).

What I am describing above is best-practice.  It is of course possible
to kludge something together with aliases(5), ... but I strongly
recommend against it.

-- 
    Viktor.

Reply via email to