On 9 juin 2011, at 17:46, Victor Duchovni wrote: > 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: >>>> >>>> [email protected] [email protected] >>>> [email protected] [email protected] >>>> ... >>>> >>>> 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.
So, if I understand correctly, you are saying that I can have this:
main.cf:
virtual_alias_domains =
somehost.univ-lyon2.fr
otherhost.univ-lyon2.fr
virtual_alias_maps = hash:/usr/local/etc/postfix-mailgw/virtual_alias
relay_domains =
univ-lyon2.fr
relay_recipient_maps =
hash:/usr/local/etc/postfix-mailgw/relay_recipients
/usr/local/etc/postfix-mailgw/virtual_alias:
[email protected] [email protected]
...
/usr/local/etc/postfix-mailgw/relay_recipients:
[email protected] OK
OR, I can have this (according to your first reply):
main.cf:
virtual_alias_domains =
somehost.univ-lyon2.fr
otherhost.univ-lyon2.fr
univ-lyon2.fr
virtual_alias_maps = hash:/usr/local/etc/postfix-mailgw/virtual_alias
/usr/local/etc/postfix-mailgw/virtual_alias:
[email protected] [email protected]
[email protected] [email protected]
...
> 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.
Ok, thank you!
Patrick PRONIEWSKI
--
Administrateur Système - DSI - Université Lumière Lyon 2
smime.p7s
Description: S/MIME cryptographic signature
