• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question postfix overload, attack from chinese IPs - what to do?

D4NY

Regular Pleskian
OS: CentOS 6.8
PLESK: 12.5

Today i received a call of a user that couldn't send mail using mail client on smtp. Checking at the services via Plesk i saw that postfix was stopped and no way to restart it from the panel. Via SSH running "service postfix restart" the service restarted correctly and the green button came back also in Plesk. But after few minutes again it was stopped. The same after rebooting the whole server. Looking at the process runnin it seems to be overloaded.

tail -f /usr/local/psa/var/log/maillog | grep sasl_username

to see who's trying to authenticate and send mails. Other times hacked mailbox sent tons of spam away but this time nothing strange... just normal users sending single mail

tail -f /usr/local/psa/var/log/maillog

to see what's happening in real time and i found hundreds of connection from different IPs to a mailbox that was full of thousands mail in chinese language. I deleted the mailbox and the postfix crash seems to be solved but on the maillog we have continue connection to that mailbox even if no more alive.

I set up fail2ban, totally deactivate the domain and blacklisted the qq.com domain but no way to stop connections all from different ips.

Please check the attached file, it's the result of the command:

tail -f /usr/local/psa/var/log/maillog | grep MYDELETEDMAILBOX

Can't understand relationships between postfix and incoming mail. What's happening?
 

Attachments

  • maillog.txt
    172.5 KB · Views: 6
I'm not sure that there are ways to prevent connections from different IP addresses. You can try to close the entire range of addresses if it is one. But in general, it looks like a typical DOS which is treated only by the performance of the system if you can not use the blacklist or somehow cut it off another way.
You can try GreyListing, by the way.
 
Very disappointing. Do you think that moving the website of the attacked mailbox can stop the ddos on that server? How can i activate GreyListing?
 
In the past I created scripts that were able to block many countries from South East Asia and optional other countries.
Because the script had to run on a small SoHo-router (DD-WRT) I couldn't just create thousands of rules.
It created a set of about 1500 rules.

I was able to do that by first creating several very big subnets (/5, /6, /7 and /8) and then punching some holes in them for countries like Australia.

With the iptables extension "ipset" this kind of stuff can be created more efficient and with cleaner code.

Maybe I can find some time to rewrite the code so it's easy to implement on a Plesk server.

You could Google: "dd-wrt asiablock"

I am relying on ASSP.
That's an "Anti Spam SMTP Proxy" written in Perl. It combines almost all known techniques. I'm using it for some 12+ years.
 
Last edited:
Back
Top