0

Is it possible to use a wildcard for the recipient in a virtual domain forwarder file with exim?

I have setup the config as found here: http://www.debian-administration.org/article/140/Handling_mail_for_multiple_virtual_domains_with_exim4

e.g.

admin*: [email protected]

It doesn't honour the wildcard.

I've temporarily worked around the problem by using a (*) catch all to :blackhole:

1 Answer 1

1

You are misunderstanding the minutia of lsearch*@. It means that the linear search may be done twice: the first time it searches the text file looking for the supplied text string. If it doesn't find anything, it then searches the text file looking for a single "*" catchall.

That's not what you want. You want the wildcard to be expanded, so you want to use nwildsearch@ instead.

3
  • Excellent stuff Todd - thank you! I used the following to get it going: data = ${expand:${lookup{$local_part}nwildlsearch*@{/etc/exim4/virtual_hosts/$domain}}} Jul 29, 2014 at 20:49
  • You shouldn't need the * part of it since nwildsearch is already doing wildcard expansion, but if it works for you, there is no need to mess with it.
    – Todd Lyons
    Jul 30, 2014 at 12:56
  • The other thing I found is that I had to use a regex for it work in the virtual_hosts file - e.g. ^admin-(.*)$: :blackhole: Oct 10, 2014 at 12:12

You must log in to answer this question.

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