diff options
Diffstat (limited to 'doc/mailfromd.texi')
-rw-r--r-- | doc/mailfromd.texi | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/doc/mailfromd.texi b/doc/mailfromd.texi index 8390fbea..0d171ab0 100644 --- a/doc/mailfromd.texi +++ b/doc/mailfromd.texi @@ -232,6 +232,7 @@ Built-in and Library Functions * Body Modification Functions:: * Mail header functions:: * Mail body functions:: +* Current Message Functions:: * Mailbox functions:: * Message functions:: * Quarantine functions:: @@ -301,6 +302,17 @@ Command Line Options. * daemon mode:: * option summary:: +A universal socket-map program for MeTA1. + +* smap-conf:: Smap Configuration. +* smap-invoke:: Smap Command Line Arguments. +* smap-examples:: Examples of Using Smap + +Smap Examples + +* smap-userdb:: Configure local_user_map. +* smap-aliases:: Configure aliases. + Pmilter multiplexer program. * pmult configuration:: @@ -5838,6 +5850,7 @@ in version @value{VERSION}. * Body Modification Functions:: * Mail header functions:: * Mail body functions:: +* Current Message Functions:: * Mailbox functions:: * Message functions:: * Quarantine functions:: @@ -6589,6 +6602,9 @@ a @code{body} handler to a regular @acronym{MFL} string. For more information about its use, see @ref{body handler}. @end deftypefn +@node Current Message Functions +@subsubsection Current Message Functions + @anchor{current_message} @deftypefn {Built-in Function} number current_message () This function can be used in @code{eom} handlers only. It returns a @@ -6596,6 +6612,52 @@ message descriptor referring to the current message. @xref{Message functions}, for a description of functions for accessing messages. @end deftypefn +The functions below access the headers from the current message. They +are available in the following handlers: @code{eoh}, @code{body}, @code{eom}. + +@deftypefn {Built-in Function} number current_header_count ([string @var{name}]) + +Return number of headers in the current message. If @var{name} +is specified, return number of headers that have this name. + +@smallexample + current_header_count() @result{} 6 + current_header_count("Subject") @result{} 6 +@end smallexample +@end deftypefn + +@deftypefn {Built-in Function} string current_header_nth_name (number @var{n}) + +Return the name of the @var{n}th header. The index @var{n} is 1-based. +@end deftypefn + +@deftypefn {Built-in Function} string current_header_nth_value (number @var{n}) + +Return the value of the @var{n}th header. The index @var{n} is +1-based. +@end deftypefn + +@deftypefn {Built-in Function} string current_header (string name @ + [, number @var{n}]) +Return the value of the named header, e.g.: + +@smallexample + set s current_header("Subject") +@end smallexample + +Optional second argument specifies the header instance, if there are +more than 1 header of the same name, e.g.: + +@smallexample + set s current_header("Received", 2) +@end smallexample + +Header indices are 1-based. +@end deftypefn + +All current_header function raise the @code{e_not_found} exception if the +requested header is not found. + @node Mailbox functions @subsubsection Mailbox Functions @cindex mailbox functions |