I'm trying to deploy an SMTP Server on google cloud run and so far I haven't been able to figure out how to attach a TCP/UDP Load Balancer to the back end.
Is there a way for my Cloud Run application to listen publicly on port 25?
Due to the restrictions of the cloud run platform it is difficult to deploy an SMTP server on Google Cloud Run.Although Port 25 is limited on Google Cloud Run, it is not supported for listening on it because of its link to issues with email misuse and abuse.
However Google Cloud does not place any restrictions on traffic sent to external destination IP addresses using destination TCP ports 587 or 465.Refer to this official GCP documentation on this.
Please refer to this document to know how to attach a TCP/UDP Load Balancer to the back end.
As far as I can tell, Cloud Run is specifically designed for web services and they don't seem to support ingress for ports other than 80/443.
I will continue running my SMTP Server on kubernetes for now.