I have an opened SMTP server that allows me to send emails. The problem is that I can send a massive amount of emails (80,000+) to a specific mailbox and block all the other legitimate emails (that are sent to other mailboxes).

The specific mailbox is validated by size. However all the rejected emails that are sent after the size limit are stored on the same queue of the legitimates emails.

What should be done in order to solve that issue?

Answer to dr01

Right now the service is not exposed to the Internet and I wrote my own script for the Open Relay attack. Thanks for the advise!

I cant set up an SMTP auth. The service should be opened to the Internet and any user should be able to use it, unless there is a way that I'm not aware to.

The sender could be anyone, however the recipient can be only mailboxes that under my control.

In the current implementation, when an email is sent to a fulled mailbox, the email is stored on the same queue of the legitimate emails - that's the reason why I get that issue.

I was thinking on the following steps (part of you recommendations): 1. Limit the recipient mailbox size. 2. When an email is sent to a fulled mailbox, the email will be managed in a dedicated queue, which is not come across the the second queue.

This is a theoretical move. I still need to check if it's applicable.

General steps: 1. Implement an SPF mechanism. 2. Use IPS.

closed as off-topic by Scott Pack, Stephane, M'vy, WhiteWinterWolf, Xander Jul 20 '15 at 13:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Information security within the scope defined in the help center." – Scott Pack, Stephane, M'vy, Xander
If this question can be reworded to fit the rules in the help center, please edit the question.

  • The issue you are encountering merely seems to be an email server configuration optimisation than a pure security issue. If your SMTP server is a well-known one, you may want to get a look a ServerFault SE but do not forget to indicate the name and version of the SMTP server you are using to get the best advices. – WhiteWinterWolf Jul 20 '15 at 13:42

First of all, don't run an Open Relay. It will rapidly be found and exploited by scammers and your IP will be in RBLs all around the world.

Set up SMTP auth for your server, then configure it so that each account can send a maximum amount of messages per day.

Concerning the problem on the mailbox's end, there's not much that can be done to defend oneself from mailbombing. If you can put into place message size limits and blocking of senders that go over this threshold, that would be a good thing.

  • My comment is too long. I added a new answer. – user3146008 Jul 20 '15 at 13:32
  • Please don't add it as an answer, edit your question instead. – dr01 Jul 20 '15 at 13:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.