General-Purpose Mail Filter
Checks whether the calling process can access the file pathname. If pathname is a symbolic link, it is dereferenced. The function returns ‘True’ if the file can be accessed and ‘False’ otherwise21.
Symbolic values for mode are provided in module status:
Tests for the existence of the file.
Tests whether the file exists and grants read permission.
Tests whether the file exists and grants write permission.
Tests whether the file exists and grants execute permission.
Searches the environment list for the variable name and returns its value. If the variable is not defined, the function raises the exception ‘e_not_found’.
Return the host name of this machine.
If the optional fqn is given and is ‘true’, the function will attempt to return fully-qualified host name, by attempting to resolve it using DNS.
Return the domain name of this machine. Note, that it does not necessarily coincide with the actual machine name in DNS.
Depending on the underlying ‘libc’ implementation, this call may
return empty string or the string ‘(none)’. Do not rely on it to
get the real domain name of the box
mailfromd runs on, use
localdomain (see below) instead.
Return the local domain name of this machine.
This function first uses
getdomainname to make a first guess.
If it does not return a meaningful value,
gethostname(1) to determine the fully qualified host name of
the machine, and returns its domain part.
To use this function, require the localdomain module
(see Modules), e.g.:
Return the time since the Epoch (00:00:00 UTC, January 1, 1970), measured in seconds.
Formats the time timestamp (seconds since the Epoch) according
to the format specification format. Ordinary characters placed
in the format string are copied to the output without conversion.
Conversion specifiers are introduced by a ‘%’ character.
See Time and Date Formats, for a detailed description of the
conversion specifiers. We recommend using single quotes
around fmt to prevent ‘%’ specifiers from being interpreted
Mailfromd variables (See Literals, for a
discussion of quoted literals and variable interpretation within
The timestamp argument can be a return value of
function (see above).
strftime('%Y-%m-%d %H:%M:%S %Z', 1164477564) ⇒ 2006-11-25 19:59:24 EET strftime('%Y-%m-%d %H:%M:%S %Z', 1164477564, 1) ⇒ 2006-11-25 17:59:24 GMT
This function returns system information formatted according to the format specification format. Ordinary characters placed in the format string are copied to the output without conversion. Conversion specifiers are introduced by a ‘%’ character. The following conversions are defined:
Name of this system.
Name of this node within the communications network to which this node is attached. Note, that it does not necessarily coincide with the actual machine name in DNS.
Name of the hardware type on which the system is running.
uname('%n runs %s, release %r on %m') ⇒ "Trurl runs Linux, release 2.6.26 on i686"
Notice the use of single quotes.
Unlinks (deletes) the file name. On error, throws the
system executes a command specified in str
/bin/sh -c string, and returns -1 on error or
the return status of the command otherwise.
Sleep for secs seconds. If optional usec argument is given, it specifies additional number of microseconds to wait for. For example, to suspend execution of the filter for 1.5 seconds:
This function is intended mostly for debugging and experimental purposes.
Set the umask to mask & 0777. Return the previous value of the mask.
Note, that the return code is inverted in respect to the system function ‘access(2)’.
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.