GithubHelp home page GithubHelp logo

mr55p-dev / mock-smtp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from flaviovs/mock-smtp

0.0 0.0 0.0 8 KB

A Mock SMTP server for testing software

License: MIT License

Python 77.89% Makefile 13.57% Dockerfile 8.55%

mock-smtp's Introduction

Mock SMTP

Mock SMTP is a SMTP server that does not deliver message, instead it save the messages to files in your file system.

This is a development tool, used to test email sending from apps.

How to Run via Command Line

# python mock-smtp.py

By default the server will listen on port 25, and bind to 127.0.0.1, plus e-mails will be saved to the current directory. This behaviour can be changed by using the following environment variables, respectively:

  • MOCK_SMTP_ADDRESS
  • MOCK_SMTP_PORT
  • MOCK_SMTP_PATH

Note: Mock SMTP must be run as root for binding to ports below 1024, otherwise you will get a PermissionError exception. When run as root, the daemon will drop privileges, and assume the same identify of the owner/group of current directory or (the one specified in MOCK_SMTP_PATH), after the SMTP socket is open.

How to Run via Docker

$ mkdir emails
$ docker run --rm -p 25:25 -v $(pwd)/emails:/var/lib/mock-smtp -d flaviovs/mock-smtp
$ telnet localhost 25
220 97e09283eb3f Python SMTP proxy version 0.2

Issues?

Visit https://github.com/flaviovs/mock-smtp

mock-smtp's People

Contributors

flaviovs 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.