Several variables are predefined. In mailfromd version
9.2 these are:
Identifies the current milter state (see milter state). The module milter.mfl defines the following symbolic names:
milter_state_nonemilter_state_startupmilter_state_shutdownmilter_state_beginmilter_state_endmilter_state_connectmilter_state_helomilter_state_envfrommilter_state_envrcptmilter_state_datamilter_state_headermilter_state_eohmilter_state_bodymilter_state_eommilter_actionUse the milter_state_name function to obtain the corresponding
textual string (see milter_state_name).
Identifier of the milter server which executes the code. This is the
string passed to the id statement in the server section
of the configuration file (see Server Configuration),
Address of the socket the milter server is listening to. This is
defined by the listen statement in the server section
of the configuration file (see Server Configuration),
Address family of the milter server address, as defined by the
listen statement in the server section of the
configuration file (see Server Configuration).
See the FAMILY_ constants in Table 4.3.
Address of the milter client which initiated the connection.
Address family of milter_client_address.
See the FAMILY_ constants in Table 4.3.
This variable is set by stdpoll and strictpoll built-ins
(and, consequently, by the on poll statement). Its value is
‘1’ if the function used the cached data instead of directly
polling the host, and ‘0’ if the polling took place.
See SMTP Callout Functions.
You can use this variable to make your reject message more informative
for the remote party. The common paradigm is to define a function,
returning empty string if the result was obtained from polling, or
some notice if cached data were used, and to use the function in the
reject text, for example:
func cachestr() returns string
do
if cache_used
return "[CACHED] "
else
return ""
fi
done
Then, in prog envfrom one can use:
on poll $f do when not_found or failure: reject 550 5.1.0 cachestr() . "Sender validity not confirmed" done
Maximum size of a message chunk, used when sending message to
ClamAV daemon. Must be less than or equal to the value of
StreamMaxLength parameter in clamd.conf.
Default value is 4096.
See ClamAV.
Name of virus identified by ClamAV. Set by clamav
function (see ClamAV).
Number of seconds left to the end of greylisting period. Set by
greylist and is_greylisted functions (see Special Test Functions).
Name of the domain used by polling functions in SMTP
EHLO or HELO command. Default value is the fully
qualified domain name of the host where mailfromd is run.
See Sender Verification Tests.
Callout functions (see SMTP Callout Functions) set this variable before returning. It contains the initial SMTP reply from the last polled host.
Callout functions (see SMTP Callout Functions) set this variable before
returning. It contains the reply to the HELO (EHLO)
command, received from the last polled host.
Callout functions (see SMTP Callout Functions) set this variable before returning. It contains the host name or IP address of the last polled host.
Callout functions (see SMTP Callout Functions) set this variable before returning. It contains the last SMTP reply received from the remote host. In case of multi-line replies, only the first line is stored. If nothing was received the variable contains the string ‘nothing’.
Callout functions (see SMTP Callout Functions) set this variable before
returning. It contains the last SMTP command sent to the
polled host. If nothing was sent, last_poll_sent contains the string
‘nothing’.
Email address used by polling functions in SMTP MAIL
FROM command (see Sender Verification Tests.). Default is ‘<>’. Here is an
example of how to change it:
set mailfrom_address "postmaster@my.domain.com"
You can set this value to a comma-separated list of email addresses, in which case the probing will try each address until either the remote party accepts it or the list of addresses is exhausted, whichever happens first.
It is not necessary to enclose emails in angle brackets, as they will be added automatically where appropriate. The only exception is null return address, when used in a list of addresses. In this case, it should always be written as ‘<>’. For example:
set mailfrom_address "postmaster@my.domain.com, <>"
The variable rcpt_count keeps the number of recipients given so
far by RCPT TO commands. It is defined only in ‘envrcpt’
handlers.
Spam keywords for the message, set by sa function (see sa).
This variable controls the verbosity of the exception-safe database functions. See safedb_verbose.