@Override @SuppressWarnings("unchecked") public List<String> getImplementedEsmtpFeatures(SMTPSession session) { if (session.isAuthSupported()) { return ESMTP_FEATURES; } else { return Collections.EMPTY_LIST; } }
@Override public HookResult doRcpt(SMTPSession session, MaybeSender sender, MailAddress rcpt) { if (!session.isRelayingAllowed()) { Domain toDomain = rcpt.getDomain(); if (!isLocalDomain(toDomain)) { if (session.isAuthSupported()) { return AUTH_REQUIRED; } else { return RELAYING_DENIED; } } } return HookResult.DECLINED; }