This repo can be used to deactivate users who have been inactive for a fixed duration of time.
Features included are-
- Send email reminders to users that their account is going to be deactivated
- After a pre-defined number of reminders, if the user has still not logged into Domino deactivate the user automatically
Install the Domino Extensions API.
Follow the steps below:
You need to have an SMTP server running. To start one locally inside the job run the command below
python3 -m aiosmtpd -n -l localhost:1025
If using a local SMTP server make sure to configure the following user environment variables
export SMTP_SERVER=localhost
export SMTP_PORT=1025
export SMTP_USER=fake-admin
export SMTP_PASSWORD=""
export [email protected]
If you are using an externallly configured SMTP server, update the environment variables using your own values.
Run the notebook email_sender.ipynb
As an example I have created and used a dataset called - EmailRemindersUserDeactivation
This dataset will contain a file called /domino/datasets/local/{dataset_name}/email_tracker.json
which will track the number of email reminders sent to each user. If a user logs in after a reminder
but before a deactivation, the entry is removed from this file when this process runs again the next time
Setup the call to deactivation.sh
as a Scheduled Job. Open the file and notice the parameters used to execute the job