aiosmtpd | A reimplementation of the Python stdlib smtpdpy based on asyncio | Email library

 by   aio-libs Python Version: 1.4.6 License: Apache-2.0

kandi X-RAY | aiosmtpd Summary

kandi X-RAY | aiosmtpd Summary

aiosmtpd is a Python library typically used in Messaging, Email applications. aiosmtpd has no bugs, it has build file available, it has a Permissive License and it has high support. However aiosmtpd has 1 vulnerabilities. You can install using 'pip install aiosmtpd' or download it from GitHub, PyPI.

A reimplementation of the Python stdlib smtpd.py based on asyncio.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              aiosmtpd has a highly active ecosystem.
              It has 266 star(s) with 87 fork(s). There are 15 watchers for this library.
              There were 2 major release(s) in the last 12 months.
              There are 47 open issues and 103 have been closed. On average issues are closed in 84 days. There are 10 open pull requests and 0 closed requests.
              OutlinedDot
              It has a negative sentiment in the developer community.
              The latest version of aiosmtpd is 1.4.6

            kandi-Quality Quality

              aiosmtpd has 0 bugs and 74 code smells.

            kandi-Security Security

              aiosmtpd has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              aiosmtpd code analysis shows 1 unresolved vulnerabilities (0 blocker, 1 critical, 0 major, 0 minor).
              There are 8 security hotspots that need review.

            kandi-License License

              aiosmtpd is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              aiosmtpd releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              aiosmtpd saves you 1747 person hours of effort in developing the same functionality from scratch.
              It has 3866 lines of code, 406 functions and 26 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed aiosmtpd and discovered the below as its top functions. This is intended to give you an instant insight into aiosmtpd implemented functionality, and help decide if they suit your requirements.
            • Generate a section tree
            • Return the argument parser action for the given argument parser
            • Import an object
            • Create rst parser
            • Runs pycache cleanup
            • Clean out all cached files
            • Remove work directories
            • Deletes a directory
            • Initialize environment
            • Dump the environment
            • Dispatch gather event
            • Move prof files
            • Parse command line arguments
            • Argument parser
            • Handle data received from the server
            • Resolve the MX domain name
            • Print the python interpreter details
            • Get CLI options
            • Dispatches the remove command
            Get all kandi verified functions for this library.

            aiosmtpd Key Features

            No Key Features are available at this moment for aiosmtpd.

            aiosmtpd Examples and Code Snippets

            No Code Snippets are available at this moment for aiosmtpd.

            Community Discussions

            QUESTION

            Child thread can't update parent thread variable?
            Asked 2021-Feb-17 at 16:15

            I found a very perplexing issue in aiosmtpd/244, sharing my puzzlement here to help me find inspiration on how to troubleshoot.

            Situation
            • Two servers running Red Hat 7.9
            • Works on one, doesn't work on the other
            • Problematic code, simplified:
            ...

            ANSWER

            Answered 2021-Feb-17 at 16:15

            Okay, so apparently I was sent on a wild goose chase.

            The compounding factor is because I have suppressed ALL exceptions in these lines:

            Source https://stackoverflow.com/questions/66221795

            QUESTION

            python aiosmtpd server with basic authentication
            Asked 2021-Feb-16 at 15:42

            Im trying to create an aiosmtpd server to process emails received. It works great without authentication, yet i simply cannot figure out how to setup the authentication. I have gone through the documents and searched for examples on this.

            a sample of how im currently using it:

            ...

            ANSWER

            Answered 2021-Feb-16 at 15:42

            Alright, since you're using version 1.3.0, you can follow the documentation for Authentication.

            A quick way to start is to create an "authenticator function" (can be a method in your handler class, can be standalone) that follows the Authenticator Callback guidelines.

            A simple example:

            Source https://stackoverflow.com/questions/66170956

            QUESTION

            Intermittent "Event loop stopped before Future completed."
            Asked 2020-Oct-15 at 07:46

            I have been tearing my hair out at this issue

            The code in question is part of an Open Source project here: aiosmtpd (my fork of the actual FOSS project, here)

            The file with the problem is this one: main.py

            The piece of code in which the problem happens is on line 139 of main.py

            Here's a snippet:

            ...

            ANSWER

            Answered 2020-Oct-15 at 07:46

            Barring a bug in asyncio, the issue is likely caused by a call to loop.stop() hidden somewhere in the code base. You probably want to remove or disable those, as they are fundamentally incompatible with run_until_complete, as well as with the more modern asyncio.run.

            Source https://stackoverflow.com/questions/64282224

            QUESTION

            Problem connecting to Python mail server from Java Camel application
            Asked 2020-Apr-29 at 23:52

            I have a simple email server implemented using the Python language aiosmtpd package (https://github.com/aio-libs/aiosmtpd). I also have an Apache Camel application with a route that attempts to get mail from the server.

            I have been able to successfully send mail to the server, and it is being saved to a directory. However I'm running into a problem when attempting to get mail from the server. The error message from the Camel application is:

            ...

            ANSWER

            Answered 2020-Apr-29 at 23:52

            aiosmtpd is SMTP server. SMTP protocol is used to send, relay or forward messages, but you cannot use it to receive messages. You would need to combine your mailbox application with some implementation of IMAP or POP3.

            Source https://stackoverflow.com/questions/61505319

            QUESTION

            Basic aiosmtpd SMTP server example
            Asked 2019-Nov-22 at 10:00

            How do I convert the following basic SMTP server that uses smtpd to one that uses aiosmtpd instead?

            ...

            ANSWER

            Answered 2017-May-11 at 02:50

            To translate your CustomSMTPServer into something that uses aiosmtpd, you have to define a handler class with a handle_DATA() method that does the same thing as your process_message() method:

            Source https://stackoverflow.com/questions/43904664

            QUESTION

            aiosmtpd - python smtp server
            Asked 2019-Mar-20 at 00:55

            I'm trying to run my own stmp server on my computer with python and the aiosmtpd library.
            I run the example, everything looks fine but I never receive the email on the other side.
            I don't know if there are logs I can see.
            I'm using visual studio 2015, python 3.5, and windows 8.1

            I saw a similar post but it didn't help.

            important note:
            at the Client code, I also tried without the Date header

            server.py:

            ...

            ANSWER

            Answered 2017-May-18 at 17:53

            In your code, Controller(Sink(), hostname='::0', port=8025) starts an SMTP server that receives messages on port 8025 and throws them away (the Sink() part). That's why the messages don't show up in your inbox -- when you send an email to localhost:8025, it is never actually sent to your inbox.

            aiosmtpd is an SMTP server, meaning it will receive messages sent via SMTP and process them somehow. In your code, the Sink() handler does not process incoming email in any way -- it simply throws incoming messages away.

            If you want to send email over the Internet to bob@hate.com, then you should contact the SMTP server responsible for the hate.com domain instead of the SMTP server you're running using aiosmtpd. For this task you will not need to run an SMTP server, since there's supposedly already an SMTP server on the internet running for hate.com; instead, you will need an SMTP client component, which is provided in the smtplib module in the Python standard library. Sending email with SMTP is not something that aiosmtpd is involved with in any way, and you should look for how to use smtplib instead.

            Further reading: Email § Operation on Wikipedia.

            Source https://stackoverflow.com/questions/44028565

            QUESTION

            How do I properly support STARTTLS with aiosmtpd?
            Asked 2017-Aug-02 at 07:51

            I have the following server taken almost directly from the aiosmtpd docs:

            ...

            ANSWER

            Answered 2017-Aug-01 at 20:51

            I was close. I figured from the fact that I could connect via telnet, but EHLO hostname would disconnect that the server was trying to require a TLS connection ahead of time.

            When I examined swaks --help I found that there was a slightly different option that would probably do what I wanted:

            Source https://stackoverflow.com/questions/45447491

            QUESTION

            Python 3 SMTP aiosmtpd proxy/relay
            Asked 2017-May-11 at 01:23

            I am trying to make an open SMTP relay using the new aiosmtpd library that replaces smtpd. The program below instantiates a Proxy handler that is passed onto the mail controller, which is started afterwards in the background. A message is then created with a standard smtplib client that connects to the relay.

            All is good until the SMTP conversation between the client and the relay ends with the message never leaving the relay. The relay never replies with a 250 OK\r\n and a ctrl+c shows that sendmail is waiting for a reply.

            Any ideas? Is the script missing something?

            Edit: mail.example.com is only an example server. An smtpd DebuggingServer prints nothing upon execution of the script with relay = aiosmtpd.handlers.Proxy("localhost", 1025).

            ...

            ANSWER

            Answered 2017-May-11 at 01:23

            EDIT: The bug has been fixed in aiosmtpd 1.0b1, so an upgrade should resolve the issue.

            In aiosmtpd 1.0a4, an uncaught exception in Proxy.handle_DATA (using data as a str instead of bytes) causes the asyncio task to stop, but the exception is never propagated.

            If you upgrade to 1.0a5 you'll get the exception printed properly: "Error: (TypeError) cannot use a string pattern on a bytes-like object". The problem is that as of 1.0a5, Proxy in aiosmtpd is designed for use in a Controller subclass that sets decode_data=True on the aiosmtpd.smtp.SMTP object, but by default, decode_data=False which causes the error. (In my opinion Proxy should be changed to work with decode_data=False, so I've opened PR #74.)

            Thus, to use Proxy in aiosmtpd 1.0a4 or 1.0a5 you need to copy and use the UTF8Controller subclass from aiosmtpd/tests/test_handlers.py. I've tested the following script with both 1.0a4 and 1.0a5:

            Source https://stackoverflow.com/questions/43278998

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install aiosmtpd

            You can install using 'pip install aiosmtpd' or download it from GitHub, PyPI.
            You can use aiosmtpd like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install aiosmtpd

          • CLONE
          • HTTPS

            https://github.com/aio-libs/aiosmtpd.git

          • CLI

            gh repo clone aio-libs/aiosmtpd

          • sshUrl

            git@github.com:aio-libs/aiosmtpd.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Email Libraries

            PHPMailer

            by PHPMailer

            nodemailer

            by nodemailer

            mjml

            by mjmlio

            Mailspring

            by Foundry376

            postal

            by postalserver

            Try Top Libraries by aio-libs

            aiohttp

            by aio-libsPython

            aioredis-py

            by aio-libsPython

            aioredis

            by aio-libsPython

            aiomysql

            by aio-libsPython

            aiopg

            by aio-libsPython