This project is an SMTP server that listens for incoming emails and sends notifications to Pushover. It is written in Python, uses aiosmtpd
for handling incoming emails, and sends notifications using the Pushover API.
- Listens for incoming emails on a configurable SMTP port.
- Extracts the subject and body of the email.
- Sends a Pushover notification with the email subject as the notification title and the email body as the notification message.
- Fully containerized using Docker for easy deployment.
- Python 3.11+
- Docker (optional for containerized deployment)
git clone https://github.com/your-username/smtp-pushover.git
cd smtp-pushover
Make sure you have pip
installed, then run:
pip install -r requirements.txt
Create a .env
file in the project root directory with the following contents:
PUSHOVER_USER_KEY=your_pushover_user_key
PUSHOVER_API_TOKEN=your_pushover_api_token
These environment variables are required for sending notifications via Pushover.
To run the application:
python main.py
The server will start listening on port 1025
by default.
You can use the swaks
tool to send test emails:
swaks --to [email protected] --from [email protected] --server 127.0.0.1:1025 --data "Subject: Test Email
This is the email body."
This will trigger a Pushover notification with the subject and body content.
This project includes a Dockerfile
and docker-compose.yml
file for easy containerized deployment.
To build the Docker image:
docker-compose build
To run the container:
docker-compose up -d
The server will be exposed on port 1025
.
This project is licensed under the MIT License.
If you have suggestions for improvements or find any bugs, feel free to create an issue or submit a pull request!
- Afonso Santos - https://github.com/afonsosantos