Last active
November 17, 2020 16:58
-
-
Save simonjcarr/bb25d0cd410bf5d24fe3ea48268f2ed8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const SMTPServer = require("smtp-server").SMTPServer; | |
| const parser = require("mailparser").simpleParser | |
| const server = new SMTPServer({ | |
| onData(stream, session, callback) { | |
| parser(stream, {}, (err, parsed) => { | |
| if (err) | |
| console.log("Error:" , err) | |
| console.log(parsed) | |
| stream.on("end", callback) | |
| }) | |
| }, | |
| disabledCommands: ['AUTH'] | |
| }); | |
| server.listen(25, "192.168.30.100") |
I'm building my own disposable mail service, your guide made my day!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Amazing, I add the
sudoand it works. Now I understand the issue is about lacking root permission. Thanks for your super quick reply.