Saturday, November 19, 2016

ubuntu - How to setup a mailserver on Google Cloud VM?



I want to know how to setup a mail server like postfix on Google VP instance.




I'm running Ubuntu 16.04 (and LAMP stack) and can't get the mail server to send email from website.



I have installed postfix, and opened port 25, but no luck.



Any ideas on how to proceed?



Error logs: Network is unreachable and Connection timed out


Answer



According to https://cloud.google.com/compute/docs/tutorials/sending-mail/, you cannot set up a mail server the usual way, as ports 25, 465 and 587 are blocked for outbound connections on Google Cloud. Instead, you might take a look at relaying services such as Mailgun or SendGrid, which allow sending through port 2525 or an API instead. These services might cost a little bit of money, however.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...