[Mailman-Developers] Postfix virtual domains

Tollef Fog Heen tollef@add.no
26 Nov 2001 01:19:01 +0100


*  (Barry A. Warsaw)

| >>>>> "BAW" == Barry A Warsaw <barry@zope.com> writes:
| 
|     BAW> I figured out how to support Postfix-style virtual domains[1]
|     BAW> in a similar manner to the main aliases file, but I'm too
|     BAW> tired to finish implementing it tonight.
| 
| I'm about to check this stuff in, but it's a little kludgy.  I may not
| entirely understand Postfix-style virtual domains, so let me ask this:
| 
| Let's say I have two domains, er, dom1.com and dom2.com, and MX for
| both of these point to the same IP.  It seems to me that I have to
| have at least one of them in the mydestinations variable in main.cf.

No, you don't have to have any of them in mydestination in main.cf:

# The mydestination parameter specifies the list of domains that this
# machine considers itself the final destination for. That does not
# include domains that are hosted on this machine. Those domains are
# specified elsewhere (see sample-virtual.cf, and sample-transport.cf).

| It seems like there's no way to prevent sending a message to
| list-in-dom2@dom1.com working exactly the same as
| list-in-dom2@dom2.com.  This is because list-in-dom2 must have an
| entry both in the aliases file and the virtual file (with the virtual
| file entries pointing to the aliases entries), and the alias entries
| always work for mydestination domains.  Maybe other Postfix experts
| can help with this, but to me, it's not worth worrying about.

I've usually hacked around this by doing something like

-------------------- snip snip --------------------
dom2.com 	IGNORE
# For breaking bounce loops to the site list owners
mailman-loop@dom2.com: mailman-loop

# STANZA START: testlist
# CREATED: Fri Nov 23 18:39:34 2001
testlist@dom2.com:          com-dom2-testlist
testlist-admin@dom2.com:    com-dom2-testlist-admin
testlist-bounces@dom2.com:  com-dom2-testlist-bounces
testlist-join@dom2.com:     com-dom2-testlist-join
testlist-leave@dom2.com:    com-dom2-testlist-leave
testlist-owner@dom2.com:    com-dom2-testlist-owner
testlist-request@dom2.com:  com-dom2-testlist-request
# STANZA END: testlist
-------------------- snip snip --------------------

So that all aliases in the dom2.com domain is on the form
com-dom2-$ADDRESS.

afaik (and see), this is one of the better ways of avoiding name
clashes.

-- 

Tollef Fog Heen
Axiom #1: You Can't Win