How to Fix Postfix' 'Relay Access Denied'?
Apr 8 13:12:20 ip-xxxxxxpostfix/smtpd: NOQUEUE: reject: RCPT from xxx-ap-south-1.compute.internal[xxxxx]: 454 4.7.1 <firstname.lastname@example.org>: Relay access denied; from=<email@example.com> to=<firstname.lastname@example.org> proto=ESMTP helo=<server-6f8d85756-xp6hp>
mynetworksThis will permit hosts by IP address that match IP ranges specified in $mynetworks. In the main.cf you need to change the network ranges which can send e-mail through Postfix. If its mentioned as 127.0.0.1, it will only relay emails generated by the server itself.
1. To Open e-mail from all network , just add "0.0.0.0/0" in "/etc/postfix/main.cf". If you want restrict it to certain network please mention it explicitly.
mynetworks = 0.0.0.0/0, 127.0.0.0/82. Reload the postfix.
systemctl reload postfix