[exim] Removing addresses from mail before delivery?

Top Page
Delete this message
Reply to this message
Author: Jon 'Boli' Copeland
Date:  
To: exim-users
Subject: [exim] Removing addresses from mail before delivery?
Hi All

I have a problem with some people insisting on CCing every single
address they have for my company on every email they send. No amount of
asking politely seems to stop this.

What I want to do, serverside, is something like the following

|while (TO+CC contains more than one of a@x b@x c@x) remove in reverse
order (c@x, b@x, a@x) until (TO+CC contains only one of a@x b@x c@x)
finally deliver mail to the address(es) that remain |

...but not sure where to start.

Bonus points are available if there's an easy way to send a bounce to
the sender for each address that has to be removed.

Thanks

--
Boli