Re: [Exim] Copy outgoing and incoming mail

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: michael
CC: prudek, exim-users
Subject: Re: [Exim] Copy outgoing and incoming mail
On 15 Jul 1999 michael@??? wrote:

> The FAQ could need an update, though. There is no universal way to
> copy all incoming and outgoing mail for a specific user to another
> mail address.


Is there a problem with something like

if $sender_address is specific.user@??? or
$recipients contains specific.user@???
then
unseen deliver another.mail.address
endif

in a system filter?     


> The bcc file contains a mapping of mail addresses to be monitored to
> the monitoring address.


Ah! That's more complicated. But you can still do lookups in the filter
file:

if ${lookup{$sender_address}dbm{/some/file}{$value}{}} is not ""
then
unseen deliver ${lookup{$sender_address}dbm{/some/file}{$value}}

else

  if foranyaddress $recipients
    (${lookup{$thisaddress}dbm{/some/file}{$value}{}} is not "") 
  then
    unseen deliver ${lookup{$thisaddress}dbm{/some/file}{$value}} 
  endif   


endif

It is messy to have to repeat the lookup, but it won't be inefficient,
because Exim caches the results of successful lookups.

Mind you, I haven't tested this at all!


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.