Re: [exim] Proposal: $message_body_hash_sha1

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Heiko Schlittermann
Datum:  
To: exim-users
Betreff: Re: [exim] Proposal: $message_body_hash_sha1
Hello Jakob,

Jakob Hirsch <jh@???> (Fr 11 Jun 2010 09:49:07 CEST):
> Heiko Schlittermann, 2010-06-11 08:46:
>
> > So, to get the long story short: I thinking about having
> >
> >     $message_body_hash_sha1 

> >
> > (or something similar, the "interface" could be thought about)
> >
> > What do you think? (I believe, the implementation shouldn't be too
> > difficult (\0 are already counted, thus some part of the code seems to
> > see the "message stream").
>
> Hm, do you really need the _whole_ body? Otherwise,
> ${sha1:$message_body} would do what you want (hash the first 500 bytes).
> Otherwise I guess you could set message_body_visible to a high enough


Ouhh. The message_body_visible I didn't know. Fine. Beside the possible
RAM consumption it *almost* works as expected. (Because $message_body
contains a long line with "\n" converted to spaces, doesn't it? - But
OTOH if the checking algorithm knows about this convention, it's ok)

> number (like message_size_limit), but I'm not sure how efficient Exim is
> handling such big strings. OTOH, it probably doesn't matter much on
> todays machines, as long as you are not hitting some internal limits
> (which I don't know of). If you care about efficiency, you could use dlfunc.


> Or is this something useful for other Exim users, too?


Could be - in case we have to prove that we didn't change the message
after reception (the hash has to be signed, of course).

--
Heiko