Auteur: David Cannings Date: À: exim-users Sujet: [exim] Searching for address in router
I currently have exim using files in /etc/exim/virtual to deliver mail
to system users via Cyrus. This works great for system users but I'd
now like to expand it so it can also deliver to "virtual" users, which
will be handled by Cyrus.
Below is what I use at present which handles aliasing different accounts
on different domains to system users. It works great, including for
wildcards, but doesn't handle delivery to virtual users.
# Transport
local_delivery:
driver = pipe
command = "/usr/lib/cyrus/deliver ${local_part}"
return_path_add = true
envelope_to_add = true
return_output
message_prefix =
user = cyrus
########
Essential I'm looking for a router which will validate whether the given
address is in a file, say /etc/exim/virtuals/virtual. I had intended
the file to simply be a list of valid virtual accounts, such as:
user@???
bob@???
..
I'll then create the files /etc/exim/virtual/<domain> to handle aliasing
like we currently do but instead of using "bob: systemuser" I'll use
"bob: virtual@???". As example.net is local, when it redirects
I'd hope to see it find 'virtual@???' in my
/etc/exim/virtuals/virtual file and deliver using another Cyrus
transport. At a guess, the new router needs to go between the two I
current have.
Obviously I want 'domains = +localdomains' in the router but I can't
figure out how to validate the whole address against a file in a 'driver
= accept' router. Once I've figured this out, the actual transport is
easy, as it just involves creating a new transport with a different
options to the 'deliver command.
If anybody can nudge me in the right direction it'd be greatly appreciated.