Coder Social home page Coder Social logo

trendingtechnology / aiospamc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mjcaley/aiospamc

0.0 1.0 0.0 689 KB

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

License: MIT License

Python 100.00%

aiospamc's Introduction

aiospamc

pypi docs license build coverage python

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.6 or higher

Example

import asyncio
import aiospamc


GTUBE = '''Subject: Test spam mail (GTUBE)
Message-ID: <[email protected]>
Date: Wed, 23 Jul 2003 23:30:00 +0200
From: Sender <[email protected]>
To: Recipient <[email protected]>
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'),
    aiospamc.check(GTUBE, host='localhost'),
    aiospamc.headers(GTUBE, host='localhost')

))
print(responses)

aiospamc's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar mjcaley avatar tripleee avatar wevsty avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.