This guides assumes you already have domain setup in the server
- Go to SES Home Page in AWS
- Amazon SES > Configuration: Verified identities > Create identity
- Select Identity Type of Domain
- Enter your domain in my case it's
hamro.world
- Leave the default configuration then Create Identity
- After that copy the 3 CNAME record into your dns-zone of lightsail
- Changing DNS records take time, and continue after your domain is verified
- Then from the right bar, select SMTP Setting, make a note on SMTP endpoints and Click create the credentials, use default user name and select create, you will get smtp username and smtp password.
- SSH into your server and search for lemmy directory
- If you used ansible then default directory will be
/srv/lemmy/your-domain
/
- cd into that directory and edit the file lemmy.hjson with content something like this
email: {
smtp_server: "email-smtp.mumbai-west-5.amazonaws.com:25"
smtp_from_address: "[email protected]"
smtp_login: "BJKAQXXGLDBZZ"
smtp_password: "XzSDFVSDFDF+fKxDSFDFSDFFDSq"
tls_type: "tls"
}}
then restart docker container from the same directory:
sudo docker compose restart lemmy
Normally Aws have SES sandboxed and you need to manually request to remove the sandbox. So, for the testing go to Amazon SES > Configuration: Verified identities > Create identity > Select Identity Type of Email and add your email (in which you want to test the email outgoing from [email protected] ) then verify it.
Then create account with the same email in your lemmy-server and voila you will receive your email.