Skip to content

Add some restrictions#33

Merged
jrgm merged 2 commits intomasterfrom
add-some-restrictions
Aug 1, 2018
Merged

Add some restrictions#33
jrgm merged 2 commits intomasterfrom
add-some-restrictions

Conversation

@jrgm
Copy link
Copy Markdown
Contributor

@jrgm jrgm commented Aug 1, 2018

r? - @vladikoff, @jbuck

This puts in restrictions:

  1. more than 5 'rcpt to:',
  2. using an email with domain not in {localhost,restmail.com,restmail.net,example.com}

will result in rejection of the request.

If i need to adjust these limits, they can be set via the environment.

@jrgm jrgm requested review from jbuck and vladikoff August 1, 2018 18:29
Comment thread emailserver.js
module.exports = function(cb) {
server.listen(0, function(err) {
var port = process.env.PORT || 0;
server.listen(port, function(err) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it possible to test with a background emailserver (although you also have to disable the startup of the one built in to the test). Useful for local development.

Comment thread tests/index.js
(res.statusCode).should.equal(200);
done();
}).end();
});
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was lazy, and just copy/pasted.

@jrgm
Copy link
Copy Markdown
Contributor Author

jrgm commented Aug 1, 2018

Fixes #28

@jrgm jrgm merged commit 25ee2a8 into master Aug 1, 2018
@jrgm jrgm deleted the add-some-restrictions branch August 1, 2018 22:46
@jrgm jrgm mentioned this pull request Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants