I'm trying to setup postfix as MTA on a AWS EC2 instance. I want to use this as mailserver for my domains and want to use it along with Outlook/Thunderbird.
I've never setup postfix before, therefore I used this great guide here:
Now I can connect to the server via STARTTLS to mail.mydomain.com and send emails to my own email account firstname.lastname@example.org via Thunderbird.
However when I try to send an email to an external domain email@example.com I get an error
Relay access denied.
The logs show:
May 31 14:55:58 ip-172-31-23-97 postfix/smtpd: NOQUEUE: reject: RCPT from myhostname[18.104.22.168]: 554 5.7.1 <firstname.lastname@example.org>: Relay access denied; from=<email@example.com> to=<firstname.lastname@example.org> proto=ESMTP helo=<[192.168.178.64]>
My postfix config:
I know there are many pages out there that address this issue.
Mainly the issue can be fixed by
smtpd_relay_restrictions but none of the changes fixed my issue.
What can I do to resolve this?