Greg Woods
2006-06-30 16:40:53 UTC
I'm having a small problem with a virtual domain. We have
mydomain=ucar.edu, but we serve a virtual domain called nlr.net. It had
to be a virtual domain because when we took nlr.net over, there were
existing aliases that conflicted with some from ucar.edu (i.e.
***@ucar.edu reaches our USENET admin, but ***@nlr.net is a Mailman
list). Everything works fine on the central server, but we also have a
Mailman server that wants to serve lists in both virtual domains. This
works OK as far as the Mailman server is concerned. Users can send mail
to the Mailman aliases and that all works. Addresses within ucar.edu
work. What doesn't work is non-Mailman aliases within nlr.net, when mail
is originated on the Mailman server. We discovered this when one of the
nlr.net list admins tried to use "***@nlr.net" as the list admin
address, and stopped receiving subscribe notifications. Attached is the
entire postconf -n output, but here are some of the more relevant config
file lines:
virtual_alias_maps = hash:/etc/mailman/virtual-mailman
alias_maps = hash:/etc/aliases, ldap:/etc/postfix/ldap_alias.cf
This doesn't quite work. The only nlr.net aliases that get correctly
delivered are those that are in the virtual-mailman map. Aliases within
the virtual domain that are in the LDAP server don't get recognized, but
they are there:
# postmap -q ***@nlr.net ldap:/etc/postfix/ldap_alias.cf
***@aldea.com
But "sendmail.postfix -bv ***@nlr.net" gets this response:
<***@nlr.net>: delivery via none: User unknown in virtual alias table
OK, so let's try putting the ldap:/etc/postfix/ldap_alias.cf into
virtual_alias_maps too. As soon as I do that, the aliases that overlap
between the domain and the virtual domain don't work correctly:
<***@mailman.ucar.edu> (expanded from <***@nlr.net>): delivery via
local: delivers to command: /usr/bin/procmail
That's because ***@nlr.net expands to ***@mailman.ucar.edu, and the
mailman.ucar.edu gets stripped out because it is the name of the local
host, and then "news" from the LDAP query gets expanded to
***@mailman.ucar.edu and that's a local address, so now nobody can
post to the Mailman list ***@nlr.net.
Is there some way to set this up to do what I want? I think I've tried
just about every order of the maps, but it always works out so that
either the nlr.net aliases that overlap with ucar.edu get interpreted as
the ucar.edu alias, or the nlr.net aliases that are not in the
virtual-mailman map will bounce.
# postmap -q ***@nlr.net hash:/etc/mailman/virtual-mailman
news
# postmap -q ***@nlr.net hash:/etc/aliases
# postmap -q ***@nlr.net ldap:/etc/postfix/ldap_alias.cf
***@mailman
# postmap -q news hash:/etc/mailman/virtual-mailman
# postmap -q news hash:/etc/aliases
"|/usr/lib/mailman/mail/mailman post news"
# postmap -q news ldap:/etc/postfix/ldap_alias.cf
woods
# postmap -q ***@nlr.net hash:/etc/mailman/virtual-mailman
# postmap -q ***@nlr.net hash:/etc/aliases
# postmap -q ***@nlr.net ldap:/etc/postfix/ldap_alias.cf
***@aldea.com
There is no "editor" in any of the maps.
What I want, of course, is something that doesn't require me to maintain
all of the virtual aliases on the Mailman system too, I want to get them
from LDAP.
--Greg
mydomain=ucar.edu, but we serve a virtual domain called nlr.net. It had
to be a virtual domain because when we took nlr.net over, there were
existing aliases that conflicted with some from ucar.edu (i.e.
***@ucar.edu reaches our USENET admin, but ***@nlr.net is a Mailman
list). Everything works fine on the central server, but we also have a
Mailman server that wants to serve lists in both virtual domains. This
works OK as far as the Mailman server is concerned. Users can send mail
to the Mailman aliases and that all works. Addresses within ucar.edu
work. What doesn't work is non-Mailman aliases within nlr.net, when mail
is originated on the Mailman server. We discovered this when one of the
nlr.net list admins tried to use "***@nlr.net" as the list admin
address, and stopped receiving subscribe notifications. Attached is the
entire postconf -n output, but here are some of the more relevant config
file lines:
virtual_alias_maps = hash:/etc/mailman/virtual-mailman
alias_maps = hash:/etc/aliases, ldap:/etc/postfix/ldap_alias.cf
This doesn't quite work. The only nlr.net aliases that get correctly
delivered are those that are in the virtual-mailman map. Aliases within
the virtual domain that are in the LDAP server don't get recognized, but
they are there:
# postmap -q ***@nlr.net ldap:/etc/postfix/ldap_alias.cf
***@aldea.com
But "sendmail.postfix -bv ***@nlr.net" gets this response:
<***@nlr.net>: delivery via none: User unknown in virtual alias table
OK, so let's try putting the ldap:/etc/postfix/ldap_alias.cf into
virtual_alias_maps too. As soon as I do that, the aliases that overlap
between the domain and the virtual domain don't work correctly:
<***@mailman.ucar.edu> (expanded from <***@nlr.net>): delivery via
local: delivers to command: /usr/bin/procmail
That's because ***@nlr.net expands to ***@mailman.ucar.edu, and the
mailman.ucar.edu gets stripped out because it is the name of the local
host, and then "news" from the LDAP query gets expanded to
***@mailman.ucar.edu and that's a local address, so now nobody can
post to the Mailman list ***@nlr.net.
Is there some way to set this up to do what I want? I think I've tried
just about every order of the maps, but it always works out so that
either the nlr.net aliases that overlap with ucar.edu get interpreted as
the ucar.edu alias, or the nlr.net aliases that are not in the
virtual-mailman map will bounce.
# postmap -q ***@nlr.net hash:/etc/mailman/virtual-mailman
news
# postmap -q ***@nlr.net hash:/etc/aliases
# postmap -q ***@nlr.net ldap:/etc/postfix/ldap_alias.cf
***@mailman
# postmap -q news hash:/etc/mailman/virtual-mailman
# postmap -q news hash:/etc/aliases
"|/usr/lib/mailman/mail/mailman post news"
# postmap -q news ldap:/etc/postfix/ldap_alias.cf
woods
# postmap -q ***@nlr.net hash:/etc/mailman/virtual-mailman
# postmap -q ***@nlr.net hash:/etc/aliases
# postmap -q ***@nlr.net ldap:/etc/postfix/ldap_alias.cf
***@aldea.com
There is no "editor" in any of the maps.
What I want, of course, is something that doesn't require me to maintain
all of the virtual aliases on the Mailman system too, I want to get them
from LDAP.
--Greg