Skip to content

Commit

Permalink
Update doc. Closes #36.
Browse files Browse the repository at this point in the history
  • Loading branch information
Flolagale committed Apr 13, 2015
1 parent 16c98ad commit d2d3aaf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ The webhook payload is a multipart form with a ```mailinMsg``` fields always pre
* ```error: listen EADDRINUSE```: the current port is already used by something. Most likely, you are trying to use port 25 and your machine's [mail transport agent](http://en.wikipedia.org/wiki/Message_transfer_agent) is already running. Stop it with something like ```sudo service exim4 stop``` or ```sudo service postfix stop``` before using Mailin.
* ```error: Unable to compute spam score ECONNREFUSED```: it is likely that spamassassin is not enabled on your machine, check the ```/etc/default/spamassassin``` file.
* ```node: command not found```: most likely, your system does not have node installed or it is installed with a different name. For instance on Debian/Ubuntu, the node interpreter is called nodejs. The quick fix is making a symlink: ```ln -s $(which nodejs) /usr/bin/node``` to make the node command available.
* ```Uncaught SenderError: Mail from command failed - 450 4.1.8 <[email protected]>: Sender address rejected: Domain not found
```
* ```Uncaught SenderError: Mail from command failed - 450 4.1.8 <[email protected]>: Sender address rejected: Domain not found```: The smtpOption `disableDNSValidation` is set to `false` and an email was sent from an invalid domain.

####Embedded inside a node application

Expand All @@ -151,7 +150,10 @@ var mailin = require('mailin');
* logFile: '/some/local/path',
* logLevel: 'warn', // One of silly, info, debug, warn, error
* smtpOptions: { // Set of options directly passed to simplesmtp.createServer(smtpOptions)
* SMTPBanner: 'Hi from a custom Mailin instance'
* SMTPBanner: 'Hi from a custom Mailin instance',
* // By default, the DNS validation of the sender and recipient domains is disabled so.
* // You can enable it as follows:
* disableDNSValidation: false
* }
* };
* Here disable the webhook posting so that you can do what you want with the
Expand Down Expand Up @@ -197,7 +199,9 @@ mailin.on('message', function (connection, data, content) {
* **dataReady** *(connection, callback)* - Client has finished passing e-mail data. `callback` returns the queue id to the client.
* **authorizeUser** *(connection, username, password, callback)* - Emitted if `requireAuthentication` option is set to true. `callback` has two parameters *(err, success)* where `success` is a Boolean and should be true, if user is authenticated successfully.
* **validateSender** *(connection, email, callback)* - Emitted if `validateSender` listener is set up.
* **senderValidationFailed** *(connection, email, callback)* - Emitted if a sender DNS validation failed.
* **validateRecipient** *(connection, email, callback)* - Emitted if `validateRecipients` listener is set up.
* **recipientValidationFailed** *(connection, email, callback)* - Emitted if a recipient DNS validation failed.
* **close** *(connection)* - Emitted when the connection to a client is closed.
* **startMessage** *(connection)* - Connection with the Mailin smtp server is initiated.
* **message** *(connection, data, content)* - Message was received and parsed.
Expand Down

0 comments on commit d2d3aaf

Please sign in to comment.