一个基于异步的库,用于与SpamAssassin的SPAMD服务通信。

aiospamc的Python项目详细描述


https://travis-ci.org/mjcaley/aiospamc.svg?branch=masterhttps://codecov.io/gh/mjcaley/aiospamc/branch/master/graph/badge.svg

说明

基于python异步的库,实现spamassassin使用的spamc/spamd客户端协议。

文档

文档可以在以下位置找到:https://aiospamc.readthedocs.io/

要求

  • python 3.5或更高版本

示例

importasynciofromaiospamcimport*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.
'''loop=asyncio.new_event_loop()client=Client(host='localhost')responses=loop.run_until_complete(asyncio.gather(client.ping(),client.check(GTUBE),client.headers(GTUBE)))print(responses)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java是否可以在数组中打印一行元素?   Java框架   javadom4j:用<any>标记包装所有元素   java JMH,微基准代码的一部分   JavaFX拖放TableCell   Java中的volatile关键字   如何在JAVA中使用ApachePOI删除Excel中的警告?   java Android firebase数据库权限被拒绝,尽管用户已登录   eclipse如何在类文件中控制按钮。java文件?   java Android如何从API(rottentomatoes)JSON获取url/链接   java Proguard和两个使用相同安卓库的项目。广播。ClassNotFoundException   Oracle DomParser的java解析XXE   java组织。冬眠cfg。添加注释类所在的包的配置   有没有办法通过JNI将Java数组传递给C而不复制它?   java从XML文件加载请求代码   java表单布局调用JColorChooser   java如何使用Spring boot在neo4j中保存多边形   获取java中的URL参数并从该URL提取特定文本