npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mandrill-inbound-parser

v1.0.7

Published

A simple parser for inbound urlencoded mandrill messages.

Readme

mandrill-inbound-parser

A simple NPM parser for inbound urlencoded mandrill messages.

Basic Usage

const mip = require('mandrill-inbound-parser');
const inboundMsg = mip.parse(mandrill_encoded_string);

console.log(inboundMsg);

Basic Usage w/ Included Sample File

const fs = require('fs');
const mip = require('mandrill-inbound-parser');

//on windows, change slashes if on mac/linux
fs.readFile('node_modules/mandrill-inbound-parser/sample_inbound_encoded_string.txt', function (err, inboundMsg) {
  if (err) throw err;
  console.log(mip.parse(inboundMsg));
});

Sample Output After Parse

[
   {
      "event":"inbound",
      "msg":{
         "dkim":{
            "signed":true,
            "valid":true
         },
         "email":"[email protected]",
         "from_email":"[email protected]",
         "headers":{
            "Content-Type":"multipart\/alternative; boundary=\"_av-7r7zDhHxVEAo2yMWasfuFw\"",
            "Date":"Fri, 10 May 2013 19:28:20 +0000",
            "Dkim-Signature":[
               "v=1; a=rsa-sha1; c=relaxed\/relaxed; s=mandrill; d=mail115.us4.mandrillapp.com; h=From:Sender:Subject:List-Unsubscribe:To:Message-Id:Date:MIME-Version:Content-Type; [email protected]; bh=d60x72jf42gLILD7IiqBL0OBb40=; b=iJd7eBugdIjzqW84UZ2xynlg1SojANJR6xfz0JDD44h78EpbqJiYVcMIfRG7mkrn741Bd5YaMR6p 9j41OA9A5am+8BE1Ng2kLRGwou5hRInn+xXBAQm2NUt5FkoXSpvm4gC4gQSOxPbQcuzlLha9JqxJ 8ZZ89\/20txUrRq9cYxk=",
               "v=1; a=rsa-sha256; c=relaxed\/relaxed; d=c.mandrillapp.com; [email protected]; q=dns\/txt; s=mandrill; t=1368214100; h=From : Sender : Subject : List-Unsubscribe : To : Message-Id : Date : MIME-Version : Content-Type : From : Subject : Date : X-Mandrill-User : List-Unsubscribe; bh=y5Vz+RDcKZmWzRc9s0xUJR6k4APvBNktBqy1EhSWM8o=; b=PLAUIuw8zk8kG5tPkmcnSanElxt6I5lp5t32nSvzVQE7R8u0AmIEjeIDZEt31+Q9PWt+nY sHHRsXUQ9SZpndT9Bk++\/SmyA2ntU\/2AKuqDpPkMZiTqxmGF80Wz4JJgx2aCEB1LeLVmFFwB 5Nr\/LBSlsBlRcjT9QiWw0\/iRvCn74="
            ],
            "Domainkey-Signature":"a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=mail115.us4.mandrillapp.com; b=X6qudHd4oOJvVQZcoAEUCJgB875SwzEO5UKf6NvpfqyCVjdaO79WdDulLlfNVELeuoK2m6alt2yw 5Qhp4TW5NegyFf6Ogr\/Hy0Lt411r\/0lRf0nyaVkqMM\/9g13B6D9CS092v70wshX8+qdyxK8fADw8 kEelbCK2cEl0AGIeAeo=;",
            "From":"<[email protected]>",
            "List-Unsubscribe":"<mailto:unsubscribe-md_999.aaaaaaaa.v1-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@mailin1.us2.mcsv.net?subject=unsub>",
            "Message-Id":"<999.20130510192820.aaaaaaaaaaaaaa.aaaaaaaa@mail115.us4.mandrillapp.com>",
            "Mime-Version":"1.0",
            "Received":[
               "from mail115.us4.mandrillapp.com (mail115.us4.mandrillapp.com [205.201.136.115]) by mail.example.com (Postfix) with ESMTP id AAAAAAAAAAA for <[email protected]>; Fri, 10 May 2013 19:28:21 +0000 (UTC)",
               "from localhost (127.0.0.1) by mail115.us4.mandrillapp.com id hhl55a14i282 for <[email protected]>; Fri, 10 May 2013 19:28:20 +0000 (envelope-from <bounce-md_999.aaaaaaaa.v1-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@mail115.us4.mandrillapp.com>)"
            ],
            "Sender":"<[email protected]>",
            "Subject":"This is an example webhook message",
            "To":"<[email protected]>",
            "X-Report-Abuse":"Please forward a copy of this message, including all headers, to [email protected]"
         },
         "html":"<p>This is an example inbound message.<\/p><img src=\"http:\/\/mandrillapp.com\/track\/open.php?u=999&id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&tags=_all,[email protected]\" height=\"1\" width=\"1\">\n",
         "raw_msg":"Received: from mail115.us4.mandrillapp.com (mail115.us4.mandrillapp.com [205.201.136.115])\n\tby mail.example.com (Postfix) with ESMTP id AAAAAAAAAAA\n\tfor <[email protected]>; Fri, 10 May 2013 19:28:20 +0000 (UTC)\nDKIM-Signature: v=1; a=rsa-sha1; c=relaxed\/relaxed; s=mandrill; d=mail115.us4.mandrillapp.com;\n h=From:Sender:Subject:List-Unsubscribe:To:Message-Id:Date:MIME-Version:Content-Type; [email protected];\n bh=d60x72jf42gLILD7IiqBL0OBb40=;\n b=iJd7eBugdIjzqW84UZ2xynlg1SojANJR6xfz0JDD44h78EpbqJiYVcMIfRG7mkrn741Bd5YaMR6p\n 9j41OA9A5am+8BE1Ng2kLRGwou5hRInn+xXBAQm2NUt5FkoXSpvm4gC4gQSOxPbQcuzlLha9JqxJ\n 8ZZ89\/20txUrRq9cYxk=\nDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=mail115.us4.mandrillapp.com;\n b=X6qudHd4oOJvVQZcoAEUCJgB875SwzEO5UKf6NvpfqyCVjdaO79WdDulLlfNVELeuoK2m6alt2yw\n 5Qhp4TW5NegyFf6Ogr\/Hy0Lt411r\/0lRf0nyaVkqMM\/9g13B6D9CS092v70wshX8+qdyxK8fADw8\n kEelbCK2cEl0AGIeAeo=;\nReceived: from localhost (127.0.0.1) by mail115.us4.mandrillapp.com id hhl55a14i282 for <[email protected]>; Fri, 10 May 2013 19:28:20 +0000 (envelope-from <bounce-md_999.aaaaaaaa.v1-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@mail115.us4.mandrillapp.com>)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed\/relaxed; d=c.mandrillapp.com; \n [email protected]; q=dns\/txt; s=mandrill; t=1368214100; h=From : \n Sender : Subject : List-Unsubscribe : To : Message-Id : Date : \n MIME-Version : Content-Type : From : Subject : Date : X-Mandrill-User : \n List-Unsubscribe; bh=y5Vz+RDcKZmWzRc9s0xUJR6k4APvBNktBqy1EhSWM8o=; \n b=PLAUIuw8zk8kG5tPkmcnSanElxt6I5lp5t32nSvzVQE7R8u0AmIEjeIDZEt31+Q9PWt+nY\n sHHRsXUQ9SZpndT9Bk++\/SmyA2ntU\/2AKuqDpPkMZiTqxmGF80Wz4JJgx2aCEB1LeLVmFFwB\n 5Nr\/LBSlsBlRcjT9QiWw0\/iRvCn74=\nFrom: <[email protected]>\nSender: <[email protected]>\nSubject: This is an example webhook message\nList-Unsubscribe: <mailto:unsubscribe-md_999.aaaaaaaa.v1-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@mailin1.us2.mcsv.net?subject=unsub>\nTo: <[email protected]>\nX-Report-Abuse: Please forward a copy of this message, including all headers, to [email protected]\nX-Mandrill-User: md_999\nMessage-Id: <999.20130510192820.aaaaaaaaaaaaaa.aaaaaaaa@mail115.us4.mandrillapp.com>\nDate: Fri, 10 May 2013 19:28:20 +0000\nMIME-Version: 1.0\nContent-Type: multipart\/alternative; boundary=\"_av-7r7zDhHxVEAo2yMWasfuFw\"\n\n--_av-7r7zDhHxVEAo2yMWasfuFw\nContent-Type: text\/plain; charset=utf-8\nContent-Transfer-Encoding: 7bit\n\nThis is an example inbound message.\n--_av-7r7zDhHxVEAo2yMWasfuFw\nContent-Type: text\/html; charset=utf-8\nContent-Transfer-Encoding: 7bit\n\n<p>This is an example inbound message.<\/p><img src=\"http:\/\/mandrillapp.com\/track\/open.php?u=999&id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&tags=_all,[email protected]\" height=\"1\" width=\"1\">\n--_av-7r7zDhHxVEAo2yMWasfuFw--",
         "sender":null,
         "spam_report":{
            "matched_rules":[
               {
                  "description":"RBL: Sender listed at http:\/\/www.dnswl.org\/, no",
                  "name":"RCVD_IN_DNSWL_NONE",
                  "score":0
               },
               {
                  "description":null,
                  "name":null,
                  "score":0
               },
               {
                  "description":"in iadb.isipp.com]",
                  "name":"listed",
                  "score":0
               },
               {
                  "description":"RBL: Participates in the IADB system",
                  "name":"RCVD_IN_IADB_LISTED",
                  "score":-0.4
               },
               {
                  "description":"RBL: ISIPP IADB lists as vouched-for sender",
                  "name":"RCVD_IN_IADB_VOUCHED",
                  "score":-2.2
               },
               {
                  "description":"RBL: IADB: Sender publishes SPF record",
                  "name":"RCVD_IN_IADB_SPF",
                  "score":0
               },
               {
                  "description":"RBL: IADB: Sender publishes Sender ID record",
                  "name":"RCVD_IN_IADB_SENDERID",
                  "score":0
               },
               {
                  "description":"RBL: IADB: Sender publishes Domain Keys record",
                  "name":"RCVD_IN_IADB_DK",
                  "score":-0.2
               },
               {
                  "description":"RBL: IADB: Sender has reverse DNS record",
                  "name":"RCVD_IN_IADB_RDNS",
                  "score":-0.2
               },
               {
                  "description":"SPF: HELO matches SPF record",
                  "name":"SPF_HELO_PASS",
                  "score":0
               },
               {
                  "description":"BODY: HTML included in message",
                  "name":"HTML_MESSAGE",
                  "score":0
               },
               {
                  "description":"BODY: HTML: images with 0-400 bytes of words",
                  "name":"HTML_IMAGE_ONLY_04",
                  "score":0.3
               },
               {
                  "description":"Message has a DKIM or DK signature, not necessarily valid",
                  "name":"DKIM_SIGNED",
                  "score":0.1
               },
               {
                  "description":"Message has at least one valid DKIM or DK signature",
                  "name":"DKIM_VALID",
                  "score":-0.1
               }
            ],
            "score":-2.6
         },
         "spf":{
            "detail":"sender SPF authorized",
            "result":"pass"
         },
         "subject":"This is an example webhook message",
         "tags":[

         ],
         "template":null,
         "text":"This is an example inbound message.\n",
         "text_flowed":false,
         "to":[
            [
               "[email protected]",
               null
            ]
         ]
      },
      "ts":1368214102
   },
   {
      "event":"inbound",
      "msg":{
         "dkim":{
            "signed":true,
            "valid":true
         },
         "email":"[email protected]",
         "from_email":"[email protected]",
         "headers":{
            "Content-Type":"multipart\/alternative; boundary=\"_av-7r7zDhHxVEAo2yMWasfuFw\"",
            "Date":"Fri, 10 May 2013 19:28:20 +0000",
            "Dkim-Signature":[
               "v=1; a=rsa-sha1; c=relaxed\/relaxed; s=mandrill; d=mail115.us4.mandrillapp.com; h=From:Sender:Subject:List-Unsubscribe:To:Message-Id:Date:MIME-Version:Content-Type; [email protected]; bh=d60x72jf42gLILD7IiqBL0OBb40=; b=iJd7eBugdIjzqW84UZ2xynlg1SojANJR6xfz0JDD44h78EpbqJiYVcMIfRG7mkrn741Bd5YaMR6p 9j41OA9A5am+8BE1Ng2kLRGwou5hRInn+xXBAQm2NUt5FkoXSpvm4gC4gQSOxPbQcuzlLha9JqxJ 8ZZ89\/20txUrRq9cYxk=",
               "v=1; a=rsa-sha256; c=relaxed\/relaxed; d=c.mandrillapp.com; [email protected]; q=dns\/txt; s=mandrill; t=1368214100; h=From : Sender : Subject : List-Unsubscribe : To : Message-Id : Date : MIME-Version : Content-Type : From : Subject : Date : X-Mandrill-User : List-Unsubscribe; bh=y5Vz+RDcKZmWzRc9s0xUJR6k4APvBNktBqy1EhSWM8o=; b=PLAUIuw8zk8kG5tPkmcnSanElxt6I5lp5t32nSvzVQE7R8u0AmIEjeIDZEt31+Q9PWt+nY sHHRsXUQ9SZpndT9Bk++\/SmyA2ntU\/2AKuqDpPkMZiTqxmGF80Wz4JJgx2aCEB1LeLVmFFwB 5Nr\/LBSlsBlRcjT9QiWw0\/iRvCn74="
            ],
            "Domainkey-Signature":"a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=mail115.us4.mandrillapp.com; b=X6qudHd4oOJvVQZcoAEUCJgB875SwzEO5UKf6NvpfqyCVjdaO79WdDulLlfNVELeuoK2m6alt2yw 5Qhp4TW5NegyFf6Ogr\/Hy0Lt411r\/0lRf0nyaVkqMM\/9g13B6D9CS092v70wshX8+qdyxK8fADw8 kEelbCK2cEl0AGIeAeo=;",
            "From":"<[email protected]>",
            "List-Unsubscribe":"<mailto:unsubscribe-md_999.aaaaaaaa.v1-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@mailin1.us2.mcsv.net?subject=unsub>",
            "Message-Id":"<999.20130510192820.aaaaaaaaaaaaaa.aaaaaaaa@mail115.us4.mandrillapp.com>",
            "Mime-Version":"1.0",
            "Received":[
               "from mail115.us4.mandrillapp.com (mail115.us4.mandrillapp.com [205.201.136.115]) by mail.example.com (Postfix) with ESMTP id AAAAAAAAAAA for <[email protected]>; Fri, 10 May 2013 19:28:21 +0000 (UTC)",
               "from localhost (127.0.0.1) by mail115.us4.mandrillapp.com id hhl55a14i282 for <[email protected]>; Fri, 10 May 2013 19:28:20 +0000 (envelope-from <bounce-md_999.aaaaaaaa.v1-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@mail115.us4.mandrillapp.com>)"
            ],
            "Sender":"<[email protected]>",
            "Subject":"This is an example webhook message",
            "To":"<[email protected]>",
            "X-Report-Abuse":"Please forward a copy of this message, including all headers, to [email protected]"
         },
         "html":"<p>This is an example inbound message.<\/p><img src=\"http:\/\/mandrillapp.com\/track\/open.php?u=999&id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&tags=_all,[email protected]\" height=\"1\" width=\"1\">\n",
         "raw_msg":"Received: from mail115.us4.mandrillapp.com (mail115.us4.mandrillapp.com [205.201.136.115])\n\tby mail.example.com (Postfix) with ESMTP id AAAAAAAAAAA\n\tfor <[email protected]>; Fri, 10 May 2013 19:28:20 +0000 (UTC)\nDKIM-Signature: v=1; a=rsa-sha1; c=relaxed\/relaxed; s=mandrill; d=mail115.us4.mandrillapp.com;\n h=From:Sender:Subject:List-Unsubscribe:To:Message-Id:Date:MIME-Version:Content-Type; [email protected];\n bh=d60x72jf42gLILD7IiqBL0OBb40=;\n b=iJd7eBugdIjzqW84UZ2xynlg1SojANJR6xfz0JDD44h78EpbqJiYVcMIfRG7mkrn741Bd5YaMR6p\n 9j41OA9A5am+8BE1Ng2kLRGwou5hRInn+xXBAQm2NUt5FkoXSpvm4gC4gQSOxPbQcuzlLha9JqxJ\n 8ZZ89\/20txUrRq9cYxk=\nDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=mail115.us4.mandrillapp.com;\n b=X6qudHd4oOJvVQZcoAEUCJgB875SwzEO5UKf6NvpfqyCVjdaO79WdDulLlfNVELeuoK2m6alt2yw\n 5Qhp4TW5NegyFf6Ogr\/Hy0Lt411r\/0lRf0nyaVkqMM\/9g13B6D9CS092v70wshX8+qdyxK8fADw8\n kEelbCK2cEl0AGIeAeo=;\nReceived: from localhost (127.0.0.1) by mail115.us4.mandrillapp.com id hhl55a14i282 for <[email protected]>; Fri, 10 May 2013 19:28:20 +0000 (envelope-from <bounce-md_999.aaaaaaaa.v1-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@mail115.us4.mandrillapp.com>)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed\/relaxed; d=c.mandrillapp.com; \n [email protected]; q=dns\/txt; s=mandrill; t=1368214100; h=From : \n Sender : Subject : List-Unsubscribe : To : Message-Id : Date : \n MIME-Version : Content-Type : From : Subject : Date : X-Mandrill-User : \n List-Unsubscribe; bh=y5Vz+RDcKZmWzRc9s0xUJR6k4APvBNktBqy1EhSWM8o=; \n b=PLAUIuw8zk8kG5tPkmcnSanElxt6I5lp5t32nSvzVQE7R8u0AmIEjeIDZEt31+Q9PWt+nY\n sHHRsXUQ9SZpndT9Bk++\/SmyA2ntU\/2AKuqDpPkMZiTqxmGF80Wz4JJgx2aCEB1LeLVmFFwB\n 5Nr\/LBSlsBlRcjT9QiWw0\/iRvCn74=\nFrom: <[email protected]>\nSender: <[email protected]>\nSubject: This is an example webhook message\nList-Unsubscribe: <mailto:unsubscribe-md_999.aaaaaaaa.v1-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@mailin1.us2.mcsv.net?subject=unsub>\nTo: <[email protected]>\nX-Report-Abuse: Please forward a copy of this message, including all headers, to [email protected]\nX-Mandrill-User: md_999\nMessage-Id: <999.20130510192820.aaaaaaaaaaaaaa.aaaaaaaa@mail115.us4.mandrillapp.com>\nDate: Fri, 10 May 2013 19:28:20 +0000\nMIME-Version: 1.0\nContent-Type: multipart\/alternative; boundary=\"_av-7r7zDhHxVEAo2yMWasfuFw\"\n\n--_av-7r7zDhHxVEAo2yMWasfuFw\nContent-Type: text\/plain; charset=utf-8\nContent-Transfer-Encoding: 7bit\n\nThis is an example inbound message.\n--_av-7r7zDhHxVEAo2yMWasfuFw\nContent-Type: text\/html; charset=utf-8\nContent-Transfer-Encoding: 7bit\n\n<p>This is an example inbound message.<\/p><img src=\"http:\/\/mandrillapp.com\/track\/open.php?u=999&id=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&tags=_all,[email protected]\" height=\"1\" width=\"1\">\n--_av-7r7zDhHxVEAo2yMWasfuFw--",
         "sender":null,
         "spam_report":{
            "matched_rules":[
               {
                  "description":"RBL: Sender listed at http:\/\/www.dnswl.org\/, no",
                  "name":"RCVD_IN_DNSWL_NONE",
                  "score":0
               },
               {
                  "description":null,
                  "name":null,
                  "score":0
               },
               {
                  "description":"in iadb.isipp.com]",
                  "name":"listed",
                  "score":0
               },
               {
                  "description":"RBL: Participates in the IADB system",
                  "name":"RCVD_IN_IADB_LISTED",
                  "score":-0.4
               },
               {
                  "description":"RBL: ISIPP IADB lists as vouched-for sender",
                  "name":"RCVD_IN_IADB_VOUCHED",
                  "score":-2.2
               },
               {
                  "description":"RBL: IADB: Sender publishes SPF record",
                  "name":"RCVD_IN_IADB_SPF",
                  "score":0
               },
               {
                  "description":"RBL: IADB: Sender publishes Sender ID record",
                  "name":"RCVD_IN_IADB_SENDERID",
                  "score":0
               },
               {
                  "description":"RBL: IADB: Sender publishes Domain Keys record",
                  "name":"RCVD_IN_IADB_DK",
                  "score":-0.2
               },
               {
                  "description":"RBL: IADB: Sender has reverse DNS record",
                  "name":"RCVD_IN_IADB_RDNS",
                  "score":-0.2
               },
               {
                  "description":"SPF: HELO matches SPF record",
                  "name":"SPF_HELO_PASS",
                  "score":0
               },
               {
                  "description":"BODY: HTML included in message",
                  "name":"HTML_MESSAGE",
                  "score":0
               },
               {
                  "description":"BODY: HTML: images with 0-400 bytes of words",
                  "name":"HTML_IMAGE_ONLY_04",
                  "score":0.3
               },
               {
                  "description":"Message has a DKIM or DK signature, not necessarily valid",
                  "name":"DKIM_SIGNED",
                  "score":0.1
               },
               {
                  "description":"Message has at least one valid DKIM or DK signature",
                  "name":"DKIM_VALID",
                  "score":-0.1
               }
            ],
            "score":-2.6
         },
         "spf":{
            "detail":"sender SPF authorized",
            "result":"pass"
         },
         "subject":"This is an example webhook message",
         "tags":[

         ],
         "template":null,
         "text":"This is an example inbound message.\n",
         "text_flowed":false,
         "to":[
            [
               "[email protected]",
               null
            ]
         ]
      },
      "ts":1368214102
   }
]