[exim] unseen + headers_add = problematic example

Top Page
Delete this message
Reply to this message
Author: Leszek Dubiel
Date:  
To: exim-users
Subject: [exim] unseen + headers_add = problematic example

Hello!

Supervisor of department has to see messages sent and received by
workers (Mr Dubiel, Mr Smith) of that department.


So I make a file /etc/exim4/copies that looks like this:

smith: supervisor
dubiel: supervisor

This file explains, that mails sent and received by Mr Smith should be
seen by supervisor and mails send and received by Mr Dubiel should be
seen by supervisor too.


In order to send mail every user has to give his name and password, so
variable $authenticated_id is set for every mail.



To do the task of copying I define two routers:

-- first one redirects a copy of mail to supervisor if $authenticated_id
is "smith" or "dubiel"
-- second one redirects mail to supervisor if target of mail
($local_part) is "smith" or "dubiel"


These routers are defined as follows:

copysend:
driver = redirect
data = ${lookup{$authenticated_id}lsearch{/etc/exim4/copies}}
headers_add = Copy-Of: $authenticated_id
unseen = yes

copyrecv:
driver = redirect
data = ${lookup{$local_part}lsearch{/etc/exim4/copies}}
headers_add = Copy-Of: $local_part
unseen = yes


My PROBLEM is -- the first router (copysend) doesn't put Copy-Of header,
while the second one does.
Both routers redirect mail properely.

Could you PLEASE explain why is this so?

Thanks in advance.


PS. System is:

Debian GNU/Linux 3.0
Kernel 2.4.18-686
Exim version 4.50 #1 built 11-Apr-2006 12:29:22