Le 29/06/2011 01:07, Jay G. Scott a écrit :
> Hello,
> 
>       This machine has a list of legitimate users but does not deliver
> mail locally.  (It's a mail gateway.)
> 
>       Presently user schumi gets copies of his mail delivered to three
> systems.  The three destinations are listed in virtual_alias_maps.
> 
> schumi: sch...@inm.arlut.utexas.edu, sch...@ns8.arlut.utexas.edu, 
> sch...@vme.arlut.utexas.edu

this is not a virtual alias. this looks like a "local" alias. for
virtual aliases, specify the full address (with the domain part) and do
not use a ':'.

> 
>       By management fiat, mail that is addressed incorrectly to
> sch...@nonexistent.arlut.utexas.edu
> should be delivered to sch...@arlut.utexas.edu.  It is, but
> I get multiple copies.  recipient_canonical_maps:
> 
> /^schumi@.*\.arlut\.utexas\.edu$/       sch...@arlut.utexas.edu

why use canonical? use a virtual alias instead.

> 
>       From the logs I see that the alias gets expanded into three,
> and then canonicalized, so that each target gets three copies of the
> email.

virtual_alias_maps =
        ...
        hash:/path/to/valias.hash
        pcre:/path/to/valias.pcre

== valias.hash
# single line follows
sch...@example.com sch...@inm.arlut.utexas.edu,
sch...@ns8.arlut.utexas.edu, sch...@vme.arlut.utexas.edu

sch...@inm.arlut.utexas.edu     sch...@inm.arlut.utexas.edu
sch...@ns8.arlut.utexas.edu     sch...@ns8.arlut.utexas.edu
sch...@vme.arlut.utexas.edu     sch...@vme.arlut.utexas.edu

== valias.pcre
/^scuhmi@.*\.arlut\.utexas\.edu$/       sch...@arlut.utexas.edu


> 
>       Obviously, I want to get rid of the duplicates.
> 
>       For outgoing mail I must avoid MX lookups as part of my
> load balancing and fault tolerance, so I must set relayhost.
> Only the official mail servers have MX records in DNS, so any
> other machines that accept mail must be listed in the transport_maps.
> 
> 
> postconf -n
> 

Reply via email to