2023-10-23 08:23:37 +02:00
. \" Man page for NotiMail
2023-10-24 09:49:20 +02:00
.TH MAN 1 "24 October 2023"
2023-10-23 08:23:37 +02:00
.SH NAME
2023-10-24 09:49:20 +02:00
NotiMail \- Monitor email inbox(es) and send notifications upon new email arrivals using various providers.
2023-10-23 08:23:37 +02:00
.SH SYNOPSIS
.B notimail
[\fB -c\fR \fI CONFIG\fR ]
2023-10-24 09:49:20 +02:00
[\fB --check-config\fR ]
[\fB --test-config\fR ]
[\fB --list-folders\fR ]
2023-10-23 08:23:37 +02:00
.SH DESCRIPTION
2023-10-24 09:49:20 +02:00
NotiMail is a script designed to monitor one or more email inboxes using the IMAP IDLE feature. It sends notifications when a new email arrives. The script can connect to multiple email servers and send notifications to different platforms, including NTFY, Pushover, and Gotify.
2023-10-23 08:23:37 +02:00
.P
Key features:
.RS
.IP "*"
Monitors one or more email inboxes using IMAP IDLE.
.IP "*"
2023-10-24 09:49:20 +02:00
Supports monitoring of multiple folders per email account.
.IP "*"
2023-10-23 08:23:37 +02:00
Sends notifications containing the sender and subject of new emails.
.IP "*"
Maintains a SQLite database to ensure that emails are not processed repeatedly.
.IP "*"
Supports multiple notification providers: NTFY, Pushover, and Gotify.
2023-10-24 09:49:20 +02:00
.IP "*"
Provides command-line functionalities to validate, test, and list IMAP folders.
2023-10-23 08:23:37 +02:00
.RE
.SH OPTIONS
.TP
\fB -c\fR , \fB --config\fR \fI CONFIG\fR
Specify the path to the configuration file. Defaults to \fI config.ini\fR .
2023-10-24 09:49:20 +02:00
.TP
\fB --check-config\fR
Check and print the configurations set in the `config.ini` file.
.TP
\fB --test-config\fR
Test if the configurations set in the `config.ini` file are working properly.
.TP
\fB --list-folders\fR
List all the IMAP folders of the configured mailboxes.
2023-10-23 08:23:37 +02:00
.SH CONFIGURATION
Configuration data is read from a file named \fI config.ini\fR . Ensure it's correctly set up before running the script. The configuration file has multiple sections:
.P
.RS
.IP "[GENERAL]:"
.IP LogFileLocation:
Path to the log file.
.IP DataBaseLocation:
Path to the SQLite3 database for storing processed emails.
.IP "[EMAIL:accountX]:"
Defines an email account. Replace \fI accountX\fR with a unique identifier for each email account.
.IP EmailUser:
The email address.
.IP EmailPass:
The password for the email address.
.IP Host:
The email server.
2023-10-24 09:49:20 +02:00
.IP Folders:
A comma-separated list of folders to monitor.
2023-10-23 08:23:37 +02:00
.IP "[NTFY]:"
Configuration for the NTFY notification provider.
.IP UrlX:
The NTFY URL for sending notifications. Replace \fI X\fR with a unique number.
.IP TokenX:
(Optional) Token for sending notifications to protected topics.
.IP "[PUSHOVER]:"
Configuration for the Pushover notification provider.
.IP ApiToken:
Your Pushover API token.
.IP UserKey:
Your Pushover user key.
.IP "[GOTIFY]:"
Configuration for the Gotify notification provider.
.IP Url:
The Gotify URL for sending messages.
.IP Token:
Your Gotify token.
.RE
.SH DEPENDENCIES
Python libraries:
.RS
.IP "*"
imaplib
.IP "*"
email
.IP "*"
requests
.IP "*"
configparser
.IP "*"
time, socket
.IP "*"
sqlite3
.IP "*"
datetime
.IP "*"
signal, sys
.IP "*"
logging
.IP "*"
argparse
.IP "*"
threading
.IP "*"
BytesParser from email.parser
.RE
.SH EXAMPLES
1. Running NotiMail with the default configuration file:
.RS
.IP ""
notimail
.RE
2. Specifying a custom configuration file:
.RS
.IP ""
notimail \- c /path/to/custom_config.ini
.RE
2023-10-24 09:49:20 +02:00
3. Checking the current configuration:
.RS
.IP ""
notimail --check-config
.RE
4. Testing the configuration settings:
.RS
.IP ""
notimail --test-config
.RE
5. Listing IMAP folders of the configured mailboxes:
.RS
.IP ""
notimail --list-folders
.RE
2023-10-23 08:23:37 +02:00
.SH AUTHOR
Stefano Marinelli <stefano@dragas.it>
.SH LICENSE
BSD 3-Clause License. See the source distribution for details.
.SH SEE ALSO
IMAP IDLE, SQLite3, NTFY, Pushover, Gotify.