Skip to main content

An asyncio-based library to communicate with SpamAssassin's SPAMD service.

Project description

https://img.shields.io/azure-devops/build/mjcaley/aiospamc/2/master https://img.shields.io/azure-devops/coverage/mjcaley/aiospamc/2/master https://img.shields.io/readthedocs/aiospamc https://img.shields.io/pypi/v/aiospamc

Description

Python asyncio-based library that implements the SPAMC/SPAMD client protocol used by SpamAssassin.

Documentation

Documentation can be found at: https://aiospamc.readthedocs.io/

Requirements

  • Python 3.5 or higher

Example

import asyncio
import aiospamc


GTUBE = '''Subject: Test spam mail (GTUBE)
Message-ID: <GTUBE1.1010101@example.net>
Date: Wed, 23 Jul 2003 23:30:00 +0200
From: Sender <sender@example.net>
To: Recipient <recipient@example.net>
Precedence: junk
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This is the GTUBE, the
    Generic
    Test for
    Unsolicited
    Bulk
    Email

If your spam filter supports it, the GTUBE provides a test by which you
can verify that the filter is installed correctly and is detecting incoming
spam. You can send yourself a test mail containing the following string of
characters (in upper case and with no white spaces and line breaks):

XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

You should send this test mail from an account outside of your network.
'''.encode('ascii')

loop = asyncio.get_event_loop()
responses = loop.run_until_complete(asyncio.gather(

    aiospamc.ping(host='localhost', loop=loop),
    aiospamc.check(GTUBE, host='localhost', loop=loop),
    aiospamc.headers(GTUBE, host='localhost', loop=loop)

))
print(responses)

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

aiospamc-0.6.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

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

aiospamc-0.6.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file aiospamc-0.6.0.tar.gz.

File metadata

  • Download URL: aiospamc-0.6.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.4 Linux/4.15.0-1060-azure

File hashes

Hashes for aiospamc-0.6.0.tar.gz
Algorithm Hash digest
SHA256 f6735d8cd3f1421f3d31be76abbe3d8d382a07bebed6664c27aa6d200f04df48
MD5 14cf44c2e529f866fe6e1f5759c56b9e
BLAKE2b-256 28e919a0b51eb9ca9c671dd8cfe930cd6c2eda0664a16033adb227c14ccd2d8e

See more details on using hashes here.

File details

Details for the file aiospamc-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: aiospamc-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.4 Linux/4.15.0-1060-azure

File hashes

Hashes for aiospamc-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11d5f1449f1345b898ef558d9832717eedfe44a31684740e9da208ea667f7487
MD5 f280410a19c7b14dc5524dd204d188d3
BLAKE2b-256 63f4f99813440201f742de0626078fcc0608c7a1daaf5415420887dd777dbae6

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