GithubHelp home page GithubHelp logo

joebiellik / pleasenospam Goto Github PK

View Code? Open in Web Editor NEW
85.0 4.0 35.0 850 KB

Node.js temporary email service

Home Page: https://pleasenospam.email

License: MIT License

JavaScript 71.72% HTML 20.83% CSS 7.44%
email temporary-email smtp-server nodejs rethinkdb

pleasenospam's Introduction

please, no spam

License Release Version Dependencies

Simple Node.js temporary email service built with Koa, RethinkDB, Nodemailer, Pug, Bootstrap and Handlebars.js.

The app consists of two parts: a web frontend for viewing stored mail and a SMTP server which accepts messages and saves them in the database.

Use it now at pleasenospam.email

Features

Development

  1. Clone this repo:
git clone https://github.com/JoeBiellik/pleasenospam.git && cd pleasenospam
  1. Install dependencies:
docker-compose run -e NODE_ENV= --rm --no-deps app npm install
  1. Start the mail server:
docker-compose up -d mail
  1. Start the frontend and watch for changes:
docker-compose run -e NODE_ENV= --rm --service-ports app npm run watch

Deployment

  1. Follow the first two development steps.

  2. Configure config/docker.json with any custom setting overrides

  3. Configure docker-compose.yml with Docker options and ports to use

  4. Start the production frontend, database and mail servers:

docker-compose up

pleasenospam's People

Contributors

dependabot[bot] avatar greenkeeper[bot] avatar joebiellik 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  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  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  avatar

pleasenospam's Issues

Some emails don't get processed and presented

I did 2 tests. Neither was displayed on the site. I really like your app and deployed it.
Sadly these issues are deal-breakers for me and I will move on for now, but I've stared your project as I'd love to deploy it again!

  1. Emails with any attachments don't get rendered at all
  2. An email with heavy HTML wasn't received. I used a 'Medium.com Daily digest' email. I don't know if this is helpful or not but here is the original eml file that represents the email I forwarded

Mail server crashes when recieving mail.

Using jtagcat/docker branch

$ telnet domain.tld 25
Trying <redacted>...
Connected to domain.tld.
Escape character is '^]'.
220 domain.tld ESMTP Hi can I have some mail please?
HELO domain.tld
250 domain.tld Nice to meet you, night
MAIL FROM: <[email protected]>
250 Accepted
RCPT TO: <[email protected]>
250 Accepted
DATA
354 End data with <CR><LF>.<CR><LF>
Subject: this is testing

Hello

This is human testing

.
Connection closed by foreign host
pleasenospam-mail-server    |
pleasenospam-mail-server    | > [email protected] mail-server /usr/src/app
pleasenospam-mail-server    | > node mail-server.js
pleasenospam-mail-server    |
pleasenospam-mail-server    | [ 'domain.tld' ]
pleasenospam-mail-server    | Creating a pool connected to pleasenospam-db:28015
pleasenospam-mail-server    | /usr/src/app/mail-server.js:29
pleasenospam-mail-server    |                           email.from = email.from.value;
pleasenospam-mail-server    |                                                   ^
pleasenospam-mail-server    |
pleasenospam-mail-server    | TypeError: Cannot read property 'value' of undefined
pleasenospam-mail-server    |     at originalMsg (/usr/src/app/mail-server.js:29:29)
pleasenospam-mail-server    |     at PassThrough.stream.on (/usr/src/app/mail-server.js:61:5)
pleasenospam-mail-server    |     at PassThrough.emit (events.js:188:13)
pleasenospam-mail-server    |     at endReadableNT (_stream_readable.js:1129:12)
pleasenospam-mail-server    |     at process.internalTickCallback (internal/process/next_tick.js:72:19)
pleasenospam-mail-server    | npm ERR! code ELIFECYCLE
pleasenospam-mail-server    | npm ERR! errno 1
pleasenospam-mail-server    | npm ERR! [email protected] mail-server: `node mail-server.js`
pleasenospam-mail-server    | npm ERR! Exit status 1
pleasenospam-mail-server    | npm ERR!
pleasenospam-mail-server    | npm ERR! Failed at the [email protected] mail-server script.
pleasenospam-mail-server    | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
pleasenospam-mail-server    |
pleasenospam-mail-server    | npm ERR! A complete log of this run can be found in:
pleasenospam-mail-server    | npm ERR!     /root/.npm/_logs/2021-06-28T17_26_05_501Z-debug.log
pleasenospam-mail-server exited with code 1
$ cat /root/.npm/_logs/2021-06-28T17_26_05_501Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'mail-server' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'premail-server', 'mail-server', 'postmail-server' ]
5 info lifecycle [email protected]~premail-server: [email protected]
6 info lifecycle [email protected]~mail-server: [email protected]
7 verbose lifecycle [email protected]~mail-server: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~mail-server: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/src/app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle [email protected]~mail-server: CWD: /usr/src/app
10 silly lifecycle [email protected]~mail-server: Args: [ '-c', 'node mail-server.js' ]
11 silly lifecycle [email protected]~mail-server: Returned: code: 1  signal: null
12 info lifecycle [email protected]~mail-server: Failed to exec mail-server script
13 verbose stack Error: [email protected] mail-server: `node mail-server.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:188:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:188:13)
13 verbose stack     at maybeClose (internal/child_process.js:978:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
14 verbose pkgid [email protected]
15 verbose cwd /usr/src/app
16 verbose Linux 5.4.0-74-generic
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "mail-server"
18 verbose node v11.6.0
19 verbose npm  v6.5.0-next.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] mail-server: `node mail-server.js`
22 error Exit status 1
23 error Failed at the [email protected] mail-server script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

pns.eml is down

> ping pleasenospam.email                                                  
ping: pleasenospam.email: Name or service not known

:/

Is site down?

Is site down? I can't get email. Please help me check. Thanks

Error: Recipient command failed: 550 Invalid email address

Hi! @JoeBiellik

I have some question.

default.json

{
  // App server
  "app": {
    // Listening address
    "host": "0.0.0.0",
    "port": 80,
    // Host options
    "title": "please, no spam",
    "prettyHtml": true,
    "cacheAge": 86400, // Static file cache lifetime
    "keys": [
      "random key here"
    ],
    // Test email options
    "test": {
      "fromAddress": "mailbot",
      "fromName": "Mr Mailbot",
      "subject": "Your test email is here!",
      "message": "Hello World!\n\nNow go try with a real email!"
    },
    // SMTP server for sending test emails
    "smtp": {
      // Contact address
      "host": "localhost",
      "port": 25
    }
  },
  // Mail server
  "mail": {
    // Listening address
    "host": "0.0.0.0",
    "port": 25,
    // SMTP options
    "hostname": "pleasenospam.local",
    "banner": "Hi can I have some mail please?",
    // Accepted recipient address domains
    "domains": [
      "localhost",
      "pleasenospam.local",
      "foodier.site"
    ]
  },
  // RethinkDB server
  "db": {
    // Contact address
    "host": "localhost",
    "port": 28015,
    "database": "pleasenospam"
  }
}

docker.json

{
  "app": {
    "keys": [
      "random key here"
    ],
    "smtp": {
      "host": "mail"
    }
  },
  "mail": {
    "hostname": "foodier.site",
    "domains": [
      "pleasenospam.email",
      "spamlessmail.org",
      "foodier.site"
    ]
  },
  "db": {
    "host": "db"
  }
}

dns setting

dns setting

I get the wrong

Error: Can't send mail - all recipients were rejected: 550 Invalid email address
app_1   |     at SMTPConnection._formatError (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:557:19)
app_1   |     at SMTPConnection._actionRCPT (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:1332:28)
app_1   |     at SMTPConnection.<anonymous> (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:1287:30)
app_1   |     at SMTPConnection._processResponse (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:706:20)
app_1   |     at SMTPConnection._onData (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:509:14)
app_1   |     at Socket.<anonymous> (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:461:47)
app_1   |     at Socket.emit (events.js:314:20)
app_1   |     at addChunk (_stream_readable.js:304:12)
app_1   |     at readableAddChunk (_stream_readable.js:280:9)
app_1   |     at Socket.Readable.push (_stream_readable.js:219:10)
app_1   |     at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
app_1   |   code: 'EENVELOPE',
app_1   |   response: '550 Invalid email address',
app_1   |   responseCode: 550,
app_1   |   command: 'RCPT TO',
app_1   |   rejected: [ '[email protected]' ],
app_1   |   rejectedErrors: [
app_1   |     Error: Recipient command failed: 550 Invalid email address
app_1   |         at SMTPConnection._formatError (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:557:19)
app_1   |         at SMTPConnection._actionRCPT (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:1318:24)
app_1   |         at SMTPConnection.<anonymous> (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:1287:30)
app_1   |         at SMTPConnection._processResponse (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:706:20)
app_1   |         at SMTPConnection._onData (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:509:14)
app_1   |         at Socket.<anonymous> (/app/node_modules/smtp-connection/node_modules/nodemailer/lib/smtp-connection/index.js:461:47)
app_1   |         at Socket.emit (events.js:314:20)
app_1   |         at addChunk (_stream_readable.js:304:12)
app_1   |         at readableAddChunk (_stream_readable.js:280:9)
app_1   |         at Socket.Readable.push (_stream_readable.js:219:10)
app_1   |         at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
app_1   |       code: 'EENVELOPE',
app_1   |       response: '550 Invalid email address',
app_1   |       responseCode: 550,
app_1   |       command: 'RCPT TO',
app_1   |       recipient: '[email protected]'
app_1   |     }
app_1   |   ]
app_1   | }

Sorry, I am silly
Can you tell me where I did wrong ?
Thank you.

Test e-mail is misleading.

It's more like 'test mail server connection'.

Dunno how I would improve this. A small info icon, actually implementing a test system, or something else.

Configuration with Traefik

Hey, looking to deploy this with Traefik, but any ideas how would you forward the incoming mail, when there is an another mail server (with different domains) running on the same server? DNS config?

Server started: http://:::81/

hi,

sudo docker-compose up

app_1 | 20 Apr 18:03:24 - Server started: http://:::81/

I can't access to the port 81.

Am I supposed to do something with "host": "mail" ?

{
  "app": {
    "port": 81,
    "mail": {
      "host": "mail"
    }
  },
  "db": {
    "host": "db"
  },
  "mail": {
    "hostname": "mydomain.com",
    "domains": [
      "mydomain.com"
    ]
  }
}

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.