Cybrkyd's Git Repositories

reminder-bot

Branch: main Last commit: 2026-01-28 09:00:25 +0000 Clone: git clone https://git.cybrkyd.com/repository/reminder-bot

Reminder Bot

This Python script automates the process of sending email reminders based on a schedule defined in a TSV (Tab-Separated Values) file. It relies on the mutt email client to send emails on specific weekdays, dates, or monthly intervals.

Features

Prerequisites

Configuration

1. Data File Setup

The script requires a tab-separated file located at /full/path/to/list.csv. The file structure must include the Subject and Occurrence headers.

Subject Occurrence
REMINDER: Someone's Birthday    01 Dec
REMINDER: Someone's Anniversary 22 May
REMINDER: Pay bills 01 Feb, 01 Apr, 01 Jun, 01 Aug, 01 Oct, 01 Dec
REMINDER: Do something  02 of every month
REMINDER: Check something   Last day of every month
Ping Test   Monday, Tuesday, Friday, Sunday
Weekly Meeting  Wednesday

2. Supported Occurrence Formats

3. Script Variables

Edit the following variables within the script to match the environment:

4. Mutt config

Create ~/.muttrc and set the following, at a minimum:

set from = "from@example.com"
set realname = "bob"
set smtp_url = "smtps://from@example.com@mail.example.com:465/"
set smtp_pass = "real_password"
set ssl_force_tls = yes
# Optional - prevents the logging of sent emails in ~/sent
unset record
set copy = no

Usage

Manual Execution

Make the script executable and run it:

chmod +x rem.py
./rem.py

Automation via Crontab

To automate the checks daily, add an entry to crontab. For example, to run every morning at 08:00:

0 8 * * * /usr/bin/python3 /path/to/rem.py

Troubleshooting

Licence

This project is made available under a GPL3 licence -- see COPYING for the full text.