|
|
void mail_debug(MAILSTREAM *stream);
This function enables telemetry logging for this stream. All telemetry is passed to the application via the mm_dlog facility.
void mail_nodebug(MAILSTREAM *stream);
This function disables telemetry logging for this stream.
long mail_sequence(MAILSTREAM *stream, char *sequence);
This function parses the given sequence string for message numbers, sets the sequence bit in the stream's message cache element of all messages in the sequence (and turns it off in all other message cache elements). If the parse is successful, T is returned, else NIL.
long mail_uid_sequence(MAILSTREAM *stream, char *sequence);
This function parses the given sequence string for unique identifiers, sets the sequence bit in the stream's message cache element of all messages in the sequence (and turns it off in all other message cache elements). If the parse is successful, T is returned, else NIL.
long mail_parse_flags(MAILSTREAM *stream, char *flag, unsigned long *uf);
This function parses the given flag string, and returns the system flags as its return value and the user flags in the location pointed to by the uf argument. If there is an error in parse, a log message is issued via mm_log and this function returns NIL.
unsigned long mail_filter(char *text, unsigned long len, STRINGLIST *lines, long flags);
This function supports the header lines filtering function of mail_fetchheader_full. The lines argument contains a list of header field names to use in subsetting the header text. Only those lines which have that header field name are returned, unless FT_NOT is set, in which case only those lines which do not have that header field name are returned.
The options for mail_filter are a bit mask with one or more of the following:
long mail_search_msg(MAILSTREAM *stream, unsigned long msgno, char *charset, SEARCHPGM *pgm);
This function implements mail_search_full locally in cases when it is not done by a server (for example, local mail files, NNTP/POP). It inspects the given message on that stream to see if it matches the criteria or not. If it matches, T is returned, else NIL.
SEARCHPGM *mail_criteria(char *criteria);
This function accepts an IMAP2-format search criteria string and parses it. If the parse is successful, it returns a search program suitable for use in mail_search_full.