banderas20
Active Member
Hi.
I have set up a POSTFIX server in an AWS EC2 instance. If I try to send emails between local users using Sendmail, it works.
However, if I try with an external account (gmail for example), it doesn't work.
Command:
POSTFIX Log:
Telnet output:
Finally, here is my main.cf file:
I have port 25 open in the AWS SG.
My guess is that it has something to do with the domain, since my machine is bound to a local domain (ec2.internal), without any DNS record. Maybe GMAIL and other public SMTP servers reject this kind of connections. Anyway, I'd appreciate some help on this.
Thanks!
I have set up a POSTFIX server in an AWS EC2 instance. If I try to send emails between local users using Sendmail, it works.
However, if I try with an external account (gmail for example), it doesn't work.
Command:
Code:
echo "test email" | sendmail [email protected]
POSTFIX Log:
Code:
postfix/smtp[2108]: CD4FE4652F: to=<[email protected]>, relay=none, delay=150, delays=0.02/0.02/150/0, dsn=4.4.1, status=deferred (connect to alt4.gmail-smtp-in.l.google.com[142.250.153.26]:25: Connection timed out)
from=<[email protected]
Telnet output:
Code:
telnet gmail-smtp-in.l.google.com 25
Trying 172.253.63.27...
Finally, here is my main.cf file:
Code:
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = abdsrvr.ec2.internal
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, srvr, localhost.localdomain, , localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
#inet_protocols = all
inet_protocols = ipv4
I have port 25 open in the AWS SG.
My guess is that it has something to do with the domain, since my machine is bound to a local domain (ec2.internal), without any DNS record. Maybe GMAIL and other public SMTP servers reject this kind of connections. Anyway, I'd appreciate some help on this.
Thanks!