Skip to main content

django-dkim

https://travis-ci.org/stinovlas/django-dkim.svg?branch=master https://codecov.io/gh/stinovlas/django-dkim/branch/master/graph/badge.svg https://img.shields.io/pypi/pyversions/django-dkim.svg https://img.shields.io/pypi/djversions/django-dkim.svg

DKIM signing is generally better left to the mailserver. However, there are situations when you are unable to configure the SMTP server you use for sending mail. If you still want to sign your messages with DKIM, you can do it manually, on the application level.

This library provides custom e-mail backends with DKIM signing for Django web framework. Singing itself is provided by dkimpy library.

Settings

In order to use this custom backends, you have to add a few configuration options into your Django settings.

  • EMAIL_BACKEND - dotted path to custom e-mail backend

  • DKIM_SELECTOR - string containing DKIM selector

  • DKIM_DOMAIN - string containing DKIM domain

  • DKIM_PRIVATE_KEY - string containing whole private key (including the header)

Example

EMAIL_BACKEND = 'django_dkim.backends.SMTPEmailBackend'
DKIM_SELECTOR = 'selector'
DKIM_DOMAIN = 'example.com'
DKIM_PRIVATE_KEY = '''-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDQUTvs1Rqjw6Vq2/LRnI7LzycT1gM1G4ZRMdWiLFg7y4TEPwfW
r6RgR04f56L9PxM1B6gW+gTkm30dwxNbU60u7emcqu+mYCzyVBHx9a4uhI3Ts8sy
67zIIeXarmxh+V/jqmAbdRAzRzAvjs0S74di1mwCplxYvVOEsDOj7OIEDQIDAQAB
AoGAR2rSJIuaqnI0j8IAKSSHQBAw0XgZeWeKUOPI3eReC4HmbnE9eriUnf1UJ1P+
aNvq9c8+LUJh0w4LgtySEklJoaK6rqLsdQhriHRiYThctMlzoZiLuVo6MQdACHBj
5LvjQY+PSIkpdoQumQJAwngyG0Zkg+t2u57UINn+p3zBxoECQQDuaF5HBELdbu84
08UsiG+zvuGoKEjtr4EjRZ9hdgkErooO8SXbJT+ALwJ6M6awGvkxQiPYR39kgCcG
VpB744aFAkEA37Bx33DKOpbOju2IaF4nwJ/JBmz54EvFOTl2ImP9iHM2qfZo8ueg
/iOG2vifayt5FvgTN7I7rpo3oQcI1DLR6QJBANskYmyi9Rd3zjsNJfQeYZb2gZRB
m2+n4Gtcpvk+N2HvUgYUEfkTjwAztfJAIhtEYASwSCSY6/ekeLqxvVOzu8UCQQCm
F4eWF1OxiUS6j9kXVcJCnuJPKR+o0doRkX8MLh6U8KeIL/ThV+gMjCiX8r+8fb0d
tvneAzOZg90Gbgi6NznxAkAXQz0rYjnQwRjlCyS/KUG1fek/EfJBlgiDmMtYuUpq
UPPnqkzsGyB9LqzL4aoKg1LDsbVP0hSt97SYhB9TtcgO
-----END RSA PRIVATE KEY-----'''

Metadata

Release files for django-dkim 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-dkim 0.0.1
File Size Uploaded
django-dkim-0.0.1.tar.gz 16.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-dkim 0.0.1
File Interpreter ABI Platform
django_dkim-0.0.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 23.0 kB

Release files / django-dkim-0.0.1.tar.gz

Download URL django-dkim-0.0.1.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
501b28506b0a64cf2ab2c4909086dad46cebea9692bdb633854a6e9cf4f983f1
BLAKE2b-256 checksum
How to use checksums
8ba16b31cc8dd2477e0d5e596d1d9dbaeba55af0b33f5c8ed4af02e74c034e04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_dkim-0.0.1-py2.py3-none-any.whl

Download URL django_dkim-0.0.1-py2.py3-none-any.whl
Size 6.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
5cb9d984ec6a0a1cb1cf4c2cabd5ccab2802db290f7ebba9fb9420297df9b638
BLAKE2b-256 checksum
How to use checksums
3362cc6ed5f37439e50c4e68af7bc23ce9c6d8ca944a04daf94f765fd42af0f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

2 release files

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page