This repository has been archived by the owner. It is now read-only.
This Project is no longer maintained, successor is https://github.com/ip6li/trashmail2
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
external-libs
public
routes
views
.gitignore
.travis.yml
README.md
app.js
config.js
lib.js
logger.js
makeHtml.js
messageHandler.js
package.json
renderDkim.js
renderMessage.js
test.sh
trashmail.js
validation.js

README.md

Trashmail

Build Status

Provides a web gui for a disposable mail system. It is written in JavaScript/NodeJS and uses Express/PUG for templating.

This project replaces old ip6li/Onetime-Mail project, which was originally based on msoftware/Trash-Mail. Old ip6li/Onetime-Mail (PHP based) project is abandoned.

IMPORTANT

File trashmail.json MUST contain line "configRuntime": "trashmail.runtime.json", for reference to runtime config. Please read Github wiki for further information.

Features

  • Direct access to specific mail address by GET request
  • URL encoded as QR code available
  • Responsive design
  • PUG template (formerly Jade)
  • Supports mail attachments (configurable)
  • QRcode for mobile devices
  • If mail server supports DKIM it show DKIM status to user
  • International support.

Status

Beta : Works in a single production environment.

Requirements

  • IMAP based backend, recommended is Dovecot, Sieve is not needed.
  • If you want to receive mails, Postfix is strongly recommended
  • NodeJS 6.3.1 or newer - older may work, but your mileage may vary
  • Nginx (or other web server) as reverse proxy for NodeJS server is strongly recommended

Optional

If you are using NodeJS without full libicu support you may consider to install full-icu. full-icu not found warning will tell you, what to to. If you are using nodejs from your Linux distribution you probably get a version with full libicu support, so you do not have to care about this. If warning does not appear do not install full-icu.

Postfix

add following to main.cf:

smtpd_recipient_restrictions=
    ...
    check_recipient_access pcre:/etc/postfix/recipient_access.pcre,
    permit

/etc/postfix/recipient_access.pcre:

/(.+)/ prepend X-Original-To: $1

This make Trashmail work even if recipient is set in bcc only.

Install

  • git clone somewhere in filesystem as any user with exception of root. Running as root will fuck up your server!
  • npm install
  • customize ~/trashmail.json and ~/views/index.pug

trashmail.json

This file must be located in exactly one of following locations:

  • /etc/trashmail.json
  • /usr/local/etc/trashmail.json
  • ~/trashmail.json
  • <where this application is running>/trashmail.json

See project wiki in Github for description

systemd

Use systemd for start/stop server

Other OS

  • Recommended: Systemd based Linux distribution
  • Should work with FreeBSD, OpenBSD