On 06-11-2020 13:48, Rafael Azevedo wrote:
Hi there,

This is an old issue and I believe it has already focused on older discussions.

I'm receiving SPAM from my own address.

Checking server logs, user is not authenticating and the only way this spammer can play a trick is by sending an email to its own address (ie: from raf...@mydomain.com <mailto:raf...@mydomain.com> to raf...@mydomain.com <mailto:raf...@mydomain.com>).

Is there a way to avoid this practice ?

Thanks in advance.

BR,
Rafael

Hope I get this right. In main.cf you can put a section:

smtpd_sender_restrictions =
  ...
  check_sender_access hash:/etc/postfix/sender_access
  ...

And in /etc/postfix/sender_access you then add your domain (see man 5 access for more information):

mydomain.com  REJECT  You are not mydomain.com

Then run postmap
# postmap /etc/postfix/sender_access

And finally
# postfix reload

Note that this only works for MAIL FROM, see
http://www.postfix.org/postconf.5.html#smtpd_sender_restrictions
http://www.postfix.org/postconf.5.html#check_sender_access

Best,
Patrick

Reply via email to