Skip to main content

An app for relaying Eve mails to Discord.

Project description

Mailrelay

An app for relaying Eve mails to Discord.

release python django pipeline codecov license pre-commit Code style: black chat

Contents

Overview

This app can automatically forwards eve mails to Discord channels. This can e.g. be useful to include people in all hands communications, who do not check their eve mails that often, but still can be reached via Discord.

You can choose to just forward corporation or alliance mails only or all mails that a character receives.

This app is an add-on to Member Audit and requires you to have Member Audit installed and running. You can choose to forward mails from any character that is registered on Member Audit.

Installation

Step 1 - Check preconditions

Please make sure you have the following applications installed and running before attempting to install the Mail Relay app:

Step 2 - Install app

Make sure you are in the virtual environment (venv) of your Alliance Auth installation. Then install the newest release from PyPI:

pip install aa-mailrelay

Step 3 - Configure settings

Configure your Auth settings (local.py) as follows:

  • Add 'mailrelay' to INSTALLED_APPS
  • Add below lines to your settings file:
CELERYBEAT_SCHEDULE['mailrelay_forward_new_mails'] = {
    'task': 'mailrelay.tasks.forward_new_mails',
    'schedule': crontab(minute='*/5'),
}
  • Optional: Add additional settings if you want to change any defaults. See Settings for the full list.

Step 4 - Finalize installation

Run migrations & copy static files

python manage.py migrate
python manage.py collectstatic

Restart your supervisor services for Auth

...

Step 5 - Setup mail relays

To setup your first mail relay go to the admin site / Mail Relay / RelayConfig.

Update the known Discord channels by clicking the button: "UPDATE DISCORD CHANNELS".

Click on "ADD RELAY CONFIG" to create your first mail relay configuration.

Settings

Here is a list of available settings for this app. They can be configured by adding them to your AA settings file (local.py).

Note that all settings are optional and the app will use the documented default settings if they are not used.

Name Description Default
DISCORDPROXY_HOST Port used to communicate with Discord Proxy. localhost
DISCORDPROXY_PORT Host used to communicate with Discord Proxy. 50051
MAILRELAY_DISCORDPROXY_TIMEOUT Timeout for sending request to DISCORDPROXY in seconds. 30
MAILRELAY_OLDEST_MAIL_HOURS Oldest mail to be forwarded in hours. Set to 0 to disable. 2
MAILRELAY_RELAY_GRACE_MINUTES Max time in minutes since last successful relay before service is reported as down. 30

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

aa_mailrelay-2.0.0.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aa_mailrelay-2.0.0-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file aa_mailrelay-2.0.0.tar.gz.

File metadata

  • Download URL: aa_mailrelay-2.0.0.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for aa_mailrelay-2.0.0.tar.gz
Algorithm Hash digest
SHA256 0f05fa8687f915b1096b073f9c07ec527e14bd371e11d4cc1fdc62ea10cefd5b
MD5 e322be3584d6e474a85b739e7b652d90
BLAKE2b-256 fab71a8b4dac41aedd678347085549a434279aacfd6ebc861a91f339e519388c

See more details on using hashes here.

File details

Details for the file aa_mailrelay-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: aa_mailrelay-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for aa_mailrelay-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 957c85a2565f4e681d68e5146f409fa26d767d21942d2a2e0c25c2556f0e7141
MD5 4e0a4728f2800b5d311ed02bd293aef4
BLAKE2b-256 f0a942a4396f03d70d99f3557d4011d4471afa40ab39bfa965c78f6de80cb7ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page