procmail
[Top] [All Lists]

Re: formail -D & using hashcodes instead?

1996-05-19 10:55:22
    >>> Robert <dummy(_at_)c2(_dot_)org> writes:
    R> Has anyone considered the thought of using a hash function on
    R> the body of a message instead of merely using the Message-ID
    R> field for "formail - -D"?

Why couldn't Robert do something like write a checksum to a cache file and
then on each successive message check to see if that checksum is in there. 
If so then don't accept (and, if you want, reply with some nasty message).
If not, then put it in the cache and accept the message.

Of course the checksum would be done only on the body. I think
either "sum" or "crc" (crc comes with zmodem) would write a good checksum
with them writing 16 and 32 bit checksums respectively. "crc" is:

        The 32-bit CRC used is the frame check sequence in ADCCP
        (ANSI X3.66, also known as FIPS PUB 71 and FED-STD-1003, the
        U.S. versions of CCITT's X.25 link-level protocol).

Meaning it is used in network protocols, xmodem, zmodem, etc.

The only question that would come up is how to keep the cache a certain
size which I know I have seen recipes on how to do this.

Could it be as simple as this?


Mark Bynum
bynum(_at_)cs(_dot_)fsu(_dot_)edu