From: Noel Jones on
On 7/14/2010 5:09 PM, Phil Howard wrote:

> Every address in these domains will be rewritten to some other address
> (not all with the same domain) and sent on their way. Some of them
> will be rewritten to addresses that do fall into other classes for
> some kind of local delivery (right now, in virtual mailbox).

A domain where every address will be rewritten to a different
domain for delivery is a classic description of a
virtual_alias_domain. The "different domain" need not be a
single domain.

List the domain in virtual_alias_domains and list the address
mappings in virtual_alias_maps.


-- Noel Jones

From: Phil Howard on
On Wed, Jul 14, 2010 at 18:38, Wietse Venema <wietse(a)porcupine.org> wrote:
> Phil Howard:
>> Every address in these domains will be rewritten to some other address
>> (not all with the same domain) and sent on their way.  Some of them
>> will be rewritten to addresses that do fall into other classes for
>> some kind of local delivery (right now, in virtual mailbox).
>
> You give pretty much the definition of a Postfix virtual alias
> domain.
>
> All addresses are rewritten to an address in a different local or
> remote domain, therefore, the domain must be listed as a virtual
> alias domain, as per ADDRESS_CLASS_README.html.
>
>        Wietse

Thanks for confirming it. I wasn't clear from the documentation
because it seemed the only way to implement this would be to have
multiple maps be looked up each time a domain needed to be checked. I
just couldn't imagine that happening. BTW, I do think about how
things work not in terms of abstract definition, but rather, how steps
actually take place. So as I read documentation, I'm always thinking
about it that way. It's just who I am. Now I need to rewrite my
scripts to create separate maps for the domains.

--
sHiFt HaPpEnS!

From: Wietse Venema on
Phil Howard:
[ Charset ISO-8859-1 unsupported, converting... ]
> On Wed, Jul 14, 2010 at 18:38, Wietse Venema <wietse(a)porcupine.org> wrote:
> > Phil Howard:
> >> Every address in these domains will be rewritten to some other address
> >> (not all with the same domain) and sent on their way. ?Some of them
> >> will be rewritten to addresses that do fall into other classes for
> >> some kind of local delivery (right now, in virtual mailbox).
> >
> > You give pretty much the definition of a Postfix virtual alias
> > domain.
> >
> > All addresses are rewritten to an address in a different local or
> > remote domain, therefore, the domain must be listed as a virtual
> > alias domain, as per ADDRESS_CLASS_README.html.
> >
> > ? ? ? ?Wietse
>
> Thanks for confirming it. I wasn't clear from the documentation
> because it seemed the only way to implement this would be to have
> multiple maps be looked up each time a domain needed to be checked.

What part of the document suggests this?

Wietse

From: Phil Howard on
On Thu, Jul 15, 2010 at 09:53, Wietse Venema <wietse(a)porcupine.org> wrote:
> Phil Howard:
> [ Charset ISO-8859-1 unsupported, converting... ]
>> On Wed, Jul 14, 2010 at 18:38, Wietse Venema <wietse(a)porcupine.org> wrote:
>> > Phil Howard:
>> >> Every address in these domains will be rewritten to some other address
>> >> (not all with the same domain) and sent on their way. ?Some of them
>> >> will be rewritten to addresses that do fall into other classes for
>> >> some kind of local delivery (right now, in virtual mailbox).
>> >
>> > You give pretty much the definition of a Postfix virtual alias
>> > domain.
>> >
>> > All addresses are rewritten to an address in a different local or
>> > remote domain, therefore, the domain must be listed as a virtual
>> > alias domain, as per ADDRESS_CLASS_README.html.
>> >
>> > ? ? ? ?Wietse
>>
>> Thanks for confirming it.  I wasn't clear from the documentation
>> because it seemed the only way to implement this would be to have
>> multiple maps be looked up each time a domain needed to be checked.
>
> What part of the document suggests this?

The part that tells about more than one map for domains. If there is
one map for domains of one class, and another map for domains of
another class (e.g. virtual_alias_domains, and
virtual_mailbox_domains), then to determine how to handle a domain
(such as for an arriving message), more than one map would have to be
checked in at least some cases (where the domain isn't found in the
first that is checked).

--
sHiFt HaPpEnS!

From: Wietse Venema on
Phil Howard:
> On Thu, Jul 15, 2010 at 09:53, Wietse Venema <wietse(a)porcupine.org> wrote:
> > Phil Howard:
> > [ Charset ISO-8859-1 unsupported, converting... ]
> >> On Wed, Jul 14, 2010 at 18:38, Wietse Venema <wietse(a)porcupine.org> wrote:
> >> > Phil Howard:
> >> >> Every address in these domains will be rewritten to some other address
> >> >> (not all with the same domain) and sent on their way. ?Some of them
> >> >> will be rewritten to addresses that do fall into other classes for
> >> >> some kind of local delivery (right now, in virtual mailbox).
> >> >
> >> > You give pretty much the definition of a Postfix virtual alias
> >> > domain.
> >> >
> >> > All addresses are rewritten to an address in a different local or
> >> > remote domain, therefore, the domain must be listed as a virtual
> >> > alias domain, as per ADDRESS_CLASS_README.html.
> >> >
> >> > ? ? ? ?Wietse
> >>
> >> Thanks for confirming it. ?I wasn't clear from the documentation
> >> because it seemed the only way to implement this would be to have
> >> multiple maps be looked up each time a domain needed to be checked.
> >
> > What part of the document suggests this?
>
> The part that tells about more than one map for domains. If there is
> one map for domains of one class, and another map for domains of
> another class (e.g. virtual_alias_domains, and
> virtual_mailbox_domains), then to determine how to handle a domain
> (such as for an arriving message), more than one map would have to be
> checked in at least some cases (where the domain isn't found in the
> first that is checked).

Postfix will search up to four tables to decide how to handle a
recipient address:

virtual_alias_domains -> rewrite recipient to other domain
mydestination -> deliver with local(8)
virtual_mailbox_domains -> deliver with virtual(8)
relay_domains -> deliver with smtp(8)

This could have been done with one table, but that would have broken
compatibility with Postfix version 1.1 which already had multiple
tables (mydestination and relay_domains).

Wietse