On Thu, Jun 09, 2011 at 10:12:17AM +0200, Patrick Proniewski wrote:

> On 8 juin 2011, at 18:15, Victor Duchovni wrote:
> 
> > On Wed, Jun 08, 2011 at 11:33:48AM +0200, Patrick Proniewski wrote:
> > 
> >> After the period of double delivery is over, we will deliver emails only 
> >> to Google servers. So the virtual aliases map is to look like:
> >> 
> >>    public-addr...@univ-lyon2.fr    public-addr...@univ-lyon2.fr
> >>    some-al...@univ-lyon2.fr        public-addr...@univ-lyon2.fr
> >>    ...
> >> 
> >> The first line looks pretty silly to me. Is there any way to tell that 
> >> addresses not listed in virtual aliases map are to be forwarded "as is" ?
> > 
> > Your gateway needs a table of valid recipients, the domain in question
> > is presumably configured as a "relay domain" by being listed in
> > $relay_domains.
> 
> 
> In fact I've tried this. But this domain being already in
> virtual_alias_domains, it looks like it's not a good idea to put it
> also in relay_domains: postfix complains about this for every email
> passing thru:

You MUST remove the domain from the list of virtual alias domains.

> Jun  7 15:24:19 ru postfix-mailgw/trivial-rewrite[64375]: warning:
> do not list domain univ-lyon2.fr in BOTH virtual_alias_domains and
> relay_domains

You MUST remove the domain from the list of virtual alias
domains. Otherwise, addresses in this domain will not be deliverable
as-is.

> >  If you don't want to have identity mappings in
> > virtual_alias_maps, you need to add entries to relay_recipient_maps:
> > 
> >    main.cf:
> >     # Use "cdb" if you have it.
> >     default_database_type = hash
> >     indexed = ${default_database_type}:${config_directory}/
> >     relay_recipient_maps = ${indexed}relay_rcpts
> > 
> >    relay_rcpts:
> >     public-addr...@univ-lyon2.fr    valid
> >     ...
> > 
> > where the word "valid" on "the right hand side" of the table can be
> > replaced by any non-empty value that makes sense to you. Postfix
> > only needs the lookup key to map to a non-empty result.
> 
> I'm using this on MX, so that my servers are not acting as backscatters:
> only valid recipients are accepted by MX and transfered to MailGW. But as
> postfix won't accept using both virtual_alias_domains and relay_domains,
> I think this won't do the trick.

You MUST remove the domain from the list of virtual alias domains.
Note virtual alias mappings apply to all envelope recipient addresses,
regardless of address class, so there is no need to declare your domain
a virtual alias domain, unless it is truly just a set of alias mailboxes
that always forward to a *different* domain.

-- 
        Viktor.

Reply via email to