I have a postfix mail server.
I'm currently receiving a lot of messages telling me that someone with certain IP address is trying to access my server, failing always in the AUTH LOGIN
So... I'm kind of tired of receiving this messages. How can I block this IP address from trying to access my server?
I already tried this (and maybe I tried it badly, please correct me if I'm wrong...):
1)
In main.cf
smtpd_client_restrictions = check_client_access hash:/etc/postfix/ip_access
And in ip_access file
ip.address.num.ber REJECT
and after that, run
postmap ip_access
And restarting the server, it really doesn't works. I still receive annoying messages...
I receive nothing at logs
2)
In main.cf
smtpd_recipient_restrictions = check_client_access hash:/etc/postfix/ip_access, check_recipient_access hash:/etc/postfix/ip_access
smtpd_sender_restrictions = check_client_access hash:/etc/postfix/ip_access, check_recipient_access hash:/etc/postfix/ip_access
In ip_access file
ip.address.num.ber 550 we do not accept spam
and after that, run again
postmap ip_access
And restarting the server, I get this at logs:
fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
and also I then stop receiving any messages from any sender, not just this ip address I want to ban...
any idesas? Thanks!