Hey all I have no idea what I’m doing here trying to set up a Lemmy instance. I’ve made simple servers before but nothing like the setup needed for this especially surrounding email verification.

I’m like 10 tutorials deep and on day 3 of trying to figure out what is going on with Postfix. There are so many words and acronyms being thrown around I don’t even know what I’m looking at anymore let alone knowing what the right questions to ask would be.

Very likely I’m going to nuke my droplet this weekend to make sure I have a fresh start with no half-baked solutions competing with each other. Would someone be willing to set up a time with me this weekend on Discord or something and baby step me through how to get this thing up and running?

  • NeonWoofGenesis@kek.henlo.fi
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    I’ve been scratching my head over the postfix-relay as you have, until I realized my ISP(running the server at home) blocks port 25.

    So I got the SMTP provider approach to work, through Brevo. I’ll detail my steps here. I also tried to setup using gmail but I got an authentication error so I quickly gave up on that.

    Sign up to Brevo

    Register at Brevo with your totally legit existing company name, then choose the free plan. This allows 300 free emails sent/day.

    On the dash page, click in the top right -> “SMTP & API”. Here’s your login information for the lemmy.hjson config. Use the SMTP key value as your smtp_password

    Edit your lemmy.hjson

    lemmy.hjson

    email: {
      # Hostname and port of the smtp server
      smtp_server: "smtp-relay.brevo.com:587"
      # Address to send emails from, eg noreply@your-instance.com
      smtp_from_address: "noreply@example.tld"
      smtp_login: "<brevo login email>"
      smtp_password: "<smtp key>"
      # Whether or not smtp connections should use tls. Can be none, tls, or starttls
      tls_type: "starttls"
    }
    

    With this approach you also don’t need postfix-relay in your docker-compose.

    With this setup, you should be able to get the verification/password reset emails to be sent. However the recipient will receive a phishing warning or perhaps the email won’t even get through, because your DKIM signature doesn’t match your domain.

    DKIM signature

    To get a proper DKIM signature, you also need to edit your DNS records.

    From the Brevo dashboard click the topright menu again -> “Senders & IP”.

    Go to “Senders” and edit the “From email” field to your own domain example.tld

    Then go back and go to “Domains” -> “Add a domain”. Add in your example.tld and probably choose “Other” for provider. In the next page you get records to add to your DNS provider. If you don’t know how this works there’s a tutorial linked on that page.

    Click authenticate, and you should now see green checkmarks if done correctly :).

    Keep in mind you won’t receive emails if someone replies to these, since there’s no IMAP setup.

    Do tell if there’s anything wrong with these instructions, I only wrote it from memory.

    • Ms. ArmoredThirteenOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      This is exactly the kind of one step at a time tutorial I need thank you! I’ll try this soon and let you know how things turn out on my end

    • Ms. ArmoredThirteenOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I think I have this figured out. I’m going to wait until tomorrow when I have a friend online who can double check for me that everything is good, but your comment and other people telling me to use Gmail I think got me to where I need to be. Granted I had to redo my instance and server entirely because I mangled my first one so bad it wouldn’t even load the page… But I think I’ve got it figured out now. Thank you so much for this explanation and example config file