On Sun, Jan 30, 2011 at 05:36:00PM -0500, Wietse Venema wrote:

> The following is the simplest example that uses virtual_alias_maps
> to deflect unknown users to the MS Exchange mailserver, and that
> uses reject_unverified_recipient to find out if those users exist.
> Postfix 2.7 and later automatically cache the reject_unverified_recipient
> result.
> 
> /etc/postfix/main.cf:
>     virtual_alias_domains = a.example
>     virtual_alias_maps = hash:/etc/postfix/virtual_alias
>     smtpd_recipient_restrictions = 
>       reject_unauth_destination reject_unverified_recipient
> 
> /etc/postfix/virtual_alias:
>     user1@a.example   user1@localhost
>     user2@a.example   user2@localhost
>     @a.example                @ms-exchange-mailserver

The domain could be added to relay_domains, with relay_recipient_maps
set empty. An access table could have:

    rcpt-access:
        # Some known, verify the rest:
        example.com             reject_unverified_recipient
        example.net             reject_unverified_recipient

        # All known, so default reject:
        example.org             REJECT 5.1.1 Recipient address unknown

        # The list of known users
        #
        known-us...@example.com DUNNO
        known-us...@example.net DUNNO
        known-us...@example.org DUNNO
        ...

    main.cf:
        # Use access(5) instead of relay_recipient_maps:
        relay_recipient_maps = 
        relay_domains = example.com
        smtpd_recipient_restrictions =
            reject_unauth_destination,
            check_recipient_access hash:/etc/postfix/rcpt-access

-- 
        Viktor.

Reply via email to