1

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.

1 Answer 1

2

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:

[email protected]: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]

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:

 [email protected]: /path/to/file, |/path/to/pipe, [email protected]

Hope that helps.

3
  • ${lookup{$local_part@$domain}lsearch{/var/auth/valiases/$domain}} mean it look up for [email protected] (when [email protected] arrives) and take the email after the : and trigger the pipe_transport (virtual_pipe_address) Basically it does work for the first email, the other aren't triggered, what I am looking for are ways to tell the router to run multiple time as long as it matches. Aug 17, 2009 at 15:15
  • what version of exim are you running? 3 or 4? That require_files makes me fear you are running 3...
    – jj33
    Aug 17, 2009 at 15:23
  • im running exim 4.63 - and by the way I've done the changes you wrote here and now it is working perfectly. thanks a lot! Aug 17, 2009 at 20:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .