Mailfromd |
|
General-Purpose Mail Filter |
Sergey Poznyakoff |
Mailfromd Manual (split by node): | ? |
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, localdomain
calls
gethostname(1)
to determine the fully qualified host name of
the machine, and returns its domain part.
To use this function, require ‘localdomain.mf’ module
(see section Modules), e.g.: require localdomain
.
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 section 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
as Mailfromd
variables (See section Literals, for a
discussion of quoted literals and variable interpretation within
them).
The timestamp argument can be a return value of time
function (see above).
For example:
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.
Kernel release.
Kernel version.
Name of the hardware type on which the system is running.
For example:
uname('%n runs %s, release %r on %m') ⇒ "Trurl runs Linux, release 2.6.26 on i686" |
Notice the use of single quotes.
The function system
executes a command specified in str
by calling /bin/sh -c string
, and returns -1 on error or
the return status of the command otherwise.
Sleep for seconds. This function is intended for debugging and experimental purposes.
Set the umask to mask & 0777. Return the previous value of the mask.
Mailfromd Manual (split by node): | ? |
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.