Forwarding ports is only for incoming connections, e.g. when Gmail is sending you a mail. What you've asked is about sending mail to Gmail.All ports are forwarded, except 25 (because ISP blocks it).
Thank you, I will try that relay service. But can you explain me, what for is that custom smtp port field? Even I change it to something else, it sends on port 25 anywayReceiving is the easy part. It should be working with you already (provided you’ve got your MX record added correctly). Sending is the complicated one.
But what’s the use of receiving without sending?! Maybe I’m missing the point.
Ok, now I know that without smtp relay I can't get any further. Will try it out.Oh, I think you’re referring to port 25 on that shot. Yes, you need to send and receive on port 25 to other servers unless you’re using a mail relay then you can define the port for the connection between your server and the relaying service.
The internet sends and receives emails on port 25. You should have that (port 25) open and forwarded on your router to your mail server.
And when you send, you’ll be sending on port 25 so other mail servers on the internet can receive your mail. That will be unencrypted BTW.
If a mail servers feels like it (read: supports encryption) it’ll switch to SMTP-SSL or SMTP-TLS after the initial connection to transmit or receive the message encrypted (on the ports shown in my shot above for example).
I don’t want to discourage you, but if you’re doing this for fun (that’s ok). it’ll need some work to be done to get this running, especially if you’re sending via and email relay.
You’ll need to setup SPF, DMARC and DKIM so you’re emails get delivered to inboxes instead of spam folders.
v=spf1 mx a ip4:<ISP's mail servers subnet>/24 a:smtp.mydomain.com a:mail.mydomain.com a:smtp.myispdomain1.com a:smtp.myispdomain2.com include:mydomain.com include:myispdomain1.com include:myispdomain2.com include:_spf.google.com ~all