Odhiambo G. Washington wrote:
> * Justin Koivisto <justin@???> [20040928 21:28]: wrote:
>
>>I have been reading quite a few articles and mail list archives to try
>>and set up my exim4 server to work with alias files for each domain.
>>After reading all these sources, I finally came up with the following setup:
>>
>>domainlist local_domains = @:localhost:dsearch;/etc/mail/virtual
>>...
>>
>># Routers
>>
>>vdom_aliases:
>> driver = redirect
>> allow_defer
>> allow_fail
>> domains = dsearch;/etc/mail/virtual
>> data = ${lookup{$local_part}lsearch*{/etc/mail/virtual/$domain}}
>> file_transport = address_file
>> pipe_transport = address_pipe
>> retry_use_local_part
>>
>>real_local:
>>...
>>
>>Then /etc/mail/virtual/koivi.com would look like:
>>
>>justin: myusername
>>greg: otherusername
>>...
>>
>>This all works great. However, when I added an entry like:
>>
>>*: yetanother
>>
>>Now *all* mail to that domain gets delivered to the yetanother mailbox
>>unless that wildcard line is removed. What am I missing?
>
> Put that vdom_aliases router immediately above your system_aliases
> router.
Putting vdom_aliases below real_local (above your system_aliases) didn't
make a difference.
What I eventually want to accomplish is to have my alias files like:
example1.com
-------------
me: sysuser1
you: sysuser2
other: sysuser3
meagain: sysuser1
*: sysuser3
example2.com
------------
info: sysuser4
admin: sysuser5
help: sysuser6
*: sysuser4
Then have the messages routed like this:
me@??? -> sysuser1
you@??? -> sysuser2
meagain@??? -> sysuser1
info@??? -> sysuser3
sysuser4@??? -> sysuser3
me@??? -> sysuser4
admin@??? -> sysuser5
help@??? -> sysuser6
info@??? -> sysuser4
sysuser1@??? -> sysuser4
That way, if $local_part is a system user, it will only be delivered to
them if the correct $domain was specified. Am I even on the right track
for this?