Categories
Web

Admin 101: Postfix smtp limits

I’ve just moved all my sites on to a new install of Ubuntu on one of my VPses. This site and In Photos are now on the same server again and the VPS has finally calmed down.

Between configuring Apache (turn off keep alives, and reduce the number of child processes), installing xcache and the WordPress object cache and configuring it, and configuring MySQL I totally forgot about Postfix.

I did install Postgrey of course but when Blacknight switched the ocaoimh.ie web and mail traffic to this server things started to go screwy.
Load average shot up, I thought it was Apache and spent quite some time playing with the number of processes, all to no avail. I didn’t immediately notice the large number of smtp processes when I did a “ps auxw”. I was looking at Apache.

What was happening was a rumplestiltskin attack on my server. Rogue bots all over the Internet try to send spam emails to mail servers using randomly generated addresses in the hope of guessing a correct one. It happens all the time, and I had configured Postfix correctly in the past, but I had forgot this time.

So, if your server is suffering under the strain of too many Postfix smtp processes open up /etc/postfix/master.cf and look for the smtp line:

smtp inet n – – – – smtpd

Change the last dash to a number, try small first, depending on how much mail traffic your server gets. I changed mine to 3, restarted Postfix, and the server is humming along nicely now. Postfix was actually using up more resources than Apache during those attacks! It’s unfortunate that Ubuntu (and probably every other dist of Linux) allows unlimited number of smtp processes.

Oh, I’m hosted at Linode. Yes that’s an affiliate link, but I’ve been using them for years and been very happy with them.

Categories
blogging Web

Moved home last night

This blog moved home that is, I’m still tucked up in Blarney!

I moved to a slightly more beefy linode 200 VPS at linode.com and thanks to Michele at Blacknight the dns changeover took place quietly and unobtrusively last night around 1am. Hopefully you’ll see a slight improvement in page download speed which should improve over the next few days as I tweak settings and give MySQL more memory.

Categories
Web

Surviving a DDOS

Linode.com, where this site is hosted, suffered a distributed denial of service attack this morning. It looks like my two blogs were down and flaky for about 2 hours but things are in hand now and back to normal again! Phew.