I am trying to setup my own lemmy server. I used ansible.

I can access my server via my domain just fine. But emails are not working.

First i had my mail and mx records pointing to privateemail via namecheap.

Then i tried using cloudflare email routing and their mx records.

neither worked for me with error connecting.

I thought maybe using dovecot? But self hosting email is new to me

I was hoping to use namecheaps privateemail but wasn’t sure how to get it working.

The email account worked and can send / receive but Lemmy and postfix cannot communicate with it.

Now I have no Mx records as I’m not sure what I should be using I am sure I am missing something obvious but idk what

Any ideas ?

@Wander@yiffit.net
link
fedilink
English
41Y

I use external smtp and have had no problems over several versions.

OP, please share your config.hjson (redacting all sensitive info)

Max-P
link
fedilink
English
21Y

Working perfectly fine here as well. From the backend’s perspective, a relay or an external server shouldn’t be functionally different whatsoever.

Morethanevil
link
fedilink
English
0
edit-2
1Y

Could you help me with the setup of the SMTP via lemmy.hjson?

Mine looks like this:

email: {
    smtp_server: "smtp.domain.de:465"
    smtp_login: "admin@domain.de"
    smtp_password: "secretpass"
    smtp_from_address: "admin@domain.de"
    tls_type: "tls"
  }
Max-P
link
fedilink
English
21Y

That really should work, I would check for potential firewall issues or something.

Mine is basically identical to yours:

email: {
    smtp_server: "mail.h.max-p.me:465"
    smtp_login: "lemmy@max-p.me"
    smtp_password: "REDACTED"
    smtp_from_address: "lemmy@max-p.me"
    tls_type: "tls"
  }

It’s possible your server is slightly misconfigured and actually serve plain traffic on 465 and requires the use of the STARTTLS command.

Can you reach your server with openssl?

openssl s_client -connect smtp.domain.de:465

This should end up with something like that:

    Start Time: 1688422790
    Timeout   : 7200 (sec)
    Verify return code: 0 (ok)
    Extended master secret: no
    Max Early Data: 0
---
read R BLOCK
220 hosting.max-p.me ESMTP Postfix
Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 127 users / day
  • 422 users / week
  • 1.16K users / month
  • 3.85K users / 6 months
  • 1 subscriber
  • 3.68K Posts
  • 74.2K Comments
  • Modlog