Szerző: James P. Roberts Dátum: Címzett: exim-users, Giuliano Gavazzi Tárgy: Re: [Exim] variables and counters in acl
> Philip, >
> although I think you are aware of the wish I expressed some time ago,
> I do not think you ever said it had been added to the with list, so...
> can we have a small number of string and numeric variables those life
> is the whole SMTP transaction (or perhpaps the whole TCP connection,
> maybe we could have two types, one RSET sensitive and one not).
>
> What do you think?
>
> Thanks
>
> Giuliano
I have a wild idea, which may or may not suffice... I seem to recall
reading that this particular wish was not trivial to implement, since
different processes are involved at different stages of an email's life
within Exim. Thus, persistent (external) storage is required.
This idea requires that a MySQL lookup, executed from within Exim, be
able to include statements that cause data to be written to the MySQL
database, not merely retrieved. I probably don't even have to continue
explaining the idea now, do I? ;)
If this is possible (and I suspect it is, or is hopefully trivially made
so), then all you need to do is create a MySQL table with a key of
MessageID, plus any fields you want to associate with it. Just remember
to delete the record once the delivery is totally completed, unless you
want to use it as a logging mechanism, as well. How cool is that?
Obviously, some care must be taken with respect to permissions on this
database and table, since Exim is not always operating as the same user
at all times.