Reducing spam on Ubuntu

user5858 asked:

I’m getting plenty of emails to [email protected]

Transcript of session follows.

 Out: 220 host.hostname.com ESMTP Postfix (Ubuntu)
 In:  EHLO mail-serv.info
 Out: 250-host.hostname.com
 Out: 250-PIPELINING
 Out: 250-SIZE 10240000
 Out: 250-VRFY
 Out: 250-ETRN
 Out: 250-STARTTLS
 Out: 250-AUTH PLAIN LOGIN
 Out: 250-AUTH=PLAIN LOGIN
 Out: 250-ENHANCEDSTATUSCODES
 Out: 250-8BITMIME
 Out: 250 DSN
 In:  MAIL FROM:<[email protected]>
 Out: 250 2.1.0 Ok
 In:  RCPT TO:<[email protected]>
 Out: 550 5.1.1 <[email protected]>: Recipient address rejected: User

I’ve a site hosted on my VPS whose name is mysite.com and server hostname is host.hostname.com.

What could be the problem here as I’m getting an email every minute with different to email( here [email protected])?

How to reduce this spam?

My answer:


Take your host offline and stop accepting mail entirely, I’d say, would solve the problem entirely. You’re on the Internet. Having random garbage thrown at your server all day is a part of that.

The useful tool fail2ban, normally used to ban ssh attackers, also has some postfix related jails that you can enable, which will automatically ban certain spammers based on the log entries they create.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.