setup postfix SMTP on amazon ec2 - amazon-web-services

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.

Related

Denial of Service attacks against remote hosts on the internet

I just got the bellow mail from Amazon, The instance have ubuntu as os and have ldap and apache2 installed,
LDAP Server is only used by one other instance, to auth it users(just ubuntu users) nothing else use the LDAP Authentication
Apache2 only have phpldapadmin and most of the time is down(start it when I need to make change to ldap)
I have tried to check the syslog and auth.log, cannot find any successful login attempt expect for mine (same user, key and IP ).
The report was sent while we were conducting a stress test about 1000 req/sec on a web app hosted on tomcat6 on the machine (the one that uses the LDAP Server to authentication) and the type of request that was used in the stress test doesn't require any type of authentication only load data from db and return a json array
we have only ssh,ldap and http open for LDAP Server machine(with the issue)
Question is: * How to find out the cause of the outbound traffic? Can the stress test cause this or is it just coincidence ? *
Dear Amazon EC2 Customer,
We've received a report that your instance(s):
Instance Id: xxx
has been making Denial of Service attacks against remote hosts on the Internet; check the information provided below by the abuse reporter.
This is specifically forbidden in our User Agreement: http://aws.amazon.com/agreement/
Please immediately restrict the flow of traffic from your instances(s) to cease disruption to other networks and reply this email to send your reply of action to the original abuse reporter. This will activate a flag in our ticketing system, letting us know that you have acknowledged receipt of this email.
It's possible that your environment has been compromised by an external attacker. It remains your responsibility to ensure that your instances and all applications are secured. The link http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1233
provides some suggestions for securing your instances.
Case number: 000000-0
Additional abuse report information provided by original abuse reporter:
Destination IPs:
Destination Ports:
Destination URLs:
Abuse Time: Fri Jan 01 05:27:00 UTC 2016
Log Extract:
<<<
It has come to our attention that Denial of Service (DoS) attacks were launched from your instance to IP(s) 162.159.9.138 via TCP port(s) 53. Please investigate your instance(s) and reply detailing the corrective measures you will be taking to address this activity.
In the meantime, we have restricted network access to only inbound TCP ports 22 and 3389 on the instance(s) to prevent further abuse.
If you believe that you were compromised by an external attacker, the best recourse is to back up your data, migrate your applications to a new instance, and terminate the old one. Attempting to repair a compromised instance does not guarantee a successful cleanup in most cases. We recommend reviewing the following resources to ensure your EC2 environment is properly secured:
Amazon EC2 Security Groups User Guide:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html
AWS Security Resources:
http://aws.amazon.com/security/security-resources/
AWS Security Best Practices:
https://media.amazonwebservices.com/AWS_Security_Best_Practices.pdf

Port 25 is blocked on AWS

I am completely new in AWS and I want to know about port 25 to send SMTP mail.
My organisation is using one SMTP relay server which is having only one port 25, no any other port is available.
I have an application (written in flask) which i will deploy on AWS and will use it to send SMTP mail using my organisation's server to outlook.
Now, i want to know whether port 25 is blocked or not and can it be used in this scenario or not.
Thanks in advance.
This is blocked on purpose by Amazon.
If the email provider supports another port you're advised to use this, however it seems for your use case you're limited.
In this case you will need to follow the instructions that are available on the How do I remove the restriction on port 25 from my EC2 instance? page. This will require you to fill in this form specifying your business case for why it needs to be unblocked.

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.

How to configure email server for sending emails in amazon ec2

I like to configure my own mail server for sending bulk e-mails in amazon ec2 services.But i don't know where to start and what are the softwares needed to configure the linux instance of ec2?
I know already how to set up simple web server in ec2.
These set up is only for sending bulk emails because i spent more money for amazon ses and mandrillapp so i jumped into setup my own email server.
Your suggestions very helpful for setup my server.

Easy way to send emails using SMTP from Amazon Server?

I have a business website hosted at Amazon's server. We are currently using Amazon's SNS to send email but we would like to setup our own email system based on SMTP. If you have any ideas about how to do , I would like to request for you suggestions /ideas.
Since you are on AWS already, easiest thing to do is use their SES product - a drop-in replacement for an SMTP server - you really don't want to run your own on an EC2 instance - your deliverability rates will likely go way down if you try as the EC2 instances and ip addresses ranges are often abused by spammers.