Re: [Exim] a paranoical boss....

Página Inicial
Delete this message
Reply to this message
Autor: Tim Jackson
Data:  
Para: exim-users
Assunto: Re: [Exim] a paranoical boss....
Hi Esteban, on Tue, 6 Jul 2004 16:30:12 -0300 you wrote:

> Our boss wants this...


It's truly amazing how many stupid "bosses" there are out there, isn't it?

> Employes only can receive mails from other employes... all the other
> stuff is routed to his e-mail address without knowledge of the
> employed...


1. I hope that's legal where you are.

2. Assuming it is, and you can't persuade your boss to stop being a
complete nutter, you need a couple of simple routers. I'm not clear
whether you mean that "any mail sent by an employee, which is not to
another employee, is redirected", "all inbound mail from the outside world
is routed to boss" or both. The latter sounds more like it, but in that
case it's not even worth running an externally-accessible e-mail
service...

Anyway, I'm not quite sure why I'm telling you how to do such a blatently
silly thing, but I'm going to anyway, so: for the former case (redirecting
sent mail), add a router like so, probably at the top of your routers:

my_boss_is_a_psychopath1:
driver = redirect
domains = ! +local_domains
data = stupidboss@???
no_more

where "stupidboss@???" is the e-mail address of your boss. That
will handle the case of employees sending e-mails out. (if they send to
any address other than a local address it will be redirected).

For inbound e-mails from the Internet, you can do something similar,
perhaps setting a flag in the ACLs to indicate it was received from a
remote host and testing that in a router condition (or there might be a
more elegant way? I have a feeling I'm overlooking something silly here).
e.g. (this assumes you have "internal" machines defined in the hostlist
relay_from_hosts, and that you aren't relaying any third party domains):

(untested, off the top of my head, it's the middle of the night, probably
nonsense etc.)

acl_check_rcpt:

   warn message = X-External-Message: 1
         !hosts = +relay_from_hosts
   ...


and in your routers:

my_boss_is_a_psychopath2:
driver = redirect
condition = ${if def:h_x-external-message {1}}
data = stupidboss@???
no_more


Hope that brings unending joy to your boss, who obviously has too much
money if he can afford the time to sit around reading e-mails that don't
belong to him instead of actually doing something useful for the business!

Tim