class SMTPIsAuthNetwork extends GenericMatcher {

    @Override
    public Collection<MailAddress> match(Mail mail) {
        return AttributeUtils
            .getValueAndCastFromMail(mail, SMTP_AUTH_NETWORK_NAME, Boolean.class)
            .filter(FunctionalUtils.identityPredicate())
            .map(any -> mail.getRecipients())
            .orElse(ImmutableList.of());
    }

}