-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
||
|
@@ -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 | ||
|
@@ -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. | ||
|