When the following is true:
- User attempts to create an account
- Instance has “require registration application” enabled
- Instance’s email is not working/unavailable
the application seems to get lost, the user never receives an email (even after email functionality is restored), nor can that email/username be used going forward to re-submit the account creation request.
Additionally, since the user never verifies their email, the instance admin never gets a registration application.
It’s not currently an issue for me, however, would it be possible to delete these ghost users? If you lookup the profile/username in the database, you can view it via the web UI, but the only options appear to be either blocking the user or banning them. It might be good to be able to completely delete the accounts, no?
I got a systemd timer going that executes an SQL query to remove those accounts every 24 hours. Works fine so far.
What’s the sql query you are using? And which table do you remove them from? (Looks to me they show up in multiple tables)
Hey, sorry. Kinda overlooked your comment. This is the query I’m using:
DELETE FROM local_user WHERE email_verified = 'f' AND validator_time < NOW() - INTERVAL '$DELETE_INTERVAL';
- $DELETE_INTERVAL is a variable in the bash script. You could use
1 days
, for example - I’m not 100% sure if validator_time is the account creation date, but it seemed like it when I implemented this
- If you wanted it to be cleaner, you’d also have to delete the record from the “people” table by comparing
loal_user_id
- $DELETE_INTERVAL is a variable in the bash script. You could use
Something like this happened to me on my badbrainstorm.ml account.
Had an established account from September, hundreds of post. I was attempting to set up 2FA and suddenly I get a notice about not being on version .18 Now it doesn’t recognize me as a registered user. Could someone help me with 2FA, account recovery?Because of this, I pretty much force-disabled the 2FA feature on my instance. It’s borked.
I caught this in testing as well today.
That said i removed my test accounts in SQL directly
DELETE FROM local_user WHERE person_id=‘someusernumer’
Where someusernumber is their actual ID.
Used this thread as a resource:https://normalcity.life/post/13018
Awesome, that’s super helpful, thank you!
I guess I’ll also look into an SMTP relay. That could be useful I guess.
In my tshooting today, i dont think it will help. I think the error is hitting in the lemmy app container, and not getting passed to my postfix relay. So even if i say…setup postfix as a dedicated relay (which I have done plenty of), not sure it would help.
I put more here: https://github.com/LemmyNet/lemmy-ansible/issues/105
I was actually testing email, when I stumbled on this. When i tried another account with the same address I got an error that the address already exists. Prompting me to go cleanup my DB and use something else to test email realy (forgotten passwords in my case).
It’s because the postfix docker container is not connected to a docker network that has access to the “lemmy” or “lemmy-ui” container, it’s being connected to the “default” docker network. I submitted a pull request for it here that should fix it.
To make it work in the meantime:
-
cd into the Lemmy install directory and run
docker compose down
-
Edit docker-compose.yml in the same directory, and in the postfix section, put this just below the
postfix:
line:networks: - lemmyinternal - lemmyexternalproxy
-
Run
docker compose up -d
The indentation of that code is very important. Your postfix section should look like this when it’s done:
That should connect the “postfix” container in to a docker network that can communicate with the “lemmy” and “lemmy” UI containers. There’s another bug in the default config that doesn’t assign a hostname to all the containers, but it doesn’t always manifest all the time. You can fix that by making sure each service has a hostname assigned to it, like
hostname: lemmy
,hostname: lemmy-ui
,hostname: postfix
etc in the respective service’s section of theservice:
section of the docker compose file.I get an error that the network ‘lemmyinternal’ doesn’t exist when making this change in docker-compose.yml - anything I’m missing?
Make sure the
networks
section at the top of your docker compose file looks like this:Thanks! Somehow missed that in the original post - that worked but I am now seeing “email_not_sent” when trying to test forgot password, how can I get to the postfix log to see what the issue is?
Make sure the postfix container is connected to the lemmyexternalproxy network.
-