Giter Site home page Giter Site logo

bran921007 / tempalias Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pilif/tempalias

0.0 2.0 0.0 523 KB

Generate temporary mail aliases for throwaway purposes. This is the full code behind the tempalias.com web service

Home Page: http://tempalias.com/#!/about

License: MIT License

JavaScript 91.34% CSS 8.45% Shell 0.21%

tempalias's Introduction

Introduction

The code you see here is the code that runs behind the site tempalias.com

tempalias.com allows you to create email aliases for any email address of your chosing. These aliases self-destruct after any mount of time or after any amount of messages sent trough.

The project is written in JavaScript intended to be run under node.js.

Requirements

To run the tempalias.com code, you need:

  • a sufficiently current version of node (as of this writing, 0.1.99 was enough)
  • a sufficiently current version of redis (I was running 2.0 rc1) for alias storage
  • a SMTP smarthost that relies messages to any address and doesn't require authentication

Everything else is included in the package.

Running it

After cloning the repository, here's the stuff you need to do:

  1. initialize the git submodules (git submodule update --init)
  2. copy config.ini.template to config.ini and edit to your liking
  3. run node tempalias.js in the project root.
  4. expired aliases and rate limit locks are not deleted by the main application. They can't be reached via email any more, but they remain in the database. There is garbage_collect.js which I recommend you run every 30 minutes or so that removes expired aliases.

tempalias will launch a web server (localhost:8080 by default) and an SMTP proxy (localhost:2525 by default). The website will be both the web frontend (http://locahost:8080/) and a webservice endpoint (http://localhost:8080/aliases). Have a look at public/jslib/app.js to see how the web service works, or use curl and adjust the following command to your liking:

curl --no-keepalive -H "Content-Type: application/json" \
  --data-binary '{"target": "[email protected]","days": 3,"max-usage": 5}'\
  -qsS http://localhost:8080/aliases

Architecture

The frontend code is pure HTML/CSS/JavasScript using Sammy for the interesting part of the logic. You will find that in public/*. The beef of the code lies in the SMTP proxy (lib/tempalias_smtp.js) and in the model class representing an alias (lib/tempalias.js). Static webpages are served by the web server (lib/tempalias_http.js) using node-paperboy which is - as are all other dependencies - located in deps/ as a git submodule.

License

All the main code is licensed under the MIT license (see LICENSE) (lib/uuid.js is dual-licensed under GPL and MIT)

  • node-paperboy is licensed under the MIT license.
  • node-smtp is licensed under the MIT license (and had been heavily modified by me to actually provide a working SMTP daemon)
  • redis-node-client is licensed under the MIT license

This should be enough to get you going. Please have a look at the bugs tab on my github page to get an idea of the currently known issues.

tempalias's People

Contributors

pilif avatar darklajid avatar kitsunde avatar

Watchers

James Cloos avatar Fran Perez 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.