Score:0

How to prevent postfix from sending e-mails without authentication

ma flag

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!

Score:1
fr flag
anx

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
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.