Next: Mfmod Interface, Previous: Debugging Functions, Up: Library [Contents][Index]
These functions convert numeric identifiers of various MFL entities to strings and vice-versa.
Convert the numeric identifier of a milter state to textual form.
It is normally used to convert the milter_state
variable
(see milter state) to string, e.g.:
milter_state_name(5) ⇒ "connect"
If code does not refer to a valid milter state, the e_inval
exception is raised.
Returns numeric code of the milter state name. If name
does not refer to a valid milter state, returns 0
(milter_state_none
from the milter.mfl module).
Convert the numeric identifier of a reply action (see reply actions) to textual name.
If code does not refer to a valid reply action, the e_inval
exception is raised.
milter_state_code("connect") ⇒ 5
This function is useful in action hooks. See action hook, for details.
Returns numeric code of the reply action identified by name. If name does not refer to a valid action, returns -1.