On Wed, Jan 05, 2000 at 01:45:33AM -0800, Michael Elkins wrote:
> I just realized that this patch does not solve the problem which started this
> whole thread, which is dealing with an IMAP server. Unless there is a way
> to fetch the first couple of lines of the body of a message with IMAP, I don't
> see a clean way to accomplish automatic handling. The next best option would
> be to implement the idea about binding a function to a key which forces a
> message to be interpreted as application/pgp.
I still prefer the key binding, but here's some relevant text (if you
want to go automated) from the IMAP RFC
(http://www.isi.edu/in-notes/rfc2060.txt):
6.4.5. FETCH Command
[...stuff deleted...]
The currently defined data items that can be fetched are:
ALL Macro equivalent to: (FLAGS INTERNALDATE
RFC822.SIZE ENVELOPE)
BODY Non-extensible form of BODYSTRUCTURE.
BODY[<section>]<<partial>>
The text of a particular body section.
[...stuff deleted...]
It is possible to fetch a substring of the
designated text. This is done by appending an open
angle bracket ("<"), the octet position of the
first desired octet, a period, the maximum number
of octets desired, and a close angle bracket (">")
to the part specifier. If the starting octet is
beyond the end of the text, an empty string is
returned.
Any partial fetch that attempts to read beyond the
end of the text is truncated as appropriate. A
partial fetch that starts at octet 0 is returned as
a partial fetch, even if this truncation happened.
Note: this means that BODY[]<0.2048> of a
1500-octet message will return BODY[]<0>
with a literal of size 1500, not BODY[].
Note: a substring fetch of a
HEADER.FIELDS or HEADER.FIELDS.NOT part
specifier is calculated after subsetting
the header.
[...stuff deleted...]
BODY.PEEK[<section>]<<partial>>
An alternate form of BODY[<section>] that does not
implicitly set the \Seen flag.
That should explain the relevant parts.
--Chris
PGP signature