1

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

leppie
  • 115,091
  • 17
  • 196
  • 297
Antoine O
  • 171
  • 13

1 Answers1

1

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.

Antoine O
  • 171
  • 13