Mike Cardwell wrote:
> Hi,
>
> I'd like to run an unseen router once per message. At the moment, to
> prevent it running for each recipient, I'm doing this in my predata acl:
>
> warn set acl_m_firstrecipient = ${lc:${sg{$recipients}{,.*}{}}}
>
> And then this in the router:
>
> condition = ${if eq{$acl_m_firstrecipient}{$local_part@$domain}}
>
> Is there a "cleaner" way of doing this?
>
>That's fairly clean as is, but.. Untested and unresearched, but probably viable: - Exim 'has to know' as it make deliveries from queue when the *last* one has been encountered, (even if it is also the FIRST) as only then will it delete the message & attachment(s), headers, and stored variables from that part of the fs. - Without having (yet) looked at either queue-as-it-is-traversed to observe a chane, or grep'ed the code, I suspect this is triggered when the last address has been 'used up'. Question is how practical it would be to tap into that as either a flag (BEFORE erasure, of course..) or as a declining count. There may already be such a 'hook' used to prevent router looping or some such that could be put to this purpose... HTH, Bill -- ## List details at http://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
