Mailfromd Manual (split by node):   Section:   Chapter:FastBack: MFL   Up: Exceptions   FastForward: Library   Contents: Table of ContentsIndex: Concept Index

4.19.1 Built-in Exceptions

The lowest 19 exception numbers are reserved for built-in exceptions. These are declared in module status.mf. The following table summarizes all built-in exception types implemented by mailfromd version 8.7:

e_dbfailure

General database failure. For example, the database cannot be opened. This exception can be signaled by any function that queries any DBM database.

e_divzero

Division by zero.

e_exists

This exception is emitted by dbinsert built-in if the requested key is already present in the database (see dbinsert).

e_eof

Function reached end of file while reading. See I/O functions, for a description of functions that can signal this exception.

e_failure
failure
e_failure

A general failure has occurred. In particular, this exception is signaled by DNS lookup functions when any permanent failure occurs. This exception can be signaled by any DNS-related function (hasmx, poll, etc.) or operation (mx matches).

e_format

Invalid input format. This exception is signaled if input data to a function are improperly formatted. In version 8.7 it is signaled by message_burst function if its input message is not formatted according to RFC 934. See Message digest functions.

e_invcidr

Invalid CIDR notation. This is signaled by match_cidr function when its second argument is not a valid CIDR.

e_invip

Invalid IP address. This is signaled by match_cidr function when its first argument is not a valid IP address.

e_invtime

Invalid time interval specification. It is signaled by interval function if its argument is not a valid time interval (see time interval specification).

e_io

An error occurred during the input-output operation. See I/O functions, for a description of functions that can signal this exception.

e_macroundef

A Sendmail macro is undefined.

e_noresolve

The argument of a DNS-related function cannot be resolved to host name or IP address. Currently only ismx (see ismx) raises this exception.

e_range

The supplied argument is outside the allowed range. This is signalled, for example, by substring function (see substring).

e_regcomp

Regular expression cannot be compiled. This can happen when a regular expression (a right-hand argument of a matches operator) is built at the runtime and the produced string is an invalid regex.

e_ston_conv

String-to-number conversion failed. This can be signaled when a string is used in numeric context which cannot be converted to the numeric data type. For example:

 set x "10a"
 if x / 2
   …

The if condition will signal ston_conv, since ‘10a’ cannot be converted to a number.

e_temp_failure
temp_failure
e_temp_failure

A temporary failure has occurred. This can be signaled by DNS-related functions or operations.

e_url

The supplied URL is invalid. See Interfaces to Third-Party Programs.

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 writing filter scripts more convenient. These are success, meaning successful return from a function, and not_found, meaning that the required entity (e.g. domain name or email address) was not found. See Figure 4.1, for an illustration on how these can be used. For consistency with other exception codes, these can be spelled as e_success and e_not_found.

Mailfromd Manual (split by node):   Section:   Chapter:FastBack: MFL   Up: Exceptions   FastForward: Library   Contents: Table of ContentsIndex: Concept Index