[exim] Router only once per message?

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Robert Blayzor
Datum:  
To: Exim Users
Betreff: [exim] Router only once per message?
I'm trying to create a router that would only ever be used ONCE per message, no matter how many recipients...

This is just an attempt to copy/clone a message from a sender to another Maildir. It works, but if the message has 50 recipients (CC, BCC, etc) the message is duplicated and saved 50 times.


This is what I have so far:

data_acl:

  warn    condition       = ${if eq{...}{true}}
          set acl_m_scdir = /path/to/destination
          set acl_m_scout = ${lc:$recipients}
  accept



router:

shadow_copy_out:
driver = accept
verify = false
transport = shadow_clone
condition = ${if def:acl_m_scout {true}}
condition = ${if def:acl_m_scdir {true}}
condition = ${if exists{$acl_m_scdir} {true}}
unseen = true
log_as_local = false

...


transport:

shadow_clone:
driver = appendfile
headers_add = ${if def:acl_m_scout {X-Orig-Rcpt: $acl_m_scout ${acl{acl_clone_done}{}}}{}}
directory = $acl_m_scdir
delivery_date_add = true
envelope_to_add = true
return_path_add = true
create_directory = true
mode_fail_narrower = false



in an attempt to try and prevent the router from running, I have the transport expand the following ACL to unset a variable I set in the data acl..

acl_clone_done:
accept set acl_m_scout = ${if def:acl_m_scout {}{}}



perhaps this could be done at the transport level but I don't think there is a way to have a conditional transport... ideas?

--
Robert
inoc.net!rblayzor
http://inoc.net/