I gotten a VPS recently and I wanted to host my own websites and with that, the ability to send and receive mail.

I set up my mail server according to this guide: https://www.exratione.com/2012/05/a-mailserver-on-ubuntu-1204-postfix-dovecot-mysql/

And it worked: I can access the SMTP with STARTTSL and IMAP server with authentication, all on standard port.

But now my Postfix turned into a spam server (currently it has 200+ mails queued up) and I was forced to turn it down. Also it always got all the MySQL connections, and websites couldn't connect to it.

How can I fix my Postfix?


Nuke it in orbit! Your server was compromised, I wouldn't try to "repair it" but plainly starting from 0 and then prevent it gets compromised again.

You can check our network paranoids security experts counsels at Information Security.


Prevent from happening again:

  • 1
    And lock down your postfix server so it doesn't accept mail requests from random mail servers – Thomas Ward Nov 26 '13 at 18:41
  • by nuke it, you mean the whole server? or just the mail part? – NaGeL182 Nov 27 '13 at 6:11

seems like my server wasn't compromised it just my settings allowed anyone to connect to it, and use it without authentication.

in my main.cf I changed the mynetworks = [::/0] to mynetworks = [::ffff:]/104 [::1]/128 and removed the permit from smtpd_client_restrictions

after i cleared the queue and started the server none of the problems i experienced seems to appear again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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