Enabling SMTP ports on VCAP - cloud-foundry

I want to be able to send emails from my applications deployed on VCAP to email providers supporting SMTP. Is there a way to configure VCAP to make this happen?

There's no restriction on outbound communication from Cloud Foundry, you should be able to connect from your applications to any mail service you like.

Related

AWS SES - SMTP vs SES client

While working with AWS SES, I think I have two choices to send mail. Java is the programming language I use:
Use Amazon SES client library
Send mail using SMTP (maybe using Java mail API).
But I guess Amazon SES client library is not using SMTP - I guess it is using HTTPS for the communication from my machine to the mail server.
Or is it another layer built on top Java SMTP library for easier configuration?
I am asking this because I could not configure SMTP port etc when I am using Option #1 above.
Can you please help me understand the difference? Thanks in advance.
You are correct, you have both options to send email.
Option 1 uses SES API, which is available via HTTPS. So it is not related to SMTP protocol.
You have the same capabilities, but instead of use SMTP protocol you will be using SES API.
As it is an AWS API you will need to provide credential to use it.
Java example:
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-sdk-java.html
The Amazon SES SMTP endpoint requires that all connections be encrypted using Transport Layer Security (TLS).
Regarding option 2, it is mandatory to use TLS, so each type of TLS option has its own available ports.
Ports for STARTTLS: 25, 587, or 2587
Ports for SMTPS: 465 or 2465
It is also mandatory to use authentication.
So you SMTP client must support TLS (STARTTLS or SMTPS) and authentication.
Documentation:
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-connect.html
Java example using STARTTLS:
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-java.html
If you run in a private network w/o Internet GW you need SMTP as there is no VPC interface endpoint for SES. There is a feature request open w/ AWS but no ETA

mail smtpport configuration in Google cloud - zimbramailcow

I have installed zimbra on GCP VM. Im able to received mail from outer and inner network but unable to send mail in outer network. I have change smtp port to 2525 and define firewall but still not able to send mail.
br//
madhur
For security reasons Google blocks SMTP traffic and that is why you can't send email:
By default, Compute Engine allows outbound connections on all ports
but port 25, which is blocked because of the risk of abuse. All other
ports are open, including ports 587 and 465.
See also the documentation what kind of traffic gets always blocked by default in GCP (and you can't change it).
The only way to semd emails from you GCP instances is to use trusted 3rd party tools such as: SendGrid, Mailgun, or Mailjet.
Have a look at the documentation on how to send emails from GCP VM's, which provider is best suited for you and how to configure specific service.

SES port is blocked in GCP

I have an application that is hosted on a GCP machine.
This application is supposed to send a mail via AWS SES service.
From what I've seen in GCP documentation, all default SMTP ports are blocked in GCP machines.
is it possible to unblock one of the ports or use another port for sending the mail?
Thank you,
Maya
Use 2587 port instead of 587. http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-connect.html#smtp-connect-starttls
Look amazon SES on Google Cloud Computing instance VM using postfix
Port 2525 is unblocked and all major vendors provide support for the 2525 smtp port.

Disadvantage of SMTP setup in AWS server

I want to configure SMTP setup in AWS instance to get disk usage of AWS instance.
Is there any disadvantage or any point that we should keep in our mind before setup the SMTP in AWS server.
I am using mailutils for setup the SMTP by following given link.
I am using EC2 instance.
Is there any way to setup email functionality in AWS ec2 instance.
I would not set up SMTP for this purpose
Firstly, AWS generally block SMTP mail sending. See this discussion on server fault
https://serverfault.com/questions/165854/my-ec2-instances-email-is-being-spam-blocked-by-gmail
Secondly, AWS has it's own built in monitoring and metrics system called "Cloudwatch" Unfortunately it does not directly support disk space monitoring straight out of the box but AWS do tell you how to do it http://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/mon-scripts.html

setup postfix SMTP on amazon ec2

Im trying to setup a postfix SMTP mail server on my amazon ec2 instance. i followed this guide http://cybart.com/how-to-install-and-configure-postfix-on-amazon-ec2/ and many other ones on configuring the main.cf
everytime i try to telnet my mail server mail.domain.com smtp it trys to connect to address XXX.XXX.XXX.XX but then operation is timed out and im unable to connect to remote host.
If you're still looking for guidance on how to setup an email server using Amazon EC2, I've written a guide for it. Even though some find using ec2 for email to be a hassle it doesn't have to be for you.
https://avix.co/blog/server-hosting
Here are some details about what the configuration will give you;
The system uses:
-Postfix as the smtp agent
-Dovecot as the client-side connect and mailbox manager
-Postgresql database to handle mail users, mail transports and the Spamassassin database
-Amavis (w/ Clamav & Spamassassin) for protection against viruses sent through email, and to facilitate an adaptive spam detection system that learns and corrects its behavior for each individual user
-Spamassassin as the spam filter and bayes to learn spam from ham and ham from spam
-Apache as the web setup, enables http & https connections to your site
-Squirrelmail as the default webmail. After the server is setup you will be able to check your email on yourdomain.com/mail from any browser on any device
The system supports:
-Multiple transports for different domain
Good luck, and let me know if I can clarify anything.