Sending mail using GCP on private network - email

More than a simple question-answer, this is more of a recommendation post. Want to see what ideas I have to work with. I am working on porting my company's work to the cloud (GCP) Most of this work is in the form of a pipeline. I'd like to notify completion via email.
The company I work for has a private network. And so the only way to use their mail config is to send it through their internet, and so, cannot use their SMTP-config from GCP.
What's the best way around this?
I'm looking into creating a VPN between GCP and our local network, however, that may not be possible (IT restrictions)
Do I have any other options?
EDIT
What an SMTP Relay work? This guy.

By default, Compute Engine allows outbound connections on all ports but port 25,so if you need to send an email from the instance you have to use port 465 or 587.
GCP explecitely recomends using other third-party tools such as SendGrid, Mailgun, and Mailjet because they offer a free tier package, you can skip all that and connect your instance to Gmail SMTP Relay Service. You will need a Google Account to connect (gmail or Gsuite).
Instructions to configure the Google Account are HERE , I tested sending emails from my MySQL server and Debian 9

Related

sending and receiving emails with GCP

I'm switching from a shared hosting provider to GCP. I have a domain name (domain.com), and on the shared hosting I just had to create a new email address in the directadmin panel, and use squirrelmail to send/receive emails.
The problem is: I don't know how to achieve this on GCP.
I have added a new zone in cloud DNS for the domain name, and I have changed the nameservers of the domain name at my hosting provider (where the domain name is parked).
Now I'm looking for a solution so I can use the domain name (coupled to a VM) but also send/receive emails in an easy way.
Is there a (paid/free) solution I can use which isn't very difficult to install/maintain? I was thinking of creating a mailserver with postfix/postfixadmin, but GCP blocks outgoing mail so I have to use a service like sendgrid or mailgun to send email + I still need to install postfix for receiving email. But to be honest: I've never done this before and I don't find any good tutorials about this.
I have a mailgun account and I tried following this (https://cloud.google.com/compute/docs/tutorials/sending-mail/using-mailgun) tutorial, but the emails I'm sending are not delivered.
Is there an online service or something like that where I can couple my domain name to, to send and receive emails? I tried to google it, I googled on "external mail server" and "free mail server" but I didn't find any (good) results.
Thanks in advance!
Mailgun sounds like a good option to use, if you're still planning to use it on GCP, check that you've created a firewall rule to allow outbound traffic [1]. This step might be the reason why you're not receiving the emails.
If you need a good guide to set up a Postfix server, you might find this guide useful [2].
I've read that you're already using G Suite [3], this option is great and will ease the process a lot.

Namecheap webmail and amazon ec2

I'm trying to setup incoming email for my Amazon EC2 linux box. It's a nightmare to figure out honestly, so I was looking into easier options (Amazon SES is not available in my region..)
My domain's DNS is managed through NameCheap. They have a private email hosting service.
https://www.namecheap.com/hosting/email.aspx
Will this enable me to have a webmail interface where I can send / receive emails from my domain?
And will I then be able to use a service like Mandril / Mailchimp / Sendgrid to deliver email from my Node.js application?
My answer is YES.
With current aws services, mail server is not that easier you can work it out in aws ec2 instance or SES service. I tried, but that's not happy story, especially you need put effords to maintain security and blacklist.
The AWS WorkMail services is bit expensive if compare with other web hosting.
So you should be confident to use webmail services provided by other hosting companies, and there are a lot of choices, enjoy it.

Email Service to send and receive email in google compute engine

I'm new to google compute engine, i used dedicated server before where i get cpanel to configure email so i can send and receive but in google cloud it's not available. so how can i use email service in GCE please help
See the docs on sending email from GCE:
Google Compute Engine does not allow outbound connections on ports 25, 465, and 587 but you can still set up your instances to send mail through ports 587 and 465 using servers provided through partner services, such as SendGrid. This document discusses how to set up your instances to send email using SendGrid.
If you wish to send mail through a corporate mail server, you can use a VPN to bypass these restrictions. This would require running a VPN client on your Compute Engine node, and a VPN server on your corporate network router. This would allow your Compute Engine node to appear "inside" your corporate firewall, and allow unrestricted access to your corporate mail server. There are security implications for this configuration, and you should ensure that your Compute Engine node only has access to the services it requires, and nothing more.
SendGrid is a partner service that provides Google Compute Engine customers with a free or paid SendGrid account that you can use to send mail from Google Compute Engine instances. SendGrid offers a number of advantages:
free tier* to Google Compute Engine customers that includes 25,000 transactional email messages per month
Ability to send emails from addresses other than #gmail.com
No daily limit on the number of transactional email messages
The footnote on free* is:
Google will be compensated for customers who sign up for a non-free account.
See the document for details on how to sign up or set this up on your account.
Use email provider's API to send mail from Google Compute Engine. For that you need the end point url, and authentication key. This is easiest way as ports such as 25, 465 and 587 are blocked in Google Cloud.
You may use your email providers API to send email from GC to avoid

How to set up email on Amazon EC2

I have domain. I have my website on an Amazon EC2 instance. I have pointed the domain there, so website is accessible with the domain now. all is working fine but I want to set up the email now, I should be able to create email id and manage emails.
Someone suggested Amazon SES to be set up, I did that but then what to do?
Any ideas greatly appreciated.
You don't want to run your email on EC2.
Amazon SES is for outgoing email only, i.e. it can replace your SMTP server, so for example if your website generates emails, you could use SES to send them out, but its not a full 'email' service in the traditional sense.
For normal email operations, you need to use an email provider such as gmail, outlook, rackspace email etc.
AWS also offers AWS Workmail as an option. I use both Rackspace email and outlook email for various domains that I have hosted on EC2 instances.
If you are accustomed to using a shared hosting service, i.e. discountasp.net where the web hosting and email is all bundled together as a single packaged service for you, you need to think of things differently when you start running and managing your own ec2 server instances. Its upto you to string the parts together.
Since you have hosted website on AWS EC2 and Domain name pointed to Instance. I would suggest that you use AWS WorkMail to send Email. This is new service which has been introduced. AWS WorkMail is available on US East (N. Virginia) and EU (Ireland) region. It is easy to configure and you can use your domain name to create email Ids, say info#domainname.com.
After configuration you will have your own console for where you can manage and access all your emails. To access emails AWS have own console similar to webmail.

How to configure an Internet mail server to use with IIS website

I am looking for a little direction to my problem. Short story, I have a website hosted on a web server. I pay a yearly subscription. This year I am planning on taking it off and hosting it internally. I already backed up, restored, and installed all necessary components (on Windows BTW with IIS, PHP, and MySQL). The site works great internal and by IP address externally through a firewall. (IP address for now until my web host subscription expires, then I will forward and register DNS).
But now this is my problem, my website has email functionality which works on my providers server. I want to install a local mail server for my website that will wind up sending and receiving emails through my website. I am lost here. No sure which path I should take. I have installed and used Exchange 2003 in the past just for internal domains, nothing for internet AND internet.
Anyone with ideas, links, suggestions? I see that IIS does support SMTP virtual servers, is this a possible route? If so, what about POP3 or IMAP (incoming) server solutions?
Thanks
Edit
---Update On Situation---
So far I have configured a local exchange server that works with my local webserver. I then created a CNAME in my web host DNS zone for my IP address. I created a simple subdomain for my site redirected to my home web server. Everything works great, internal email through Exchange 2003 from website on IIS, redirected DNS names, almost there. Now I just need to create Internet Mail functionality in Exchange. Went through the Exchanges wizard to "open system" for Internet mail, created new SMTP connector and ....nothing for external mail test. Failed! Thought everything was configured properly. I also tried to open all ports on firewall, 25 and 110.
I'd recommend using something like PostMarkApp to send transactional email from the website, and use hosted email (Google Apps for Domains) for your email. Its a pain to run a real mail server.
Link to Exchange Internet mail SMTP connector configuration:
Configure Exchange Internet Mail SMTP Connector
Well, I did figure it out. I was on the right path and everything was working but I just configured my client wrong and my ISp blocked port 25, duh. CHanged port to unused 366. But here is a little tip for anyone that may need to figure this out in the future.
1)Setup install IIS with default SMTP and NNTP virtual servers.
2)Install Exchange into organization. Internal naming convention doesn't really make a difference between internal to externally if you are behind a firewall. Basically this means you don't have to create a seperate zone in DNS if using this for a seperate domain hosted elsewhere. Hope this didn't confuse anyone.
3)Right click on server name in Exchange System Manager and go to Internet Mail Wizard
4)If you want your clients to hold a different domain email address than your internal you can setup in exchange through
Exchange System Manager >> Recipients >> Recipient Policies
Then add a Masquerade in Default SMTP Virtual Server
5)Have a gmail Internet SMTP connector set to smtp.gmail.com as smart host with a gmail email account settings and TLS checked
6)Default SMTP VS set with outbound port 587 and TLS checked
If you need to change SMTP ports too, don't forget to change not just firewall but also inside Exchange.