[Question] How to get email working on Lemmy-Ansible install?

I used the ansible method to install Lemmy on a DigitalOcean VPS. They do block port 25 and there is no way around that. I tried to change the port from 25 to 465 in the config.hjson file but still no luck. I am super new to this but I want to get this working so bad. I’m so close! The site is working fine, just no emails. I’ve checked spam, trash, etc. - nothing is getting sent.

bender,
@bender@insaneutopia.com avatar

Are you running the zerobytes monster instance?

ZMonster,
@ZMonster@lemmy.world avatar

I don’t know what that is so I’d assume not. I used the Lemmy ansible guide by the numbers, so if that is what the guide uses then yes, otherwise no.

nix,
@nix@merv.news avatar

Use mailgun free account or something similar. If you don’t your emails will land in spam even if you do get it working on a vps (which many including DigitaOceam dont allow emails due to spam)

ZMonster,
@ZMonster@lemmy.world avatar

Any chance you wouldn’t mind walking me through how to set up Lemmy to do that? Any guide or reference would be appreciated.

nix,
@nix@merv.news avatar

I don’t remember exactly since it was long ago but i believe its: make a mailgun account (make sure you disable the free trial so it doesnt automatically sign you up for the paid service) generate a new mailbox and save the info it gives you and in your config.hjson add your smtp server “smtp.mailgun.org:465”, smtp login: “[email protected]”, smtp password: “randomcharacters”, a from_address like: "Lemmy noreply ", and set the tls type to “tls”

If thats all the steps let me know so I can make a request to have it added to the wiki of lemmyadmin.site

bender,
@bender@insaneutopia.com avatar

Register for the free account on sendgrid.com and use their port 587.

ZMonster,
@ZMonster@lemmy.world avatar

Any chance you wouldn’t mind walking me through how to set up Lemmy to do that? Any guide or reference would be appreciated.

bender,
@bender@insaneutopia.com avatar

There is a script called lemmy easy deploy.

github.com/ubergeek77/Lemmy-Easy-Deploy/…/main

You would setup the free plan for sendgrid.com

Their server setting are an ID, password, servernane and port you would put in the config file.

github.com/ubergeek77/…/config.env.example

ZMonster,
@ZMonster@lemmy.world avatar

The dev for lemmy-easy-deploy has already said that they do not support SMTP now and will not going forward… So I didn’t spend any more time with that.

bender,
@bender@insaneutopia.com avatar

I think what they meant by that statement is its not configured to setup postfix as an email server. When you edit the config file (prior to runnig the docker command to build it) youre setting lemmy up to use an external email service.

ZMonster,
@ZMonster@lemmy.world avatar

Ah, thank you for that clarification. That makes sense now.

Illecors,

Check the logs of your postfix instance

ZMonster,
@ZMonster@lemmy.world avatar

I tried to get that using:


<span style="color:#323232;"> sudo docker compose logs postfix
</span>

and it just responds:


<span style="color:#323232;"> no configuration file provided: not found
</span>

Any ideas?

Illecors,

Since you’re getting logs via docker compose you should either be in the directory that holds docker-compose.yml or specify the full path to the file using -f flag.

ZMonster,
@ZMonster@lemmy.world avatar

Oh shoot, that makes sense. Now I just have to figure out where ansible puts that…

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines