0

My SMTP server is being abused because external adresses can send emails to adresses like all@mydomain.com, dev@mydomain.com etc...

I would like to restrict the usage of those adresses only by internal users ( could be from network ) that have the same domain name like john@mydomain.com.

With these restriction external user like joe@externaldomain.com couldn't send emails to all@mydomain.com but john@mydomain.com could. And joe@externaldomain.com could send an email to john@mydomain.com.

I hope that it is clear enough... I realy don't know how to implement that in Postfix.

KaAzZ
  • 33
  • 1
  • 7
  • I would like to resume it as : How to restrict alias usage for only internal users in postfix – KaAzZ Oct 04 '17 at 12:58

1 Answers1

1

I finally found an answer :

I has to add an access file in my postfix main.cf file

/etc/postfix/main.cf:
    smtpd_recipient_restrictions =
        ...
        check_recipient_access hash:/etc/postfix/access

/etc/postfix/access:
        all@my.domain   permit_mynetworks,reject
        all@my.hostname permit_mynetworks,reject

postmap the access file, restart Postfix and that's it !

Found here : http://www.postfix.org/RESTRICTION_CLASS_README.html#internal

KaAzZ
  • 33
  • 1
  • 7