[prev in list] [next in list] [prev in thread] [next in thread]
List: exim-users
Subject: Re: [exim] Router, once per message
From: W B Hacker <wbh () conducive ! org>
Date: 2011-02-16 10:00:13
Message-ID: 4D5BA02D.8050401 () conducive ! org
[Download RAW message or body]
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/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic