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:

Jun  7 15:24:18 ru postfix-mailgw/trivial-rewrite[64375]: warning: do not list 
domain univ-lyon2.fr in BOTH virtual_alias_domains and relay_domains
Jun  7 15:24:18 ru postfix-mailgw/trivial-rewrite[64375]: warning: do not list 
domain univ-lyon2.fr in BOTH virtual_alias_domains and relay_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


>  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.


> This said, the identity virtual_alias_maps mappings are a fine way
> to achieve the same result. The lookup will be done anyway, and you
> already have a virtual alias table, so it may in fact be simpler to
> keep using the identity mappings, but you MUST make sure that 
> relay_recipient_maps (assuming the domain is a relay domain) is
> set to some table (be it one with no entries).

Ok

Thank you Viktor.

Patrick PRONIEWSKI
-- 
Administrateur Système - DSI - Université Lumière Lyon 2

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to