Okay... here's one for the gurus:
I'm hosting a bunch of domains and I want to have alias files that work for
all of their subdomains. Now, for the time being, I'm having to settle for
just
http://www.domain.com and "domain.com". The way I do this is with the
following director:
domain_aliases:
driver = aliasfile
file_transport = address_file
pipe_transport = address_pipe
file = /etc/aliases.d/$domain
search_type = lsearch*
So, I have a directory called "/etc/aliases.d" (I still have a system-wide
/etc/aliases file for "postmaster", etc... so that name is taken. Had to use
the ".d" on the end for the directory).
Now, the pain in the butt comes in where, in the /etc/aliases.d directory,
any subdomains I want, I need to make a symlink or something to that effect:
ln -s domain.com
www.domain.com
ln -s domain.com mail.domain.com
etc....
Not my idea of a good time.
Now, I noticed something when I was looking through the docs on the ability
to have domain lookup files for the "local_domains" directive. In that
directive, you can specify "partial-" and it causes Exim to do wildcard
matches. So, if I say:
local_domains = "partial-lsearch;/etc/exim.domains"
and then, in /etc/exim.domains, I put things like:
*.domain.com
then all subdomains of "domain.com" are considered local. Cool! Now, the
*really* cool part is that the documentation says that, in some parts of the
conf file, the *matched* domain (which I'm taking to mean, the part of the
destination domain that was matched in my exim.domains file) is available
through the "$domain_data" variable. Hot damn! That would make you think
that, in my domain-specific aliases director, I could replace:
file = /etc/aliases.d/$domain
with
file = /etc/aliases.d/$domain_data
and then I could chuck all of those symbolic links, in /etc/aliases.d, huh?
Well, it doesn't seem to work.
Does anybody know of pulling this trick off anyway? Or, better yet, does
anyone know who I'd have to bribe to make "$domain_data" available from the
directors section?
- Joe
-----------------------
"When I made a shadow on my window shade,
They called the police and testified.
But they're like the people chained up in the cave,
In the alegory of the people in the cave by the greek guy"