Skip to main content

An SMTP gateway for Apprise notifications.

Project description

Mailrise logo


An SMTP gateway for Apprise notifications.

Docker pulls Last commit Checks status


Mailrise is an SMTP server that converts the emails it receives into Apprise notifications. The intended use case is as an email relay for a home lab or network. By accepting ordinary email, Mailrise enables Linux servers, Internet of Things devices, surveillance systems, and outdated software to gain access to the full suite of 60+ notification services supported by Apprise, from Matrix to Nextcloud to your desktop or mobile device.

Just as email brought written messages into the 21st century, Mailrise brings email notifications into the year 2021 and beyond. Compared to a conventional SMTP server, it’s more secure, too—no more replicating your Gmail password to each of your Linux boxes!

A Mailrise daemon is configured with a list of Apprise configuration files. Email senders encode the name of the desired configuration file into the recipient address. Mailrise then constructs the resulting Apprise notification(s) using the selected configuration.

A minimalist Mailrise configuration, for example, might contain a single Apprise configuration for Pushover:

      - pover://[...]

And email senders would be able to select this configuration by using the recipient address:

It is also possible to specify one of the four Apprise notification types, which, if the service you selected supports it, will change the color of the icon of the resulting notification:

Email attachments will also pass through to Apprise if the addressed notification service(s) support attachments.

Mailrise is the sucessor to SMTP Translator, a previous project of mine that articulated a similar concept but was designed solely for Pushover.


As a Docker container

An official Docker image is available from Docker Hub. To use it, you must bind mount a configuration file to /etc/mailrise.conf.

From PyPI

You can find Mailrise on PyPI. The minimum Python version is 3.8+.

Once installed, you should write a configuration file and then configure Mailrise to run as a service. Here is the suggested systemd unit file:

Description=Mailrise SMTP notification relay

ExecStart=/usr/local/bin/mailrise /etc/mailrise.conf


From source

This repository is structured like any other Python package. To install it in editable mode for development or debugging purposes, use:

pip install -e .

To build a wheel, use:

tox -e build

If you are using Visual Studio Code, a development container is included with all the Python tooling necessary for working with Mailrise.


The mailrise program accepts a path to a YAML configuration file that encapsulates the daemon’s entire configuration. The root node of this file should be a dictionary. Mailrise accepts the following keys (periods denote sub-dictionaries):






<name> denotes the name of the configuration. It must not contain a period. Senders select this configuration by addressing their emails to <name>

It is also possible to use a full email address, such as, as a name, in which case senders must use the entire address as their recipient address to select this configuration.

The dictionary value is the Apprise YAML configuration itself, exactly as it would be specified in a standalone file for Apprise.

In addition to the Apprise configuration, some Mailrise-exclusive options can be specified under this key. See the mailrise options below.



The template string used to create notification titles. See “Template strings” below.

Defaults to $subject ($from).



The template string used to create notification body texts. See “Template strings” below.

Defaults to $body.



Sets the data type for notification body texts. Must be text, html, or markdown. Apprise uses this information to determine whether or not the upstream notification service can handle the provided content.

If not specified here, the data type is inferred from the body part of the email message. So if you have your body template set to anything but the default value of $body, you might want to set a data type here.


Specifies the network address to listen on.

Defaults to all interfaces.



Specifies the network port to listen on.

Defaults to 8025.



Selects the operating mode for TLS encryption. Must be off, onconnect, starttls, or starttlsrequire.

Defaults to off.



If TLS is enabled, specifies the path to the certificate chain file. This file must be unencrypted and in PEM format.



If TLS is enabled, specifies the path to the key file. This file must be unencrypted and in PEM format.



Specifies the hostname used when responding to the EHLO command.

Defaults to the system FQDN.

Template strings

You can use Python’s template strings to specify custom templates that Mailrise will construct your notifications from. Templates make use of variables that communicate information about the email message. Use dollar signs ($) to insert variables.

The following variables are available for both title and body templates:




The email subject.


The sender’s full address.


The full contents of the email body.


The full email address of the selected Apprise configuration.


The name of the selected Apprise configuration, unless it uses a custom domain, in which case this is equivalent to the “to” variable.


The class of Apprise notification. This is “info”, “success”, “warning”, or “failure”.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mailrise-1.2.1.tar.gz (162.8 kB view hashes)

Uploaded source

Built Distribution

mailrise-1.2.1-py2.py3-none-any.whl (134.9 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page