GithubHelp home page GithubHelp logo

tempmail's Introduction

tempmail

tempmail is a temporary e-mail address provider (including SMTP server and web frontend). Basically your own Mailinator -- only that it's not blocked everywhere.

Components:

  • Small SMTPd (python/Twisted), smtpd.py
  • Web Frontend (python/Flask), app.py

Notable features:

  • no-frills plaintext message display
  • no registration neccessary
  • multi-domain support
  • new mails can be deleted by anyone for 10 minutes
  • decoding MIME-encoded text

You can see a demo installation at http://tm.zakx.de/.

INSTALL

  1. Get a virtualenv running.
  2. Install dependencies: pip install -U -r requirements.txt
  3. Copy settings.py-dist to settings.py and tweak the settings within
  4. Create the database tables by running python modules.py once.
  5. Start the SMTPd: twistd -y smtpd.py --logfile=smtpd.log
  6. Deploy the Flask-powered app.py, see their deployment docs
  7. Forward your port 25/tcp to your chosen SMTPD_PORT, like so: iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25 -j REDIRECT --to-port 2500
  8. Set a MX DNS record for your domain(s)

...and that's it. If you need help, you'll find me on irc.hackint.org. Just /msg zakx.

tempmail's People

Contributors

zakx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tempmail's Issues

Cannot receive mail for same username of different domains

After I sent a mail to my [email protected], and send another mail to [email protected], smtpd raise a sqlobject.dberrors.DuplicateEntryError.

And the traceback:

2016-05-17 15:05:04-0400 [ESMTP,6,<myip>] Receiving message for delivery: from=<host> to=['[email protected]']
2016-05-17 15:05:22-0400 [ESMTP,7,<myip>] Receiving message for delivery: from=<host> to=['[email protected]']
2016-05-17 15:05:23-0400 [ESMTP,7,<myip>] Unhandled Error
        Traceback (most recent call last):
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/python/log.py", line 88, i
n callWithLogger
            return callWithContext({"system": lp}, func, *args, **kw)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/python/log.py", line 73, i
n callWithContext
            return context.call({ILogContext: newCtx}, func, *args, **kw)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/python/context.py", line 1
18, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
            return func(*args,**kw)
        --- <exception caught here> ---
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 614, in _doReadOrWrite
            why = selectable.doRead()
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/internet/tcp.py", line 215, in doRead
            return self._dataReceived(data)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/internet/tcp.py", line 221, in _dataReceived
            rval = self.protocol.dataReceived(data)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/protocols/basic.py", line 464, in dataReceived
            self.lineReceived(line)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/mail/smtp.py", line 566, in lineReceived
            return getattr(self, 'state_' + self.mode)(line)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/twisted/mail/smtp.py", line 793, in dataLineReceived
            m.eomReceived() for m in self.__messages
          File "smtpd.py", line 73, in eomReceived
            user = get_or_create_user(self.user.dest.local, domain)
          File "/opt/tempmail/__init__.py", line 16, in get_or_create_user
            user = models.User(name=name, domain=domain)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/main.py", line 1226, in __init__
            self._create(id, **kw)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/main.py", line 1274, in _create
            self._SO_finishCreate(id)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/main.py", line 1298, in _SO_finishCreate
            id, names, values)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/dbconnection.py", line 468, in queryInsertID
            return self._runWithConnection(self._queryInsertID, soInstance, id, names, values)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/dbconnection.py", line 3
27, in _runWithConnection
            val = meth(conn, *args)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/sqlite/sqliteconnection.py", line 238, in _queryInsertID
            self._executeRetry(conn, c, q)
          File "/opt/tempmail/.venv/lib/python2.7/site-packages/sqlobject/sqlite/sqliteconnection.py", line 208, in _executeRetry
            raise DuplicateEntryError(msg)
        sqlobject.dberrors.DuplicateEntryError: column name is not unique

Any idea?

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.