On Thu, May 07, 2015 at 03:56:18PM +0500, Kashif Ali Bukhari wrote:

> I am in the process of moving my email server from Microsoft Office365
> to Postfix.  Postfix is setup and working like charm, but now I want all
> incoming emails delivered to a Postfix recipient to also send a copy to
> a Microsoft Office365 mailbox.

This is done by either of two mechanisms:

        http://www.postfix.org/postconf.5.html#virtual_alias_maps
        http://www.postfix.org/postconf.5.html#recipient_bcc_maps

You need a suitable lookup table that maps each recipient's valid
email addresses to the correspoding Office365 address and, in the
case of virtual aliases, also the appropriate "local" mailbox
address.

This means that each user needs an email address that Office365
delivers (exclusively) to the user's mailbox, and another email
address that Postfix delivers exclusively to the user's mailbox.
Either, but not both can be the primary address of the user.

However, you'll probably run into loads of pain around SPF records,
since Microsoft will reject mail you forward as forgeries, because
they come from addresses not marked as permitted by the sender
domain's SPF records.

You'll need to make sure that Microsoft whitelists your Postfix
server for delivery of SPF-violating messages to recipients in
your hosted domain.  This is critical, and is the main problem
you have to deal with.

The difference between virtual_alias_maps and recipient_bcc_maps
is explained in further detail in:

        http://www.postfix.org/ADDRESS_REWRITING_README.html
        http://www.postfix.org/virtual.5.html

Short version:

    virtual(5) mapping is recursive, (and in fact applies to
    he output of recipient_bcc_maps).

    recipient_bcc_maps is not recursive, and when possible
    suppresses bounces to the sender when delivery fails.

-- 
        Viktor.

Reply via email to