Terry,
You’d add
in the spfconfig.cfg.php file (line 211 in the version I have).
Also, bad-recipient is the language key, the message you see is the message that corresponds to that key in the English language file.
BTW, here’s some code for that section of spformproc.inc.php (or the spformproc snippet if the code is there). I haven’t tested it, but it should solve your problem.
// check for email injections, logical email address and overlong fields
$spf_regex = "/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i";
$rs = explode(',',$recipient); // handle multiple addresses separated by commas
foreach ($rs as $r) {
if (! preg_match($spf_regex, $r, $result)) {echo $spf_lang['bad-recipient']; error_log("Bad email address"); exit;}
if (strlen($r) > 65) {echo $spf_lang['bad-recipient-length']; error_log("recipient length > 65"); exit;}
}
The code above replaces everything above the line that starts with:
if (strlen($finalSubject) > 100)