I have set up a new Lemmy server with lemmy-ansible. After a few days, I realized emails are not working. It turns out my server provider had the SMTP port blocked. So I have reconfigured emails with an external SMTP server in config.hjson and verified that works by resetting the password. The problem is what to do with those failed emails.

Previously, emails were sent by postfix-relay. When I checked the logs, there were items in the queue, but they were gone after I changed the POSTFIX_* environment variables and restarted the Docker container.

As far as I know, the impact is a few users could not log in because their emails are not verified. What should you do in such a case? I can think of a few potential solutions, but since I’m not familiar with the source code, I can’t judge which one is the best way to go for now.

  1. Find some way to resend failed emails with postfix-relay, and follow the normal path
  2. Ignore failed emails, find some way to re-trigger email verifications, so users can get new emails
  3. Ignore failed emails, connect to the database, and fix relevant data manually
  4. Something else?
  • Yang@mementomori.schoolOP
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    @ptz@dubvee.org Thanks for your detailed answer.

    The analysis and suggestions are all reasonable. I went with your option #1, and it worked well. I appreciate your prompt help.

    One thing I didn’t mention, the registration applications page was empty, but after both admin and non-admin users are verified, I’m able to see and approve the applications.

    I’ve also removed postfix-relay from docker-compose.yml as I think it’s now useless. It could be an optional component in the Ansible playbook.

    • Admiral Patrick@dubvee.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      One thing I didn’t mention, the registration applications page was empty, but after both admin and non-admin users are verified, I’m able to see and approve the applications.

      That’s correct. The applications won’t show up there until the email is verified (if verification is enabled). I guess it’s a deliberate choice by the devs as a spam prevention method.