문제

I want to use James as a relay to handle incoming email and put them in a system through webservice. It works fine. BUT I want to handle an eventual flood created by a misconfiguration of the program that sends email to this server... Is there anyway to configure a management of a temporary "banned" status for sender of this email or for destination of this email ?

Thanks

도움이 되었습니까?

해결책

the use of SMPT HOOK is useful here, i just wrote one

public class SMTPFloodProtectionHook implements RcptHook {
[...]
@Override
public HookResult doRcpt(SMTPSession session, MailAddress sender, MailAddress rcpt) {
    if (checkFloodSender(sender) || checkFloodReceiver(rcpt))
        return HookResult.deny();
    return HookResult.ok();
}

and modify smtpserver.conf

    <!-- The configuration handler chain -->
    <handlerchain>

        <handler class="org.domain.atgov.incomingevent.email.SMTPFloodProtectionHook" />

it denies faster than using mailet.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top