Make this:

if (connection.transaction.rcpt_to.length > 1) {
    return next(DENY, 'Bounce messages should not have multiple recipients');
}

Lose the has_single_recipient function