• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Instructions for setting up email on an AWS Lightsail server running Plesk for WordPress

LordLiverpool

Basic Pleskian
Server operating system version
AWS Ubuntu 5.15.0-1026-aws
Plesk version and microupdate number
Plesk Obsidian Web Admin Se Edition 18.0.48
Hello Plesk

Are there any instructions on how to setup email on an AWS Lightsail Instance running Plesk.

I'm using the Plesk server to host a WordPress website.
The Wordpress website is not sending any transaction emails e.g. User Registration, Password Reset, Contact Forms etc.

Do I need to connect to AWS SES?
Do I need an SMTP Plugin?
How do users access their email inbox? Webmail? Horde?

Any help is appreciated.
 
As far as I know AWS is blocking port 25 (which is needed for outgoing mail) by default. With "aws blocking port 25" in a Google search you should find a wealth of helpful articles on that.
 
By default AWS lightsail blocks port 25 which prohibits any server to send mail. See https://support.plesk.com/hc/en-us/...hosted-on-AWS-or-LightSail-port-25-is-blocked

You can request to unblock port 25 as described in the article linked above. However I've read posts from other users on this forum who wrote their request was denied by AWS. You could setup a relay and use SES as a relay provider (or any other mail provider for that matter). If you just want you're wordpress website to be able to send transaction emails then using a SMTP plugin might be easiest solution.
 
@Peter Debik @Kaspar

Thank you for replying I genuinely appreciate it.

I've google this subject to death.

Best instructions I could find were these:
I understand that port 25 needs opening and my domain need verifying and I have to request to be removed from sandbox mode.

But no matter how many links I read there's no mention of how to configure Plesk.
Sure I'm confident I could follow various instructions and get WordPress sending transactional emails.

I looked through the Plesk documentation and it was sparse when it came to mail setup.
I think it largely assumes one knows what one is doing, clearly not me :)
I was hoping for a top level diagram of how all the moving parts interact.

Anyway not to be detered I will plod on and report back what I discover in the hope it helps others.

Thanks for your help.
 
You do not need any specific configuration in Plesk, for that reason you cannot find specific documentation. The problem is that AWS is blocking the port. That is something outside Plesk and "in front of" your instance. The moment you have an open port 25 you'll be able to send emails.
 
A Plesk server usually doesn't require any additional configuration in order to send email. However some providers, like AWS, Azure and CGP block the mail port (25) to prevent abuse of their network. Which means additional steps are needed in order to be able to send emails. Some of those providers (like AWS) allow you to submit a request to unblock port 25, so you can simply send email without any additional configuration (if your request gets accepted).

Now, with AWS you have three options.
1) As described above (and as mentioned in this article) you can submit a request to AWS to unblock port 25. So you can send emails from your Plesk LightSail server without any further configuration. They unblock port 25, and you're good to go (I think). However from what I've read from other users AWS does not always grand the request to unblock port 25. So it seems this is not a viable option for everybody. (NB This request has nothing to do with the use of SES. It is just a request to unblock port 25, so sending emails directly from your Plesk server becomes possible.)

2) Alternatively a relay can be used to send email. Which means you relay all email messages from your server to either another server (without any port 25 restrictions) or to a mail service like SES, Mandrill, Mailgun, SendGrid, ect. This option might be the most daunting if you technical knowledge is limited. As it requires changing configuration directly on your server. There is however a great Plesk support article that explains the steps needed to configure a Plesk server for use with SendGrid. The steps are probably similar for other mail services.

3) Last option is to use an SMTP plugin for Wordpress and configure it for use with a mail service (like SES). The article you've linked to in your previous post explains this option quite well for use with SES. There is no additional configuration needed in Plesk for this option. You just configure SES (or any other mail service) and then configure the SMTP plugin. That's all.

I do like to point out that options 1 and 2 would allow for any email to be send from your server. (That's a good thing btw). Not only transaction email from your Wordpress site, but also any email notifications from Plesk itself (update notifications, Plesk password reset emails, monitoring alerts, ect). The third option only allows for emails the be send from your Wordpress site.

Lastly, just because you use AWS LightSail doesn't mean you need to use AWS SES. Use any mail service you like.

Hope this helps.
 
Last edited:
But no matter how many links I read there's no mention of how to configure Plesk.
As others already mention, there's no additional configuration that is needed to be done in Plesk as Plesk manages everything. Just need to open a ticket with AWS to request port 25 to be unblocked. The alternative is to use a relay that others has mention.

Now, if you're not acting like a hosting provider and don't care too much about email, what you could do is configure WordPress to use SMTP and use a secured port instead (as mention by Kaspar as the third alternative). But if you're going to be using email for anything without using a third party email provider (GMail, Outlook/Office 365, whatever), then the easiest thing to do is to open a ticket with AWS and request port 25 to be unblocked.
 
Sorry, it took so long to reply, I was waiting on AWS, My Web Registrar and for DNS to propagate.

OK, I think AWS has approved SES on my account, but they haven't told me!
My daily limit is now 50,000 emails and 14 per second,
Last week it was 0 and 0 respectively.
  • I can send a test email from the AWS SES dashboard and it arrives at my Gmail account.
  • I can send a verification email from the AWS SES dashboard but it doesn't arrive at my Webmail account.
I followed this step of the instructions:

But if I try to send or receive an email from within Webmail, nothing happens. - Pending Verification explains this.

My only guess is I need to add or delete something from my DNS records,

I have the following DNS records so far:
  • A - webmail.example.com - Server IP.
  • A - mail.example.com - Server IP.
  • MX - mail.example.com - Server IP.
Do I need an MX record explicitly for webmail or is mail sufficient?

Am I missing anything? Any help is greatly appreciated.

(see the images attached)

Kind Regards.
 

Attachments

  • Screenshot 2023-01-16 135206.jpg
    Screenshot 2023-01-16 135206.jpg
    94.1 KB · Views: 8
  • Screenshot 2023-01-16 135329.jpg
    Screenshot 2023-01-16 135329.jpg
    36.7 KB · Views: 7
I followed this step of the instructions:
Just for reference and to make sure were on the same page, if you followed the instructions in the linkend AWS lightsail documentation you've basically chosen option 3 from my last post. The linked AWS Lightsail documentation only covers sending email. Specifically for only sending email from a Wordpress site.

But if I try to send or receive an email from within Webmail, nothing happens. - Pending Verification explains this.
With your current setup it is not possible to send email from your server other then trough your Wordpress website. That includes not sending mail via webmail either. If that's what you're after then I have to refer you back to my previous post and chose option 1 or 2.

You should however be able to receive email. Perhaps I am misunderstand what you posted about your DNS record, but I suspect you've configured you MX wrongly. Did you set the host/name of your MX record to 'mail'? It should not have any 'host/name'. Usually that's noted with an @ symbol.

Also, does your current MX record point to mail.example.com or to an IP? It should point to the former (and in turn the mail.example.com record should point to the servers IP).
I have the following DNS records so far:
  • A - webmail.example.com - Server IP.
  • A - mail.example.com - Server IP.
  • MX - mail.example.com - Server IP.
Do I need an MX record explicitly for webmail or is mail sufficient?
No need for any additional MX records.
 
@Kaspar

Thanks again for your help, it's appreciated.

So, I have two objectives:
  1. To be able to send and receive domain emails e.g. [email protected] or [email protected] via webmail mailboxes,
  2. For WordPress to be able to send transactional emails.
To do this I thought I needed to do two things:
  1. Request AWS SES to unblock port 25 so that the webmail accounts can send & receive
  2. Use a WordPress Plugin e.g Fluent-SMTP so that when someone fills in a contact form it's actually emailed.
At this point am I wrong in my thinking? If I've misunderstood you then I apologise.
I thought that I needed to do both that WordPress was incapable of sending emails by itself,
that WordPress wasn't connected to Plesk in any way or am I mistaken?
Does Plesk handle WordPress transactional emails by itself?

My Plesk server is still saying Port 25 is closed under Mail > Mail Settings:

Screenshot 2023-01-16 164158.jpg

Clicking "recheck" makes no difference.

I have explicitly opened Port 25 on my LightSail Server Firewall.

Screenshot 2023-01-16 164423.jpg

I checked my Plesk Firewall and it looks to be set up correctly:

Screenshot 2023-01-16 164319.jpg

I asked AWS to open Port 25 via the SES dashboard.
I think that was granted. No notification from them.
But I have new functionality this week that I never last.

That leaves DNS mistakes.
I've obscured anything that identifies the domain or IP address.
But you can still see what I've added:

Screenshot 2023-01-16 165037.jpg

The last two records AWS asked me to add to verify the MAIL FROM domain:

Screenshot 2023-01-16 171048.jpg

Have I made any mistakes?

Also have I missed something really fundamental about any of this setup?

Thanks very much.
 
Forgive me if I sound rude, but I got the feeling you maybe went in over your head a bit? I admire your perseverance on this topic, but I am afraid you're a long way from your goal. Don't get me wrong, I am happy answer any of your questions. But for the sake of your own sanity you might be better off using a different provider that does not block port 25 by default. (Sorry, I don't have any recommendations).

AWS is great, but comes with a some caveats. Tying in different AWS services with Plesk requires a fair bit of technical knowledge.
 
@Kaspar

It's ok, I appreciated your help so far, and I apologise for my inexperience.

I just made a reasonable assumption that because Plesk was offered on the AWS Platform,
there would be documentation I could follow on how to configure a Plesk Server (including email) on AWS.
If only in the self-interest of reducing the number of forum threads, (like mine)

Surely I can't be the first or the only one who has had this issue:


Setting up email is a one-off. I won't be back next week with the same issue.
How hard would it be for me to accomplish if I had even a basic set of instructions?
Is all Pleskian knowledge cerebral-based? and for evermore?

Ask yourself - "What is the raison d'etre of this forum, if it's not to help people like me?"

I for one can't wait for the likes of ChatGPT to make forums like this obsolete.
Already looking good, give it a couple of years:

1673942780480.png
I digress, I will try watching your Udemy course to see if I can glean any knowledge:

But not to be deterred, I will carry on...

Thanks very much.
 
Ask yourself - "What is the raison d'etre of this forum, if it's not to help people like me?"
Help comes in many forms. You might be looking for an answer but getting advice instead. You'd be wise to at least consider the advice given, even if it steers you away from the path your on.

Setting up email is a one-off. I won't be back next week with the same issue.
This assumption carries some merit, but is not necessarily true. You see, the challenge with using AWS SES is that every single domain you like to send email from need to be verified trough AWS SES. Or alternatively, if don't verify a domain, you at least have to verify every single email address you want the send email from. There is no integration to automate the verification process from Plesk. Which means that you have to do this manually in the AWS console every time you create a new email address in Plesk (and add a domain in Plesk). Which hardly makes it a "one-off" in my book.

However, if you just run one or two websites with a fixed number email addresses and no plans to expand on the number of website or email addresses, than it might be a one-off for you.

Now, back to the matter at hand. Have you been able to solve any issue's in the mean time? Otherwise I suggest we start be solving the "not receiving" any email.
 
@Kaspar

I apologise if I came off sounding ungrateful, I didn't mean to, and I'm sorry if I did.
I appreciate your job can be tiresome handling the same issues over and over.
I understand the concept of "learned helplessness", and I guard against it.
I'm not lazy, if you told me to read something specific and relevant I'd sit there all day working away at it.
I'm genuinely grateful for all of your help so far, I've no one else to ask...

OK, heavy snow here for the last two days, kids off school, work badly interrupted.

What have I done since we last spoke?

My DNS changes knocked off the original email. (As Homer would say "Doh!")
So I reverted the records and it was restored.

To divorce Test from Live, I've spun up a new AWS Lightsail Server running Plesk.
I've installed a spare domain I have. And onto the domain I installed WordPress.
I will make all my changes there before doubling back to the Live server.

The Udemy course was good, my only reservation was,
I didn't like the idea of being dependent on Mailjet's benevolence for my email delivery.
What if Mailjet's circumstances change? Unless I'm being overly cautious here.

I installed TelNet on my Windows PC and pinged port 25 on the live server, it said it was open.

2023-01-19 14_11_27-Administrator_ Windows PowerShell.jpg

I installed netstat on my server and ran the command:

Code:
sudo netstat -tuplen | grep 25

I think port 25 is open and a process is listening on that port:

2023-01-19 14_48_20-Plesk_Ubuntu_Terminal_Lightsail.jpg

Should I investigate what process is listening or assume it's the SMTP process?

So is the warning on the Plesk Dashboard about Port 25 potentially a false positive?
Or do I need to do something else? (Knowledge Gap!)

2023-01-19 14_55_13-Mail Settings - Plesk Obsidian 18.0.48.jpg

Thanks again I will report back tomorrow once I've done the DNS, SES, and SMTP stuff again as I have to wait for propagation.

Kind Regards.
 
My DNS changes knocked off the original email. (As Homer would say "Doh!")
So I reverted the records and it was restored.
Are you saying you're able to receive email without any issues now?

The Udemy course was good, my only reservation was,
I didn't like the idea of being dependent on Mailjet's benevolence for my email delivery.
What if Mailjet's circumstances change? Unless I'm being overly cautious here.
I am not familiar with the specifics of the Udemy course. To my knowledge Mailjet is just another mail service provider. Just like AWS SES, Mandrill, Mailgun, SendGrid, ect.

I installed TelNet on my Windows PC and pinged port 25 on the live server, it said it was open.

[...]

So is the warning on the Plesk Dashboard about Port 25 potentially a false positive?
No. Most likely port 25 is open for incoming traffic to your server, but blocked for outgoing traffic.
 
OOF, this is exactly the thing im facing, i just need some basic Wordpress emails, ie. form data, and changing the administration email, etc. I guess I will also file a request for Port 25 to be enabled, although i thought it was already being let through the firewall through the Lightsail DNS config.
 
Back
Top