[exim] Backup outgoing emails problem

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: areq
Fecha:  
A: exim-users
Asunto: [exim] Backup outgoing emails problem
Hi

I need to backup all outgoing emails sent by authenticated users.

I created simple router:

begin routers
backup_outgoing:
driver = accept
condition = $authenticated_id
transport = backup_outgoing_mbox
unseen


backup_outgoing_mbox:
driver = appendfile
create_directory
file = /var/spool/backup/out/\
/${substr{4}{2}{$tod_zulu}}\
/${substr{6}{2}{$tod_zulu}}\
/$authenticated_id
group = mail
mode = 660
user = mail


Works good. Even too good.

# exim -bt  user1@??? ziomal@???
user1@???
    <-- user1@???
  router = backup_outgoing, transport = backup_outgoing_mbox
user1@???
    <-- user1@???
  router = dnslookup, transport = remote_smtp
  host poczta.onet.pl [213.180.130.206] MX=1
ziomal@???
    <-- ziomal@???
  router = backup_outgoing, transport = backup_outgoing_mbox
ziomal@???
    <-- ziomal@???
  router = dnslookup, transport = remote_smtp
  host mx.wp.pl [212.77.101.4] MX=0



This mail was saved twice ;(
When is 20 recipient - a have 20x this in backup mbox.

Any idea how save only once ?

Cheers,
Areq