I wrote 2 routers to take care of forwarding in one of my mail server:
virtual_aliases_nostar:
driver = redirect
allow_defer
allow_fail
require_files = "+/var/auth/valiases/$domain"
data = ${lookup{$local_part@$domain}lsearch{/var/auth/valiases/$domain}}
file_transport = address_file
group = mail
pipe_transport = virtual_address_pipe
retry_use_local_part
unseen
virtual_aliases:
driver = redirect
allow_defer
allow_fail
require_files = "+/var/auth/valiases/$domain"
data = ${lookup{*}lsearch{/var/auth/valiases/$domain}}
file_transport = address_file
group = mail
pipe_transport = virtual_address_pipe
unseen
Which call for this transport:
virtual_address_pipe:
driver = pipe
group = some_user
return_output
user = some_user
In case there is a valiases/somedomain.com file like the one below, it will resolve the first email and forward it but will stop there.
[email protected]: [email protected]
[email protected]: [email protected]
[email protected]: [email protected]
[email protected]: [email protected]
[email protected]: [email protected]
[email protected]: [email protected]
[email protected]: [email protected]
Basically [email protected] will be forwarded to [email protected] only and stop there. Any idea why it happens? thanks.
What are you expecting it to do? You seem to expect the
virtual_address_pipe
transport to be called, but the aliasfile example you give doesn't have any pipe aliases in them...omigosh... I just reread your question for the 20th time. I got distracted by the fact that what you are describing doesn't quite gel with your example, since a redirect to another email address wouldn't trigger a pipe_transport. I'm going to assume your real alias file redirects to actual pipes and it got lost in translation when you tried to clean up for an example instead of posting the real config and alias file you are having problems with.
Anyway, ignoring that, I think the answer to your question is as simple as putting all the targets on a single line:
You only ever do one lookup per local_part in a router like that. Pu all the targets on a single line and Exim will handle re-routing/transporting/etc all the targets that are looked up. This works for email address, files, and pipes:
Hope that helps.