Issues trying to use CyberPanel, email, and EC2 from Amazon

Hey guys,

I’m using EC2 instance from Amazon and I’ve installed CyberPanel on it. I’ve been trying really hard to set up sending emails from our instance, so we can use Rainloop and other tools. However, apparently, Amazon blocks SMTP ports unless they explicitly allow it through a request, right?

I did send them a request but they denied it. They suggested using Amazon’s SES.

Well, I am also trying to use Amazon’s SES. I even followed this tutorial here to override Rainloop’s SMTP settings, but either it gives me an “authentication error” message or a “connection timed out” one.

I have run out of options. What do you guys suggest I do? Can I not use Amazon SNS with Rainloop either?

Thanks!

Also, I can’t send emails with CyberPanel/Rainloop. What tutorial could I check to set up Cloudflare and CyberPanel to at least allow receiving emails?

Amazon blocks all requests going through their server (Ec2), so no matter if you use Amazon SES or any other program but you will not be allowed to send any email using the server and server IP. Cyberpanel rainloop is mailserver and is installed in server. Its for sending mails from server to be precise.

What amazon suggested you is using Amazon SES which doesnt need server relay. It is an independent program and it needs to be configured at Aws level itself along with your DNS. It has nothing to do with your server and cyberpanel.

And for cloudflare, you just need to configure the email routing in the cloudflare account itself and doesnt need anything to be done at server or cyberpanel.

@die2mrw007 dang, that’s so unfortunate! What would you say is the best and cheapest alternative out there?

Also, could you please send me a link, tutorial, or guide showing exactly how I should set up Cloudflare DNS to at least allow emails through? I tried doing that but unsuccessfully.

If you need a complete email solution then try the free alternatives like Zoho Mail which offers free mailserver lifetime.

The cheapest is Mxroute which is like 45$ per year for unlimited domains and emails.

If you just need to receive mail (forwarded to your personal email), then use the cloudflare email routing feature. The Email section of cloudflare itself has documentation on how to do it. Its pretty easy and automatically done. I dont know of any tutorial availability as the feature is quite new and I doubt if someone shared it.

2 Likes

@die2mrw007 great tips, thank you!

As for Cloudflare’s email routing feature, it does look neat indeed. But it’ll basically redirect all my emails to an already existing email provider, like Gmail. I was looking to receive all my emails in Rainloop’s inbox by creating a email@mydomain.com with CyberPanel.

To achieve that, it seems I would need to add a few DNS items on Cloudflare, like ns1 and ns2, a few IP targets… that’s what I’m unsure about, so if you could link me anything interested, or even guide me yourself, that’d be great! :smile:

No, forget about getting it on email@yourdomain with cyberpanel bro because amazon is your server provider and as emails are blocked, you cannot create mailserver on this server. Rainloop on cyberpanel is a complete mailserver system. The reason is that Amazon doesnt allow the SMTP relay to go through its servers unless they lift the restrictions.

@die2mrw007 I think I have good news! I was reading through Amazon’s documentation and they seem to only block port 25, but not ports 587 and 465: Amazon SES SMTP issues - Amazon Simple Email Service

Amazon EC2 restricts port 25 by default. To remove these restrictions, submit an Amazon EC2 Request to Remove Email Sending Limitations. You can also connect to Amazon SES using ports 465 or 587, neither of which is restricted.

The issue with trying to send emails via Rainpool was merely an authentication prolem (I had to create a new IAM user on Amazon’s panel).

Do you think now I can try using Rainpool to receive emails using one of the ports above? In this case, what would I have to add on Cloudflare’s DNS to (try to) start doing so?

Its simply not just the port 25 bro. SMTP replay is completely blocked. No matter whichever port you use to send mails, it will not work.’

There is only 2 option for you. Either get the restriction lifted from amazon for your server or else use a third party mailserver like Zoho mail, mxroute.
Or you just need the mails to be received on your gmail or personal email, use cloudflare email routing feature.

@die2mrw007 I just tried using Rainpool and Amazon with port 587 and it worked. The email was sent properly. But like I said, I’m not sure how to set up Cloudflare’s DNS to redirect emails to my host. Would you have a guide for that? I’d report back and let you know if I managed to get messages or not.

You mean to say is Amazon SES? If so, that will work because its entirely an independent mailserver.

@die2mrw007 Yeah, but I ran a test and the only port blocked by Amazon EC2 is port 25. They don’t seem to block the other ports (587, 465). Can’t I change the server (CyberPanel) to receive email through one of the other ports?

Bro, you are not understanding how mailserver works. As I said, its not just Port 25, there is SMTP relay which is blocked, so any mails sent from Ec2 server IP will be blocked.

The amazon SES using ports 587,465 doesnt use EC2 server (your VPS) and its entirely different platform than your server. Your mails are sent using Amazon SES server and not your VPS server. You cannot by any method send any mails using your server bro, no matter whichever port you use.

@die2mrw007 I think there’s a misunderstanding when people talk about Amazon blocking SMTP. Like I sent you before, their documentation, under “You’re sending to Amazon SES from an Amazon EC2 instance using port 25, and you’re receiving timeout errors” states they only block port 25. They clearly state ports 587 and 465 aren’t blocked. Also, I don’t see any reference to whether they block SMTP relay.

Regardless, I used Email Debugged provided by CyberPanel and checked what DNS records were added to my panel. I copied them, pasted them on Cloudflare and… it finally works!! I’m able to send email from Rainpool/my server and receive too.

I appreciate your attention though, @die2mrw007 :smile:

1 Like

I dont know whats the latest changes in aws, but smtp relay access was blocked back then.
Good that your issue is resolved. I am marking this thread as closed.

1 Like