General-Purpose Mail Filter
The functions described below retrieve information from RFC822
messages. The message to operate upon is identified by its
descriptor, an integer number returned by the previous call to
mailbox_get_message (see mailbox_get_message) or
(see current_message) function. The maximum number of message
descriptors is limited by 1024. You can change this limit
max-open-messages runtime configuration statement
Return the size of the message nmsg, in bytes. Notice,
that if nmsg refers to current message
(see current_message), the returned value is less than the size
seen by the MTA, because
CR-LF sequences to LF, i.e. removes carriage
returns (ASCII 13) occurring before line feeds
(ASCII 10. To obtain actual message length as seen by the
MTA, add the number of lines in the message:
set actual_length message_size(nmsg) + message_lines(nmsg)
true if the body of message nmsg has zero size or
contains only whitespace characters. If the
‘Content-Transfer-Encoding’ header is present, it is used to
decode body before processing.
Close the message identified by descriptor nmsg.
Return total number of lines in message nmsg. The following relation holds true:
message_lines(x) = message_body_lines(x) + message_header_lines(x) + 1
Read and return next line from the message nmsg. If
there are no more lines to read, raise the
message_rewind to rewind the message stream and read its
Rewind the stream associated with message referred to by descriptor nmsg.
Converts contents of the stream identified by fd to a mail message. Returns identifier of the created message.
Optional filter_chain supplies the name of a Mailutils filter chain, through which the data will be passed before converting. See http://mailutils.org/wiki/Filter_chain, for a description of filter chains.
Copies message nsmg to stream descriptor fd. The
descriptor must be obtained by a previous call to
Optional filter_chain supplies the name of a Mailutils filter chain, through which the data will be passed before writing them to fd. See http://mailutils.org/wiki/Filter_chain, for a description of filter chains.
This document was generated on January 3, 2019 using makeinfo.Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.