How to fix ‘unknown user’ error on postfix

Debian 6 fresh install, ISPConfig3, dovecott, postfix.

Received this when try to send an email to the created email:

This is the mail system at host example.com.

I’m sorry to have to inform you that your message could not
be delivered to one or more recipients. It’s attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<admin@example.com>: unknown user: “admin”

Reporting-MTA: dns; example.com
X-Postfix-Queue-ID: 89D21231E2
X-Postfix-Sender: rfc822; xxxxx@xxxxx.xx
Arrival-Date: Sat,  4 May 2013 17:12:29 +0200 (CEST)

Final-Recipient: rfc822; admin@example.com
Original-Recipient: rfc822;admin@example.com
Action: failed
Status: 5.1.1
Diagnostic-Code: X-Postfix; unknown user: “admin”

And fixed like that: delete the domain example.com (my domain) from the line mydestination, leaving it like that:

mydestination = localhost, localhost.localdomain

Linux Security: How to block an IP so it can’t connect to your server

You can use IP Tables or a reject route.

Reject route ex:

/sbin/route add -host 200.x.x.x reject

list routes:     route -n

remove block: route del 192.168.0.123 reject

 

or, you can use iptables to ban a range of IPs from your server, like so:

iptables -I INPUT -s 178.33.0.0/178.33.0.0 -j DROP