Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hi folks, recently one of my accounts put his email password into a service and get hacked. Then the hacker send thousands of mails using this account. When I notice the problem the queue has +30000 emails, but I don't have an idea of how many emails get sent to multiple domains.
The result was that my IP was reported by abuse and get ban for some time, my ISP warn me about other security issue like that and mi VPS will be close.
Until now i enable fail2ban and postgrey services in mail server, change compromised account password and alert to account owner.
I need help to avoid that to happen again, and I'm here to ask for configuration tips or best practices.

Thanks in advance,

You must be logged in to vote

Replies: 1 comment · 2 replies

Comment options

Please note that this response was created using generative AI, leveraging previously available information from the repository. This information may be helpful. However, it is our strong recommendation that you carefully consider the information before blindly applying it.


Hello,

To enhance the security of your Docker Mailserver and prevent similar incidents in the future, here are some best practices and configuration tips:

  1. Strong Password Policies: Enforce strong password policies for all email accounts. Consider using a passphrase generator and enforce regular password changes. You can also use tools like Fail2Ban to block repeated failed login attempts, which can help prevent brute force attacks.

  2. Enable Spoof Protection: Use the SPOOF_PROTECTION=1 setting in Docker Mailserver. This restricts the sender address to the DMS account username, preventing the misuse of sender addresses.

  3. Monitor and Manage the Mail Queue: Regularly monitor the mail queue to quickly identify and react to unusual activities. You can manage the queue using Postfix commands to delete or hold suspicious emails.

  4. Use Rate Limiting: Implement rate limiting to control the number of emails sent per hour per user. This can help mitigate the impact of a compromised account.

  5. Educate Users: Educate your users about phishing and the importance of not sharing their credentials. Regular training can help prevent security breaches.

  6. Regularly Update and Patch: Keep your Docker Mailserver and its components up to date with the latest security patches.

  7. Implement Additional Mail Filters: Use tools like SpamAssassin, ClamAV, and others to filter out potential threats before they reach user inboxes.

  8. Use Advanced Authentication Mechanisms: Consider implementing two-factor authentication (2FA) for accessing email accounts.

  9. Backup and Recovery: Regularly back up your email data and configurations. This allows you to restore the system to a clean state in case of a compromise.

  10. Network Security: Ensure that your network is secured and that appropriate firewalls and intrusion detection systems are in place.

By implementing these measures, you can significantly enhance the security of your Docker Mailserver and reduce the risk of future compromises.

This comment was generated by Glime.

You must be logged in to vote
2 replies
@rquevedo
Comment options

How can I set a rate limit to outgoing emails?

@sharpener857
Comment options

I have the same question!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.