Giter Site home page Giter Site logo

python-slimta's Introduction


About

The python-slimta project is a Python library offering the building blocks necessary to create a full-featured MTA. Most MTAs must be configured, but an MTA built with python-slimta is coded. An MTA built with python-slimta can incorporate any protocol or policy, custom or built-in. An MTA built with python-slimta can integrate with other Python libraries and take advantage of Python's great community.

The python-slimta project is released under the MIT License. It requires Python 2.7+ or 3.3+.

Build Status PyPI PyPI PyPI

Getting Started

Use a virtualenv to get started developing against python-slimta:

$ cd python-slimta/
$ virtualenv .venv
$ source .venv/bin/activate
(.venv)$ python setup.py develop

To run the suite of unit tests included with slimta:

(.venv)$ pip install -r test/requirements.txt
(.venv)$ nosetests -v

Running the Example

The example in examples/slimta-mail.py provides a fully functional mail server for inbound and outbound email. To avoid needing to run as superuser, the example uses ports 1025, 1465 and 1587 instead.

It needs several things to run:

  • An activated virtualenv as created above in Getting Started.

  • A TLS certificate and key file. The easiest way to generate one:

openssl req -x509 -nodes -subj '/CN=localhost' -newkey rsa:1024 -keyout cert.pem -out cert.pem

Check out the in-line documentation with --help, and then run:

(.venv)$ ./slimta-mail.py

Manually or with a mail client, you should now be able to deliver messages. On port 1025, messages will go to unique files in the current directory. On port 1587, messages will be delivered to others using MX records! To try out a TLS connection:

$ openssl s_client -host localhost -port 1587 -starttls smtp

Contributing

If you want to fix a bug or make a change, follow the fork pull request model. We've had quite a few awesome contributors over the years, and are always open to more.

Special thanks to JocelynDelalande for extensive work bringing Python 3 compatibility to the project!

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.