Philip Hazel wrote:
>
> #transport
> message_transport:
> driver = autoreply
> from = postmaster@xxxxx
> to = $sender_address
> text = "${local_part}'s address is now ....."
> user = mail
>
> #director
> message_sender:
> driver = smartuser
> transport = message_transport
> domains = original_company.com
> condition = $sender_address
> unseen
>
> This is completely untested and off the top of my head.
OK, but how do I add the checking to see which is the prober domain to
send it to? I was thinking of a test that would do something like grab
the $domain off of the NIS+ alias list, and then use the appropriate
message_transport: with one for this company, and one for the other.
Perhaps just setting up a small database that maps all my forwarding
aliases to the new companies would be easier.
can I do something like
message_transport:
if $domain contains old_company then
if
${lookup{${local_part}:new_company}lsearch{/usr/exim/new_company_map}{$value}}
is company1 then
driver = autoreply
from = postmaster@xxxx
to = $sender_address
text = "${local_part}'s address is now ${local_part}@company1"
user = mail
else
driver = autoreply
from = postmaster@xxxx
to = $sender_address
text = "${local_part}'s address is now ${local_part}@company2"
user = mail
endif
endif
then have it expand via aliases and deliver the message as usual
This of course assumes that I have a file that says something like
user1=company1
user2=company2
user3=company2
user4=company1
...
at /usr/exim/new_company_map
--
+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
* mailto:james.dehnert@cerent.com http://www.cerent.com *
+ James "Zeke" Dehnert Cerent Corporation +
* IS 1450 North McDowell Blvd. *
+ Eschew Obfuscation 707.793.9055 Petaluma, CA 94954 +
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
+ Opinions expressed are not those of Cerent Corporation. +
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*
--
*** Exim information can be found at
http://www.exim.org/ ***