"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/mailfromd.texi" between
mailfromd-8.11.tar.xz and mailfromd-8.12.tar.xz

About: Mailfromd is a general-purpose mail filtering daemon for Sendmail, Postfix and MeTA1 (interfaces with the MTA using Milter or PMilter protocols).

mailfromd.texi  (mailfromd-8.11.tar.xz):mailfromd.texi  (mailfromd-8.12.tar.xz)
skipping to change at line 272 skipping to change at line 272
* scope of visibility:: * scope of visibility::
* import:: Require and Import * import:: Require and Import
The MFL Library Functions The MFL Library Functions
* Macro access:: * Macro access::
* String transformation:: * String transformation::
* String manipulation:: * String manipulation::
* String formatting:: * String formatting::
* Character Type:: * Character Type::
* I/O functions::
* Filtering functions::
* Email processing functions:: * Email processing functions::
* Envelope modification functions:: * Envelope modification functions::
* Header modification functions:: * Header modification functions::
* Body Modification Functions:: * Body Modification Functions::
* Message modification queue:: * Message modification queue::
* Mail header functions:: * Mail header functions::
* Mail body functions:: * Mail body functions::
* EOM Functions:: * EOM Functions::
* Current Message Functions:: * Current Message Functions::
* Mailbox functions:: * Mailbox functions::
* Message functions:: * Message functions::
* Quarantine functions:: * Quarantine functions::
* SMTP Callout functions:: * SMTP Callout functions::
* Compatibility Callout functions:: * Compatibility Callout functions::
* Internet address manipulation functions:: * Internet address manipulation functions::
* DNS functions:: * DNS functions::
* Geolocation functions:: * Geolocation functions::
* Database functions:: * Database functions::
* I/O functions::
* System functions:: * System functions::
* Passwd functions:: * Passwd functions::
* Sieve Interface:: * Sieve Interface::
* Interfaces to Third-Party Programs:: * Interfaces to Third-Party Programs::
* Rate limiting functions:: * Rate limiting functions::
* Greylisting functions:: * Greylisting functions::
* Special test functions:: * Special test functions::
* Mail Sending Functions:: * Mail Sending Functions::
* Blacklisting Functions:: * Blacklisting Functions::
* SPF Functions:: * SPF Functions::
* DKIM:: * DKIM::
* Sockmaps:: * Sockmaps::
* NLS Functions:: * NLS Functions::
* Syslog Interface:: * Syslog Interface::
* Debugging Functions:: * Debugging Functions::
Filtering functions
* Filters::
Message Functions Message Functions
* Header functions:: * Header functions::
* Message body functions:: * Message body functions::
* MIME functions:: * MIME functions::
* Message digest functions:: * Message digest functions::
Interfaces to Third-Party Programs Interfaces to Third-Party Programs
* SpamAssassin:: * SpamAssassin::
skipping to change at line 1097 skipping to change at line 1102
option: option:
@example @example
--enable-pmilter=@var{prefix} --enable-pmilter=@var{prefix}
@end example @end example
@noindent @noindent
where @var{prefix} stands for the @command{MeTA1} installation prefix. where @var{prefix} stands for the @command{MeTA1} installation prefix.
@end table @end table
@cindex --sysconfdir, @command{configure} option @cindex @option{--sysconfdir}, @command{configure} option
It is advisable to use the same settings for file name prefixes It is advisable to use the same settings for file name prefixes
as those you used when configuring @command{mailutils}. In particular, as those you used when configuring @command{mailutils}. In particular,
try to use the same @option{--sysconfdir}, since it will facilitate try to use the same @option{--sysconfdir}, since it will facilitate
configuring the whole system. configuring the whole system.
@anchor{statedir} @anchor{statedir}
@cindex local state directory @cindex local state directory
@cindex DEFAULT_STATE_DIR, @command{configure} variable @cindex DEFAULT_STATE_DIR, @command{configure} variable
Another important point is location of @dfn{local state Another important point is location of @dfn{local state
directory}, i.e. a directory where @command{mailfromd} keeps its directory}, i.e. a directory where @command{mailfromd} keeps its
skipping to change at line 6172 skipping to change at line 6177
A function can also take variable number of arguments (such A function can also take variable number of arguments (such
functions are called @dfn{variadic}). This is functions are called @dfn{variadic}). This is
indicated by the use of ellipsis as the last abstract parameter. The indicated by the use of ellipsis as the last abstract parameter. The
statement below defines a function @code{foo} taking one mandatory, one statement below defines a function @code{foo} taking one mandatory, one
optional and any number of additional arguments: optional and any number of additional arguments:
@example @example
func foo (string a ; string b, ...) func foo (string a ; string b, ...)
@end example @end example
@cindex $(@var{n})
All actual arguments passed in a list of variable arguments are All actual arguments passed in a list of variable arguments are
coerced to string data type. To refer to these arguments in the coerced to string data type. To refer to these arguments in the
function body, the following construct is used: function body, the following construct is used:
@example @example
$(@var{expr}) $(@var{expr})
@end example @end example
@noindent @noindent
where @var{expr} is any valid @acronym{MFL} expression, evaluating to where @var{expr} is any valid @acronym{MFL} expression, evaluating to
a number @var{n}. This construct refers to the value of @var{n}th a number @var{n}. This construct refers to the value of @var{n}th
actual parameter from the variable argument list. Parameters are actual parameter from the variable argument list. Parameters are
numbered from @samp{1}, so the first variable parameter is @code{$(1)}, numbered from @samp{1}, so the first variable parameter is @code{$(1)},
and the last one is @code{$($# - @var{Nm} - @var{No})}, where @var{Nm} and the last one is @code{$($# - @var{Nm} - @var{No})}, where @var{Nm}
and @var{No} are numbers of mandatory and optional parameters to the and @var{No} are numbers of mandatory and optional parameters to the
function. function.
@cindex $@var{n}
The construct @samp{$(@var{n})} where 1 <= @var{n} <= 9 can also be
written as @samp{$@var{n}}.
For example, the function below prints all its arguments: For example, the function below prints all its arguments:
@example @example
func pargs (string text, ...) func pargs (string text, ...)
do do
echo "text=%text" echo "text=%text"
loop for number i 1, loop for number i 1,
while i <= $# - 1, while i < $# - @@text,
set i i + 1 set i i + 1
do do
echo "arg %i=" . $(i) echo "arg %i=" . $(i)
done done
done done
@end example @end example
@noindent @noindent
Note the loop limits. The last variable argument has number @code{$# Note how the ordinal number operator is used to compute the upper
- 1}, because the function takes one mandatory argument. limit.
@cindex return statement, defined @cindex return statement, defined
The @var{function-body} is any list of valid @command{mailfromd} The @var{function-body} is any list of valid @command{mailfromd}
statements. In addition to the statements discussed below statements. In addition to the statements discussed below
(@pxref{Statements}) it can also contain the @code{return} statement, (@pxref{Statements}) it can also contain the @code{return} statement,
which is used to return a value from the function. The syntax of the which is used to return a value from the function. The syntax of the
return statement is return statement is
@example @example
return @var{value} return @var{value}
skipping to change at line 7679 skipping to change at line 7689
@node Built-in Exceptions @node Built-in Exceptions
@subsection Built-in Exceptions @subsection Built-in Exceptions
The first @value{MAX_E_EXCEPTIONS} exception numbers are reserved for The first @value{MAX_E_EXCEPTIONS} exception numbers are reserved for
@dfn{built-in exceptions}. These are declared in module @file{status.mf}. @dfn{built-in exceptions}. These are declared in module @file{status.mf}.
The following table summarizes all built-in exception types implemented by The following table summarizes all built-in exception types implemented by
@command{mailfromd} version @value{VERSION}. Exceptions are listed in @command{mailfromd} version @value{VERSION}. Exceptions are listed in
lexicographic order. lexicographic order.
@anchor{exception names} @anchor{exception names}
@table @code @defvr {Exception} e_badmmq
@cindex e_badmmq, exception type
@item e_badmmq
The called function cannot finish its task because an uncompatible The called function cannot finish its task because an uncompatible
message modification function was called at some point before it. message modification function was called at some point before it.
For details, @ref{MMQ and dkim_sign}. For details, @ref{MMQ and dkim_sign}.
@end defvr
@cindex e_dbfailure, exception type @defvr {Exception} e_dbfailure
@item e_dbfailure
General database failure. For example, the database cannot be General database failure. For example, the database cannot be
opened. This exception can be signaled by any function that queries opened. This exception can be signaled by any function that queries
any @acronym{DBM} database. any @acronym{DBM} database.
@end defvr
@cindex e_divzero, exception type @defvr {Exception} e_divzero
@item e_divzero Division by zero.
Division by zero. @end defvr
@cindex e_exists, exception type @defvr {Exception} e_exists
@item e_exists
This exception is emitted by @code{dbinsert} built-in if the This exception is emitted by @code{dbinsert} built-in if the
requested key is already present in the database (@pxref{Database requested key is already present in the database (@pxref{Database
functions,dbinsert}). functions,dbinsert}).
@end defvr
@cindex e_eof, exception type @defvr {Exception} e_eof
@item e_eof
Function reached end of file while reading. @xref{I/O functions}, Function reached end of file while reading. @xref{I/O functions},
for a description of functions that can signal this exception. for a description of functions that can signal this exception.
@end defvr
@cindex e_failure, exception type @defvr {Exception} e_failure
@cindex failure, exception type @defvrx {Exception} failure
@item e_failure
@itemx failure
@itemx e_failure
A general failure has occurred. In particular, this exception is A general failure has occurred. In particular, this exception is
signaled by @acronym{DNS} lookup functions when any permanent failure occurs. signaled by @acronym{DNS} lookup functions when any permanent failure occurs.
This exception can be signaled by any @acronym{DNS}-related function This exception can be signaled by any @acronym{DNS}-related function
(@code{hasmx}, @code{poll}, etc.) or operation (@code{mx matches}). (@code{hasmx}, @code{poll}, etc.) or operation (@code{mx matches}).
@end defvr
@cindex e_format, exception type @defvr {Exception} e_format
@item e_format
Invalid input format. This exception is signaled if input data to a Invalid input format. This exception is signaled if input data to a
function are improperly formatted. In version @value{VERSION} it is function are improperly formatted. In version @value{VERSION} it is
signaled by @code{message_burst} function if its input message is not signaled by @code{message_burst} function if its input message is not
formatted according to RFC 934. @xref{Message digest functions}. formatted according to RFC 934. @xref{Message digest functions}.
@end defvr
@cindex e_invcidr, exception type @defvr {Exception} e_ilseq
@item e_invcidr Illegal byte sequence. Signaled when a string cannot be converted
Invalid @acronym{CIDR} notation. This is signaled by @code{match_cidr} functi between character sets because a sequence of bytes was encountered
on that is not defined for the source character set or cannot be
when its second argument is not a valid @acronym{CIDR}. represented in the destination character set.
@xref{MIME decoding}, for details.
@end defvr
@defvr {Exception} e_invcidr
Invalid @acronym{CIDR} notation. This is signaled by
@code{match_cidr} function when its second argument is not a valid
@acronym{CIDR}.
@end defvr
@cindex e_invip, exception type @defvr {Exception} e_invip
@item e_invip
Invalid @acronym{IP} address. This is signaled by @code{match_cidr} function Invalid @acronym{IP} address. This is signaled by @code{match_cidr} function
when its first argument is not a valid @acronym{IP} address. when its first argument is not a valid @acronym{IP} address.
@end defvr
@cindex e_invtime, exception type @defvr {Exception} e_invtime
@item e_invtime
Invalid time interval specification. It is signaled by Invalid time interval specification. It is signaled by
@code{interval} function if its argument is not a valid time interval @code{interval} function if its argument is not a valid time interval
(@pxref{time interval specification}). (@pxref{time interval specification}).
@end defvr
@cindex e_io, exception type @defvr {Exception} e_io
@item e_io
An error occurred during the input-output operation. @xref{I/O An error occurred during the input-output operation. @xref{I/O
functions}, for a description of functions that can signal this functions}, for a description of functions that can signal this
exception. exception.
@end defvr
@cindex e_macroundef, exception type @defvr {Exception} e_macroundef
@item e_macroundef
A Sendmail macro is undefined. A Sendmail macro is undefined.
@end defvr
@cindex e_noresolve, exception type @defvr {Exception} e_noresolve
@item e_noresolve
The argument of a @acronym{DNS}-related function cannot be resolved to host The argument of a @acronym{DNS}-related function cannot be resolved to host
name or @acronym{IP} address. Currently only @code{ismx} (@pxref{ismx}) raises name or @acronym{IP} address. Currently only @code{ismx} (@pxref{ismx}) raises
this exception. this exception.
@end defvr
@cindex e_range, exception type @defvr {Exception} e_range
@item e_range
The supplied argument is outside the allowed range. This is The supplied argument is outside the allowed range. This is
signalled, for example, by @code{substring} function (@pxref{substring}). signalled, for example, by @code{substring} function (@pxref{substring}).
@end defvr
@cindex e_regcomp, exception type @defvr {Exception} e_regcomp
@item e_regcomp
Regular expression cannot be compiled. This can happen when a Regular expression cannot be compiled. This can happen when a
regular expression (a right-hand argument of a @code{matches} regular expression (a right-hand argument of a @code{matches}
operator) is built at the runtime and the produced string is an operator) is built at the runtime and the produced string is an
invalid regex. invalid regex.
@end defvr
@cindex e_ston_conv, exception type @defvr {Exception} e_ston_conv
@item e_ston_conv
String-to-number conversion failed. This can be signaled when a String-to-number conversion failed. This can be signaled when a
string is used in numeric context which cannot be converted to the numeric string is used in numeric context which cannot be converted to the numeric
data type. For example: data type. For example:
@example @example
@group @group
set x "10a" set x "10a"
if x / 2 if x / 2
@dots{} @dots{}
@end group @end group
@end example @end example
@noindent @noindent
The @code{if} condition will signal @code{ston_conv}, since @samp{10a} The @code{if} condition will signal @code{ston_conv}, since @samp{10a}
cannot be converted to a number. cannot be converted to a number.
@end defvr
@cindex e_temp_failure, exception type @defvr {Exception} e_temp_failure
@cindex temp_failure, exception type @defvrx {Exception} temp_failure
@item e_temp_failure
@itemx temp_failure
@itemx e_temp_failure
A temporary failure has occurred. This can be signaled by A temporary failure has occurred. This can be signaled by
@acronym{DNS}-related functions or operations. @acronym{DNS}-related functions or operations.
@end defvr
@cindex e_url, exception type @defvr {Exception} e_url
@item e_url
The supplied @acronym{URL} is invalid. @xref{Interfaces to The supplied @acronym{URL} is invalid. @xref{Interfaces to
Third-Party Programs}. Third-Party Programs}.
@end defvr
@end table @defvr {Exception} e_success
@defvrx {Exception} success
@cindex success, exception type @defvrx {Exception} e_not_found
@cindex e_success, exception type @defvrx {Exception} not_found
@cindex not_found, exception type
@cindex e_not_found, exception type
In addition to these, two symbols are defined that are not exception In addition to these, two symbols are defined that are not exception
types in the strict sense of the world, but are provided to make types in the strict sense of the world, but are provided to make
writing filter scripts more convenient. These are @code{success}, writing filter scripts more convenient. These are @code{success},
meaning successful return from a function, and @code{not_found}, meaning successful return from a function, and @code{not_found},
meaning that the required entity (e.g. domain name or email address) meaning that the required entity (e.g. domain name or email address)
was not found. @xref{figure-poll-wrapper}, for an illustration on was not found. @xref{figure-poll-wrapper}, for an illustration on
how these can be used. For consistency with other exception codes, how these can be used. For consistency with other exception codes,
these can be spelled as @code{e_success} and @code{e_not_found}. these can be spelled as @code{e_success} and @code{e_not_found}.
@end defvr
@node User-defined Exceptions @node User-defined Exceptions
@subsection User-defined Exceptions @subsection User-defined Exceptions
@kwindex dclex @kwindex dclex
You can define your own exception types using the @code{dclex} You can define your own exception types using the @code{dclex}
statement: statement:
@example @example
dclex @var{type} dclex @var{type}
@end example @end example
 End of changes. 44 change blocks. 
58 lines changed or deleted 71 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)