0

my first post here.

I had a postfix that I'm using as a relay. I configured to use authentication with the following main.cf: https://pastebin.com/TQfmAQp2

The problem is: when I try to send an e-mail using "Send-MailMessage" in PowerShell within a host inside "mynetworks" I am able to send it without authentication, in other words: anonymously.

Is there any chance that I'm doing something wrong? I do not want to use anonymously, ONLY with authentication.

PS.: I created users following this tutorial: https://blog.scottlowe.org/2006/03/01/creating-users-for-a-postfix-based-mail-relay/

Thanks!

1 Answers1

1

Assigning extra permissions to unauthenticated clients based on their network address is the whole point of the mynetworks configuration. Outside unusual custom configuration, only add IP ranges you wish to allow relaying without authentication.

If you want to restrict local (such as: shell/cgi users on the mail server) users as well, you would likely have to ensure special treatment for system services not prepared to authenticate. If you merely wish to permit local users, but none from other machines, leave it with just the reserved loopback ranges:

mynetworks = 127.0.0.0/8 [::1]/128
anx
  • 8,963
  • 5
  • 24
  • 48