Qpsmtpd:random error
From SME Server
Jump to navigationJump to searchNAME
random_error
DESCRIPTION
This plugin randomly disconnects and issues DENYSOFTs.
CONFIG
one parameter is allowed, which is how often to error, as a percentage of messages. The default is 1. Use a negative number to disable.
2/5 of failures are DENYSOFT_DISCONNECT, 3/5 simply DENYSOFT.
For use with other plugins, scribble the revised failure rate to
$self->connection->notes('random_fail_%');
calculating the probability of failure
There are six tests a message must pass to reach the queueing stage, and we wish to provide random failure for each one, with the combined probability being out configuration argument. So we want to solve this equation:
(1-x) ** 6 = ( 1 - input_number )
or
x = 1 - ( (1 - input_number ) ** (1/6) )