evendis / mandrill-rails

Webhook processing and event decoration to make using Mandrill with Rails just that much easier
MIT License
288 stars 36 forks source link

Headers in event_payload object are not hash, but array #39

Open zdraganov opened 8 years ago

zdraganov commented 8 years ago

Version: 1.4.1 File: mandrill-rails-1.4.1/lib/mandrill/web_hook/event_decorator.rb:75 Error: TypeError: no implicit conversion of String into Integer

zdraganov commented 8 years ago

Here is the parsed JSON

    "event" => "inbound",
    "ts"    => 1453135784,
    "msg"   => {
      "raw_msg"     => "Received: from mail44.extendcp.co.uk (unknown [79.170.44.44])\n\tby ip-10-212-6-2 (Postfix) with ESMTPS id CFE1438031C\n\tfor <bounce-md_30162339.569d17a4.v1-6bb1b6b04413440e8bc7e2ba408ac35d@email.happycustomer.io>; Mon, 18 Jan 2016 16:49:43 +0000 (UTC)\nReceived: from mail by mail44.extendcp.com with local (Exim 4.80.1)\n\tid 1aLCzu-00015p-Kx\n\tfor bounce-md_30162339.569d17a4.v1-6bb1b6b04413440e8bc7e2ba408ac35d@email.happycustomer.io; Mon, 18 Jan 2016 16:49:42 +0000\nMessage-ID: <dovecot-1453135782-615999-0@mail44.extendcp.co.uk>\nDate: Mon, 18 Jan 2016 16:49:42 +0000\nFrom: Mail Delivery Subsystem <postmaster@mail44.extendcp.co.uk>\nTo: <bounce-md_30162339.569d17a4.v1-6bb1b6b04413440e8bc7e2ba408ac35d@email.happycustomer.io>\nMIME-Version: 1.0\nContent-Type: multipart/report; report-type=delivery-status;\n\tboundary=\"4201/mail44.extendcp.co.uk\"\nSubject: Rejected: =?utf-8?Q?Hi=20Melanie=20Wingate=20here's=20a=20special=2020%=20off=20from=20...\nAuto-Submitted: auto-replied (rejected)\nPrecedence: bulk\n\nThis is a MIME-encapsulated message\n\n--4201/mail44.extendcp.co.uk\nContent-Type: text/plain; charset=utf-8\nContent-Disposition: inline\nContent-Transfer-Encoding: 8bit\n\nYour message to <mailme@melanieherrera.co.uk> was automatically rejected:\nQuota exceeded (mailbox for user is full)\n--4201/mail44.extendcp.co.uk\nContent-Type: message/delivery-status\n\nReporting-MTA: dns; mail44.extendcp.co.uk\nFinal-Recipient: rfc822; mailme@melanieherrera.co.uk\nAction: failed\nStatus: 5.2.2\n\n--4201/mail44.extendcp.co.uk\nContent-Type: message/rfc822\n\nReturn-path: <bounce-md_30162339.569d17a4.v1-6bb1b6b04413440e8bc7e2ba408ac35d@email.happycustomer.io>\nEnvelope-to: mailme@melanieherrera.co.uk\nDelivery-date: Mon, 18 Jan 2016 16:49:42 +0000\nReceived: from mail179-18.suw41.mandrillapp.com ([198.2.179.18])\n\tby mail44.extendcp.com with esmtps (UNKNOWN:DHE-RSA-AES256-SHA:256)\n\t(Exim 4.80.1)\n\tid 1aLCzt-00012d-TN\n\tfor mailme@melanieherrera.co.uk; Mon, 18 Jan 2016 16:49:42 +0000\nDKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=mandrill; d=email.happycustomer.io;\n h=From:Subject:To:Message-Id:Date:MIME-Version:Content-Type; i=offer@email.happycustomer.io;\n bh=4sPGuaOzB301nGC+BDAnWcGWhEA=;\n b=ZsxsbFgTmdPaPH62DfCgpWzu4yVoZwk9mD26tYcsrmUoD3c1/7XFqu8pvNxnOyeyP+ZQzIxwT6wM\n   LMGAqm3pzNkJpnoOXSgVrKxe66ZSLZqYSY6zqbTh9juRN/n2b9hwKUxFl5TpKcaFBQcztOwECk2z\n   9unFp1IG82p99k6BMDg=\nDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=email.happycustomer.io;\n b=a+JTFgR2KN3Pmlf3QIBFdSGHNP+ftOh135p2GALRaV2wkTJ21MdWrEVdOPOuMNEdHJEWZ5ShjmFZ\n   gnO8tfXZepB8frhGiYCopg5ykow1qdsVoFu0J+pG/qSWr2JhN9EhRG9Bmsk3WPK903vS2+0ctp0i\n   4KLFQI/gyaJy2yvkzeI=;\nReceived: from pmta04.mandrill.prod.suw01.rsglab.com (127.0.0.1) by mail179-18.suw41.mandrillapp.com id hjkbqa22s28r for <mailme@melanieherrera.co.uk>; Mon, 18 Jan 2016 16:49:40 +0000 (envelope-from <bounce-md_30162339.569d17a4.v1-6bb1b6b04413440e8bc7e2ba408ac35d@email.happycustomer.io>)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; \n i=@mandrillapp.com; q=dns/txt; s=mandrill; t=1453135780; h=From : \n Subject : To : Message-Id : Date : MIME-Version : Content-Type : From : \n Subject : Date : X-Mandrill-User : List-Unsubscribe; \n bh=hnzNN6+/mvZ7VwHQ1UZVlLjrAu1++gKJy3MHkcshnkA=; \n b=Uf3Tcwo4xLd1i+wJzVZpWKSpcz9tOSxLng5ayGapAfyDFekRmhBqPJibx1BBlfJ1WqOcdh\n NeyrK5paDOEAXaxkyqt5N4r/O1Z5B7ftDmZLqILMrtmCCyNd0vjrxbOl7meNz+aik4z1iKBN\n lFHUWLQPnxDY6FL84EyZtVuGbFb58=\nFrom: Perry Killington <offer@email.happycustomer.io>\nSubject: =?utf-8?Q?Hi=20Melanie=20Wingate=20here's=20a=20special=2020%=20off=20from=20Dovetails=E2=80=8F?=\nReceived: from [104.209.138.217] by mandrillapp.com id 6bb1b6b04413440e8bc7e2ba408ac35d; Mon, 18 Jan 2016 16:49:40 +0000\nTo: Melanie Wingate <mailme@melanieherrera.co.uk>\nX-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com\nX-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30162339.6bb1b6b04413440e8bc7e2ba408ac35d\nX-Mandrill-User: md_30162339\nMessage-Id: <30162339.20160118164940.569d17a47058f1.17719733@mail179-18.suw41.mandrillapp.com>\nDate: Mon, 18 Jan 2016 16:49:40 +0000\nMIME-Version: 1.0\n\n\n\n--4201/mail44.extendcp.co.uk--",
      "headers"     => [],
      "text"        => "This is a MIME-encapsulated message\n\n--4201/mail44.extendcp.co.uk\nContent-Type: text/plain; charset=utf-8\nContent-Disposition: inline\nContent-Transfer-Encoding: 8bit\n\nYour message to <mailme@melanieherrera.co.uk> was automatically rejected:\nQuota exceeded (mailbox for user is full)\n--4201/mail44.extendcp.co.uk\nContent-Type: message/delivery-status\n\nReporting-MTA: dns; mail44.extendcp.co.uk\nFinal-Recipient: rfc822; mailme@melanieherrera.co.uk\nAction: failed\nStatus: 5.2.2\n\n--4201/mail44.extendcp.co.uk\nContent-Type: message/rfc822\n\nReturn-path: <bounce-md_30162339.569d17a4.v1-6bb1b6b04413440e8bc7e2ba408ac35d@email.happycustomer.io>\nEnvelope-to: mailme@melanieherrera.co.uk\nDelivery-date: Mon, 18 Jan 2016 16:49:42 +0000\nReceived: from mail179-18.suw41.mandrillapp.com ([198.2.179.18])\n\tby mail44.extendcp.com with esmtps (UNKNOWN:DHE-RSA-AES256-SHA:256)\n\t(Exim 4.80.1)\n\tid 1aLCzt-00012d-TN\n\tfor mailme@melanieherrera.co.uk; Mon, 18 Jan 2016 16:49:42 +0000\nDKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; s=mandrill; d=email.happycustomer.io;\n h=From:Subject:To:Message-Id:Date:MIME-Version:Content-Type; i=offer@email.happycustomer.io;\n bh=4sPGuaOzB301nGC+BDAnWcGWhEA=;\n b=ZsxsbFgTmdPaPH62DfCgpWzu4yVoZwk9mD26tYcsrmUoD3c1/7XFqu8pvNxnOyeyP+ZQzIxwT6wM\n   LMGAqm3pzNkJpnoOXSgVrKxe66ZSLZqYSY6zqbTh9juRN/n2b9hwKUxFl5TpKcaFBQcztOwECk2z\n   9unFp1IG82p99k6BMDg=\nDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=email.happycustomer.io;\n b=a+JTFgR2KN3Pmlf3QIBFdSGHNP+ftOh135p2GALRaV2wkTJ21MdWrEVdOPOuMNEdHJEWZ5ShjmFZ\n   gnO8tfXZepB8frhGiYCopg5ykow1qdsVoFu0J+pG/qSWr2JhN9EhRG9Bmsk3WPK903vS2+0ctp0i\n   4KLFQI/gyaJy2yvkzeI=;\nReceived: from pmta04.mandrill.prod.suw01.rsglab.com (127.0.0.1) by mail179-18.suw41.mandrillapp.com id hjkbqa22s28r for <mailme@melanieherrera.co.uk>; Mon, 18 Jan 2016 16:49:40 +0000 (envelope-from <bounce-md_30162339.569d17a4.v1-6bb1b6b04413440e8bc7e2ba408ac35d@email.happycustomer.io>)\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; \n i=@mandrillapp.com; q=dns/txt; s=mandrill; t=1453135780; h=From : \n Subject : To : Message-Id : Date : MIME-Version : Content-Type : From : \n Subject : Date : X-Mandrill-User : List-Unsubscribe; \n bh=hnzNN6+/mvZ7VwHQ1UZVlLjrAu1++gKJy3MHkcshnkA=; \n b=Uf3Tcwo4xLd1i+wJzVZpWKSpcz9tOSxLng5ayGapAfyDFekRmhBqPJibx1BBlfJ1WqOcdh\n NeyrK5paDOEAXaxkyqt5N4r/O1Z5B7ftDmZLqILMrtmCCyNd0vjrxbOl7meNz+aik4z1iKBN\n lFHUWLQPnxDY6FL84EyZtVuGbFb58=\nFrom: Perry Killington <offer@email.happycustomer.io>\nSubject: =?utf-8?Q?Hi=20Melanie=20Wingate=20here's=20a=20special=2020%=20off=20from=20Dovetails=E2=80=8F?=\nReceived: from [104.209.138.217] by mandrillapp.com id 6bb1b6b04413440e8bc7e2ba408ac35d; Mon, 18 Jan 2016 16:49:40 +0000\nTo: Melanie Wingate <mailme@melanieherrera.co.uk>\nX-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com\nX-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30162339.6bb1b6b04413440e8bc7e2ba408ac35d\nX-Mandrill-User: md_30162339\nMessage-Id: <30162339.20160118164940.569d17a47058f1.17719733@mail179-18.suw41.mandrillapp.com>\nDate: Mon, 18 Jan 2016 16:49:40 +0000\nMIME-Version: 1.0\n\n\n\n--4201/mail44.extendcp.co.uk--",
      "subject"     => nil,
      "spf"         => nil,
      "spam_report" => {
        "score"         => 0,
        "matched_rules" => []
      },
      "dkim"        => {
        "signed" => false,
        "valid"  => false
      },
      "email"       => "bounce-md_30162339.569d17a4.v1-6bb1b6b04413440e8bc7e2ba408ac35d@email.happycustomer.io",
      "tags"        => [],
      "sender"      => nil,
      "template"    => nil
    }
  }
tomdracz commented 8 years ago

@zdraganov Have you got the original unparsed JSON file anywhere?

zdraganov commented 8 years ago

Yep. Here is the full Environment for the failed request:

  ...
  "action_dispatch.parameter_filter": "[\"password\"]",
  "action_dispatch.remote_ip": "54.188.183.78",
  "action_dispatch.request.accepts": "[\"*/*\"]",
  "action_dispatch.request.content_type": "application/x-www-form-urlencoded",
  "action_dispatch.request.formats": "[\"*/*\"]",
  "action_dispatch.request.parameters": {
    "action": "create",
    "controller": "inbound",
    "mandrill_events": "[{\"event\":\"inbound\",\"ts\":1453161248,\"msg\":{\"raw_msg\":\"Received: from mail144.extendcp.co.uk (unknown [79.170.40.144])\\n\\tby ip-10-39-136-77 (Postfix) with ESMTPS id E9EEB2C2458\\n\\tfor <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>; Mon, 18 Jan 2016 23:54:07 +0000 (UTC)\\nReceived: from mail by mail144.extendcp.com with local (Exim 4.80.1)\\n\\tid 1aLJcc-0000FA-PX\\n\\tfor bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io; Mon, 18 Jan 2016 23:54:06 +0000\\nMessage-ID: <dovecot-1453161246-780532-0@mail144.extendcp.co.uk>\\nDate: Mon, 18 Jan 2016 23:54:06 +0000\\nFrom: Mail Delivery Subsystem <postmaster@mail144.extendcp.co.uk>\\nTo: <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>\\nMIME-Version: 1.0\\nContent-Type: multipart\\/report; report-type=delivery-status;\\n\\tboundary=\\\"938\\/mail144.extendcp.co.uk\\\"\\nSubject: Rejected: =?utf-8?Q?Hi=20catrin=20w=20here's=20a=20special=2020%=20off=20from=20Dovetai...\\nAuto-Submitted: auto-replied (rejected)\\nPrecedence: bulk\\n\\nThis is a MIME-encapsulated message\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: text\\/plain; charset=utf-8\\nContent-Disposition: inline\\nContent-Transfer-Encoding: 8bit\\n\\nYour message to <catrin@itwilliams.co.uk> was automatically rejected:\\nQuota exceeded (mailbox for user is full)\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/delivery-status\\n\\nReporting-MTA: dns; mail144.extendcp.co.uk\\nFinal-Recipient: rfc822; catrin@itwilliams.co.uk\\nAction: failed\\nStatus: 5.2.2\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/rfc822\\n\\nReturn-path: <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>\\nEnvelope-to: catrin@itwilliams.co.uk\\nDelivery-date: Mon, 18 Jan 2016 23:54:06 +0000\\nReceived: from mail by mail144.extendcp.com with spamvirus-scanned (Exim 4.80.1)\\n\\tid 1aLJcb-0000DQ-6F\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:06 +0000\\nX-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on\\n\\tmail144.extendcp.co.uk\\nX-Spam-Level: \\nX-Spam-Status: No, score=-0.1 required=3.9 tests=DKIM_SIGNED,DKIM_VALID,\\n\\tDKIM_VALID_AU,HTML_MESSAGE,T_REMOTE_IMAGE autolearn=disabled version=3.3.1\\nReceived: from mail136-27.atl41.mandrillapp.com ([198.2.136.27])\\n\\tby mail144.extendcp.com with esmtps (UNKNOWN:DHE-RSA-AES256-SHA:256)\\n\\t(Exim 4.80.1)\\n\\tid 1aLJca-0000CD-TV\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:05 +0000\\nDKIM-Signature: v=1; a=rsa-sha1; c=relaxed\\/relaxed; s=mandrill; d=email.happycustomer.io;\\n h=From:Subject:To:Message-Id:Date:MIME-Version:Content-Type; i=offer@email.happycustomer.io;\\n bh=mRpuCUGUqu0S9vQ84tu0pKKdd58=;\\n b=KAtnOPTabC+X0o17NvpXeu1RHmTzIfhbFSHJXAELNfmfXaqaQL5+qvZd2vgehOQWLOx1Iw4snT7b\\n   4gm4ugeK2Sd7hqv1CNG2p4ABpDOXRHnJg+hBIJCEpCWDDIFjm5t2XcaFZ1Ha7I2x5iTwUMzFQgSx\\n   TLYcH65bDyfmqa4IfFo=\\nDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=email.happycustomer.io;\\n b=nF8QCqBXVwK372yltzxYoPwzMWqfHPMKANHdzLzpH9bNN6ZjEGkAupDrqjdzP3tBz\\/Zii2DsLqo+\\n   hyq7q147yGyizWuM5MyVPf6l4gjrJ33aSqTIdEv92dIgcT1ZKyKyw2XEB815Fvg\\/EJl80D1uc8z0\\n   DUsqOmV0f5kZQBku5RA=;\\nReceived: from pmta04.mandrill.prod.atl01.rsglab.com (127.0.0.1) by mail136-27.atl41.mandrillapp.com id hjltho1sb1k0 for <catrin@itwilliams.co.uk>; Mon, 18 Jan 2016 23:54:03 +0000 (envelope-from <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>)\\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed\\/relaxed; d=mandrillapp.com; \\n i=@mandrillapp.com; q=dns\\/txt; s=mandrill; t=1453161243; h=From : \\n Subject : To : Message-Id : Date : MIME-Version : Content-Type : From : \\n Subject : Date : X-Mandrill-User : List-Unsubscribe; \\n bh=iSIKJizc8zpOdKshlNQmT47wjxN1VMQfGE3VM3OzFJg=; \\n b=pi3dW8xyp0x16CZBrCQR5J\\/zEGCPas+C9lZgKcECNX1nhbqWO1Zecx0r1l1DwJzID0FUKy\\n sAPfTBL1b15\\/lg5wqHpoGn4v6FU9\\/DGsUAOMr+4YqQ5wMn\\/ODG5C6QPV4CBtpdpKAGOYO5fQ\\n 64TD3C9Ecl8HARXNpee2JQEmHpH8M=\\nFrom: Perry Killington <offer@email.happycustomer.io>\\nSubject: =?utf-8?Q?Hi=20catrin=20w=20here's=20a=20special=2020%=20off=20from=20Dovetails=E2=80=8F?=\\nReceived: from [104.209.138.217] by mandrillapp.com id 6909a61779864994b969e16643d07851; Mon, 18 Jan 2016 23:54:03 +0000\\nTo: catrin w <catrin@itwilliams.co.uk>\\nX-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com\\nX-Report-Abuse: You can also report abuse here: http:\\/\\/mandrillapp.com\\/contact\\/abuse?id=30162339.6909a61779864994b969e16643d07851\\nX-Mandrill-User: md_30162339\\nMessage-Id: <30162339.20160118235403.569d7b1b975118.94523056@mail136-27.atl41.mandrillapp.com>\\nDate: Mon, 18 Jan 2016 23:54:03 +0000\\nMIME-Version: 1.0\\n\\n\\n\\n--938\\/mail144.extendcp.co.uk--\",\"headers\":[],\"text\":\"This is a MIME-encapsulated message\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: text\\/plain; charset=utf-8\\nContent-Disposition: inline\\nContent-Transfer-Encoding: 8bit\\n\\nYour message to <catrin@itwilliams.co.uk> was automatically rejected:\\nQuota exceeded (mailbox for user is full)\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/delivery-status\\n\\nReporting-MTA: dns; mail144.extendcp.co.uk\\nFinal-Recipient: rfc822; catrin@itwilliams.co.uk\\nAction: failed\\nStatus: 5.2.2\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/rfc822\\n\\nReturn-path: <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>\\nEnvelope-to: catrin@itwilliams.co.uk\\nDelivery-date: Mon, 18 Jan 2016 23:54:06 +0000\\nReceived: from mail by mail144.extendcp.com with spamvirus-scanned (Exim 4.80.1)\\n\\tid 1aLJcb-0000DQ-6F\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:06 +0000\\nX-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on\\n\\tmail144.extendcp.co.uk\\nX-Spam-Level: \\nX-Spam-Status: No, score=-0.1 required=3.9 tests=DKIM_SIGNED,DKIM_VALID,\\n\\tDKIM_VALID_AU,HTML_MESSAGE,T_REMOTE_IMAGE autolearn=disabled version=3.3.1\\nReceived: from mail136-27.atl41.mandrillapp.com ([198.2.136.27])\\n\\tby mail144.extendcp.com with esmtps (UNKNOWN:DHE-RSA-AES256-SHA:256)\\n\\t(Exim 4.80.1)\\n\\tid 1aLJca-0000CD-TV\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:05 +0000\\nDKIM-Signature: v=1; a=rsa-sha1; c=relaxed\\/relaxed; s=mandrill; d=email.happycustomer.io;\\n h=From:Subject:To:Message-Id:Date:MIME-Version:Content-Type; i=offer@email.happycustomer.io;\\n bh=mRpuCUGUqu0S9vQ84tu0pKKdd58=;\\n b=KAtnOPTabC+X0o17NvpXeu1RHmTzIfhbFSHJXAELNfmfXaqaQL5+qvZd2vgehOQWLOx1Iw4snT7b\\n   4gm4ugeK2Sd7hqv1CNG2p4ABpDOXRHnJg+hBIJCEpCWDDIFjm5t2XcaFZ1Ha7I2x5iTwUMzFQgSx\\n   TLYcH65bDyfmqa4IfFo=\\nDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=email.happycustomer.io;\\n b=nF8QCqBXVwK372yltzxYoPwzMWqfHPMKANHdzLzpH9bNN6ZjEGkAupDrqjdzP3tBz\\/Zii2DsLqo+\\n   hyq7q147yGyizWuM5MyVPf6l4gjrJ33aSqTIdEv92dIgcT1ZKyKyw2XEB815Fvg\\/EJl80D1uc8z0\\n   DUsqOmV0f5kZQBku5RA=;\\nReceived: from pmta04.mandrill.prod.atl01.rsglab.com (127.0.0.1) by mail136-27.atl41.mandrillapp.com id hjltho1sb1k0 for <catrin@itwilliams.co.uk>; Mon, 18 Jan 2016 23:54:03 +0000 (envelope-from <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>)\\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed\\/relaxed; d=mandrillapp.com; \\n i=@mandrillapp.com; q=dns\\/txt; s=mandrill; t=1453161243; h=From : \\n Subject : To : Message-Id : Date : MIME-Version : Content-Type : From : \\n Subject : Date : X-Mandrill-User : List-Unsubscribe; \\n bh=iSIKJizc8zpOdKshlNQmT47wjxN1VMQfGE3VM3OzFJg=; \\n b=pi3dW8xyp0x16CZBrCQR5J\\/zEGCPas+C9lZgKcECNX1nhbqWO1Zecx0r1l1DwJzID0FUKy\\n sAPfTBL1b15\\/lg5wqHpoGn4v6FU9\\/DGsUAOMr+4YqQ5wMn\\/ODG5C6QPV4CBtpdpKAGOYO5fQ\\n 64TD3C9Ecl8HARXNpee2JQEmHpH8M=\\nFrom: Perry Killington <offer@email.happycustomer.io>\\nSubject: =?utf-8?Q?Hi=20catrin=20w=20here's=20a=20special=2020%=20off=20from=20Dovetails=E2=80=8F?=\\nReceived: from [104.209.138.217] by mandrillapp.com id 6909a61779864994b969e16643d07851; Mon, 18 Jan 2016 23:54:03 +0000\\nTo: catrin w <catrin@itwilliams.co.uk>\\nX-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com\\nX-Report-Abuse: You can also report abuse here: http:\\/\\/mandrillapp.com\\/contact\\/abuse?id=30162339.6909a61779864994b969e16643d07851\\nX-Mandrill-User: md_30162339\\nMessage-Id: <30162339.20160118235403.569d7b1b975118.94523056@mail136-27.atl41.mandrillapp.com>\\nDate: Mon, 18 Jan 2016 23:54:03 +0000\\nMIME-Version: 1.0\\n\\n\\n\\n--938\\/mail144.extendcp.co.uk--\",\"subject\":null,\"spf\":null,\"spam_report\":{\"score\":0,\"matched_rules\":[]},\"dkim\":{\"signed\":false,\"valid\":false},\"email\":\"bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io\",\"tags\":[],\"sender\":null,\"template\":null}}]"
  },
  "action_dispatch.request.path_parameters": {
    "action": "create",
    "controller": "inbound"
  },
  "action_dispatch.request.query_parameters": "",
  "action_dispatch.request.request_parameters": {
    "mandrill_events": "[{\"event\":\"inbound\",\"ts\":1453161248,\"msg\":{\"raw_msg\":\"Received: from mail144.extendcp.co.uk (unknown [79.170.40.144])\\n\\tby ip-10-39-136-77 (Postfix) with ESMTPS id E9EEB2C2458\\n\\tfor <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>; Mon, 18 Jan 2016 23:54:07 +0000 (UTC)\\nReceived: from mail by mail144.extendcp.com with local (Exim 4.80.1)\\n\\tid 1aLJcc-0000FA-PX\\n\\tfor bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io; Mon, 18 Jan 2016 23:54:06 +0000\\nMessage-ID: <dovecot-1453161246-780532-0@mail144.extendcp.co.uk>\\nDate: Mon, 18 Jan 2016 23:54:06 +0000\\nFrom: Mail Delivery Subsystem <postmaster@mail144.extendcp.co.uk>\\nTo: <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>\\nMIME-Version: 1.0\\nContent-Type: multipart\\/report; report-type=delivery-status;\\n\\tboundary=\\\"938\\/mail144.extendcp.co.uk\\\"\\nSubject: Rejected: =?utf-8?Q?Hi=20catrin=20w=20here's=20a=20special=2020%=20off=20from=20Dovetai...\\nAuto-Submitted: auto-replied (rejected)\\nPrecedence: bulk\\n\\nThis is a MIME-encapsulated message\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: text\\/plain; charset=utf-8\\nContent-Disposition: inline\\nContent-Transfer-Encoding: 8bit\\n\\nYour message to <catrin@itwilliams.co.uk> was automatically rejected:\\nQuota exceeded (mailbox for user is full)\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/delivery-status\\n\\nReporting-MTA: dns; mail144.extendcp.co.uk\\nFinal-Recipient: rfc822; catrin@itwilliams.co.uk\\nAction: failed\\nStatus: 5.2.2\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/rfc822\\n\\nReturn-path: <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>\\nEnvelope-to: catrin@itwilliams.co.uk\\nDelivery-date: Mon, 18 Jan 2016 23:54:06 +0000\\nReceived: from mail by mail144.extendcp.com with spamvirus-scanned (Exim 4.80.1)\\n\\tid 1aLJcb-0000DQ-6F\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:06 +0000\\nX-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on\\n\\tmail144.extendcp.co.uk\\nX-Spam-Level: \\nX-Spam-Status: No, score=-0.1 required=3.9 tests=DKIM_SIGNED,DKIM_VALID,\\n\\tDKIM_VALID_AU,HTML_MESSAGE,T_REMOTE_IMAGE autolearn=disabled version=3.3.1\\nReceived: from mail136-27.atl41.mandrillapp.com ([198.2.136.27])\\n\\tby mail144.extendcp.com with esmtps (UNKNOWN:DHE-RSA-AES256-SHA:256)\\n\\t(Exim 4.80.1)\\n\\tid 1aLJca-0000CD-TV\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:05 +0000\\nDKIM-Signature: v=1; a=rsa-sha1; c=relaxed\\/relaxed; s=mandrill; d=email.happycustomer.io;\\n h=From:Subject:To:Message-Id:Date:MIME-Version:Content-Type; i=offer@email.happycustomer.io;\\n bh=mRpuCUGUqu0S9vQ84tu0pKKdd58=;\\n b=KAtnOPTabC+X0o17NvpXeu1RHmTzIfhbFSHJXAELNfmfXaqaQL5+qvZd2vgehOQWLOx1Iw4snT7b\\n   4gm4ugeK2Sd7hqv1CNG2p4ABpDOXRHnJg+hBIJCEpCWDDIFjm5t2XcaFZ1Ha7I2x5iTwUMzFQgSx\\n   TLYcH65bDyfmqa4IfFo=\\nDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=email.happycustomer.io;\\n b=nF8QCqBXVwK372yltzxYoPwzMWqfHPMKANHdzLzpH9bNN6ZjEGkAupDrqjdzP3tBz\\/Zii2DsLqo+\\n   hyq7q147yGyizWuM5MyVPf6l4gjrJ33aSqTIdEv92dIgcT1ZKyKyw2XEB815Fvg\\/EJl80D1uc8z0\\n   DUsqOmV0f5kZQBku5RA=;\\nReceived: from pmta04.mandrill.prod.atl01.rsglab.com (127.0.0.1) by mail136-27.atl41.mandrillapp.com id hjltho1sb1k0 for <catrin@itwilliams.co.uk>; Mon, 18 Jan 2016 23:54:03 +0000 (envelope-from <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>)\\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed\\/relaxed; d=mandrillapp.com; \\n i=@mandrillapp.com; q=dns\\/txt; s=mandrill; t=1453161243; h=From : \\n Subject : To : Message-Id : Date : MIME-Version : Content-Type : From : \\n Subject : Date : X-Mandrill-User : List-Unsubscribe; \\n bh=iSIKJizc8zpOdKshlNQmT47wjxN1VMQfGE3VM3OzFJg=; \\n b=pi3dW8xyp0x16CZBrCQR5J\\/zEGCPas+C9lZgKcECNX1nhbqWO1Zecx0r1l1DwJzID0FUKy\\n sAPfTBL1b15\\/lg5wqHpoGn4v6FU9\\/DGsUAOMr+4YqQ5wMn\\/ODG5C6QPV4CBtpdpKAGOYO5fQ\\n 64TD3C9Ecl8HARXNpee2JQEmHpH8M=\\nFrom: Perry Killington <offer@email.happycustomer.io>\\nSubject: =?utf-8?Q?Hi=20catrin=20w=20here's=20a=20special=2020%=20off=20from=20Dovetails=E2=80=8F?=\\nReceived: from [104.209.138.217] by mandrillapp.com id 6909a61779864994b969e16643d07851; Mon, 18 Jan 2016 23:54:03 +0000\\nTo: catrin w <catrin@itwilliams.co.uk>\\nX-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com\\nX-Report-Abuse: You can also report abuse here: http:\\/\\/mandrillapp.com\\/contact\\/abuse?id=30162339.6909a61779864994b969e16643d07851\\nX-Mandrill-User: md_30162339\\nMessage-Id: <30162339.20160118235403.569d7b1b975118.94523056@mail136-27.atl41.mandrillapp.com>\\nDate: Mon, 18 Jan 2016 23:54:03 +0000\\nMIME-Version: 1.0\\n\\n\\n\\n--938\\/mail144.extendcp.co.uk--\",\"headers\":[],\"text\":\"This is a MIME-encapsulated message\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: text\\/plain; charset=utf-8\\nContent-Disposition: inline\\nContent-Transfer-Encoding: 8bit\\n\\nYour message to <catrin@itwilliams.co.uk> was automatically rejected:\\nQuota exceeded (mailbox for user is full)\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/delivery-status\\n\\nReporting-MTA: dns; mail144.extendcp.co.uk\\nFinal-Recipient: rfc822; catrin@itwilliams.co.uk\\nAction: failed\\nStatus: 5.2.2\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/rfc822\\n\\nReturn-path: <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>\\nEnvelope-to: catrin@itwilliams.co.uk\\nDelivery-date: Mon, 18 Jan 2016 23:54:06 +0000\\nReceived: from mail by mail144.extendcp.com with spamvirus-scanned (Exim 4.80.1)\\n\\tid 1aLJcb-0000DQ-6F\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:06 +0000\\nX-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on\\n\\tmail144.extendcp.co.uk\\nX-Spam-Level: \\nX-Spam-Status: No, score=-0.1 required=3.9 tests=DKIM_SIGNED,DKIM_VALID,\\n\\tDKIM_VALID_AU,HTML_MESSAGE,T_REMOTE_IMAGE autolearn=disabled version=3.3.1\\nReceived: from mail136-27.atl41.mandrillapp.com ([198.2.136.27])\\n\\tby mail144.extendcp.com with esmtps (UNKNOWN:DHE-RSA-AES256-SHA:256)\\n\\t(Exim 4.80.1)\\n\\tid 1aLJca-0000CD-TV\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:05 +0000\\nDKIM-Signature: v=1; a=rsa-sha1; c=relaxed\\/relaxed; s=mandrill; d=email.happycustomer.io;\\n h=From:Subject:To:Message-Id:Date:MIME-Version:Content-Type; i=offer@email.happycustomer.io;\\n bh=mRpuCUGUqu0S9vQ84tu0pKKdd58=;\\n b=KAtnOPTabC+X0o17NvpXeu1RHmTzIfhbFSHJXAELNfmfXaqaQL5+qvZd2vgehOQWLOx1Iw4snT7b\\n   4gm4ugeK2Sd7hqv1CNG2p4ABpDOXRHnJg+hBIJCEpCWDDIFjm5t2XcaFZ1Ha7I2x5iTwUMzFQgSx\\n   TLYcH65bDyfmqa4IfFo=\\nDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=email.happycustomer.io;\\n b=nF8QCqBXVwK372yltzxYoPwzMWqfHPMKANHdzLzpH9bNN6ZjEGkAupDrqjdzP3tBz\\/Zii2DsLqo+\\n   hyq7q147yGyizWuM5MyVPf6l4gjrJ33aSqTIdEv92dIgcT1ZKyKyw2XEB815Fvg\\/EJl80D1uc8z0\\n   DUsqOmV0f5kZQBku5RA=;\\nReceived: from pmta04.mandrill.prod.atl01.rsglab.com (127.0.0.1) by mail136-27.atl41.mandrillapp.com id hjltho1sb1k0 for <catrin@itwilliams.co.uk>; Mon, 18 Jan 2016 23:54:03 +0000 (envelope-from <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>)\\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed\\/relaxed; d=mandrillapp.com; \\n i=@mandrillapp.com; q=dns\\/txt; s=mandrill; t=1453161243; h=From : \\n Subject : To : Message-Id : Date : MIME-Version : Content-Type : From : \\n Subject : Date : X-Mandrill-User : List-Unsubscribe; \\n bh=iSIKJizc8zpOdKshlNQmT47wjxN1VMQfGE3VM3OzFJg=; \\n b=pi3dW8xyp0x16CZBrCQR5J\\/zEGCPas+C9lZgKcECNX1nhbqWO1Zecx0r1l1DwJzID0FUKy\\n sAPfTBL1b15\\/lg5wqHpoGn4v6FU9\\/DGsUAOMr+4YqQ5wMn\\/ODG5C6QPV4CBtpdpKAGOYO5fQ\\n 64TD3C9Ecl8HARXNpee2JQEmHpH8M=\\nFrom: Perry Killington <offer@email.happycustomer.io>\\nSubject: =?utf-8?Q?Hi=20catrin=20w=20here's=20a=20special=2020%=20off=20from=20Dovetails=E2=80=8F?=\\nReceived: from [104.209.138.217] by mandrillapp.com id 6909a61779864994b969e16643d07851; Mon, 18 Jan 2016 23:54:03 +0000\\nTo: catrin w <catrin@itwilliams.co.uk>\\nX-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com\\nX-Report-Abuse: You can also report abuse here: http:\\/\\/mandrillapp.com\\/contact\\/abuse?id=30162339.6909a61779864994b969e16643d07851\\nX-Mandrill-User: md_30162339\\nMessage-Id: <30162339.20160118235403.569d7b1b975118.94523056@mail136-27.atl41.mandrillapp.com>\\nDate: Mon, 18 Jan 2016 23:54:03 +0000\\nMIME-Version: 1.0\\n\\n\\n\\n--938\\/mail144.extendcp.co.uk--\",\"subject\":null,\"spf\":null,\"spam_report\":{\"score\":0,\"matched_rules\":[]},\"dkim\":{\"signed\":false,\"valid\":false},\"email\":\"bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io\",\"tags\":[],\"sender\":null,\"template\":null}}]"
  },
  "action_dispatch.request_id": "c35f0e94afa7fae608130272ffb86637",
  "action_dispatch.show_detailed_exceptions": "false",
  "action_dispatch.show_exceptions": "true",
  "newrelic.transaction_started": "true",
  "rack-cache.allow_reload": "false",
  "rack-cache.allow_revalidate": "false",
  "rack-cache.cache_key": "Rack::Cache::Key",
  "rack-cache.default_ttl": "0",
  "rack-cache.entitystore": "rails:/",
  "rack-cache.ignore_headers": "[\"Set-Cookie\"]",
  "rack-cache.metastore": "rails:/",
  "rack-cache.private_headers": "[\"Authorization\", \"Cookie\"]",
  "rack-cache.use_native_ttl": "false",
  "rack-cache.verbose": "false",
  "rack.hijack": "#<Proc:0x000000096ec6a8@/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:81 (lambda)>",
  "rack.hijack?": "true",
  "rack.multiprocess": "true",
  "rack.multithread": "false",
  "rack.request.form_hash": {
    "mandrill_events": "[{\"event\":\"inbound\",\"ts\":1453161248,\"msg\":{\"raw_msg\":\"Received: from mail144.extendcp.co.uk (unknown [79.170.40.144])\\n\\tby ip-10-39-136-77 (Postfix) with ESMTPS id E9EEB2C2458\\n\\tfor <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>; Mon, 18 Jan 2016 23:54:07 +0000 (UTC)\\nReceived: from mail by mail144.extendcp.com with local (Exim 4.80.1)\\n\\tid 1aLJcc-0000FA-PX\\n\\tfor bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io; Mon, 18 Jan 2016 23:54:06 +0000\\nMessage-ID: <dovecot-1453161246-780532-0@mail144.extendcp.co.uk>\\nDate: Mon, 18 Jan 2016 23:54:06 +0000\\nFrom: Mail Delivery Subsystem <postmaster@mail144.extendcp.co.uk>\\nTo: <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>\\nMIME-Version: 1.0\\nContent-Type: multipart\\/report; report-type=delivery-status;\\n\\tboundary=\\\"938\\/mail144.extendcp.co.uk\\\"\\nSubject: Rejected: =?utf-8?Q?Hi=20catrin=20w=20here's=20a=20special=2020%=20off=20from=20Dovetai...\\nAuto-Submitted: auto-replied (rejected)\\nPrecedence: bulk\\n\\nThis is a MIME-encapsulated message\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: text\\/plain; charset=utf-8\\nContent-Disposition: inline\\nContent-Transfer-Encoding: 8bit\\n\\nYour message to <catrin@itwilliams.co.uk> was automatically rejected:\\nQuota exceeded (mailbox for user is full)\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/delivery-status\\n\\nReporting-MTA: dns; mail144.extendcp.co.uk\\nFinal-Recipient: rfc822; catrin@itwilliams.co.uk\\nAction: failed\\nStatus: 5.2.2\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/rfc822\\n\\nReturn-path: <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>\\nEnvelope-to: catrin@itwilliams.co.uk\\nDelivery-date: Mon, 18 Jan 2016 23:54:06 +0000\\nReceived: from mail by mail144.extendcp.com with spamvirus-scanned (Exim 4.80.1)\\n\\tid 1aLJcb-0000DQ-6F\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:06 +0000\\nX-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on\\n\\tmail144.extendcp.co.uk\\nX-Spam-Level: \\nX-Spam-Status: No, score=-0.1 required=3.9 tests=DKIM_SIGNED,DKIM_VALID,\\n\\tDKIM_VALID_AU,HTML_MESSAGE,T_REMOTE_IMAGE autolearn=disabled version=3.3.1\\nReceived: from mail136-27.atl41.mandrillapp.com ([198.2.136.27])\\n\\tby mail144.extendcp.com with esmtps (UNKNOWN:DHE-RSA-AES256-SHA:256)\\n\\t(Exim 4.80.1)\\n\\tid 1aLJca-0000CD-TV\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:05 +0000\\nDKIM-Signature: v=1; a=rsa-sha1; c=relaxed\\/relaxed; s=mandrill; d=email.happycustomer.io;\\n h=From:Subject:To:Message-Id:Date:MIME-Version:Content-Type; i=offer@email.happycustomer.io;\\n bh=mRpuCUGUqu0S9vQ84tu0pKKdd58=;\\n b=KAtnOPTabC+X0o17NvpXeu1RHmTzIfhbFSHJXAELNfmfXaqaQL5+qvZd2vgehOQWLOx1Iw4snT7b\\n   4gm4ugeK2Sd7hqv1CNG2p4ABpDOXRHnJg+hBIJCEpCWDDIFjm5t2XcaFZ1Ha7I2x5iTwUMzFQgSx\\n   TLYcH65bDyfmqa4IfFo=\\nDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=email.happycustomer.io;\\n b=nF8QCqBXVwK372yltzxYoPwzMWqfHPMKANHdzLzpH9bNN6ZjEGkAupDrqjdzP3tBz\\/Zii2DsLqo+\\n   hyq7q147yGyizWuM5MyVPf6l4gjrJ33aSqTIdEv92dIgcT1ZKyKyw2XEB815Fvg\\/EJl80D1uc8z0\\n   DUsqOmV0f5kZQBku5RA=;\\nReceived: from pmta04.mandrill.prod.atl01.rsglab.com (127.0.0.1) by mail136-27.atl41.mandrillapp.com id hjltho1sb1k0 for <catrin@itwilliams.co.uk>; Mon, 18 Jan 2016 23:54:03 +0000 (envelope-from <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>)\\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed\\/relaxed; d=mandrillapp.com; \\n i=@mandrillapp.com; q=dns\\/txt; s=mandrill; t=1453161243; h=From : \\n Subject : To : Message-Id : Date : MIME-Version : Content-Type : From : \\n Subject : Date : X-Mandrill-User : List-Unsubscribe; \\n bh=iSIKJizc8zpOdKshlNQmT47wjxN1VMQfGE3VM3OzFJg=; \\n b=pi3dW8xyp0x16CZBrCQR5J\\/zEGCPas+C9lZgKcECNX1nhbqWO1Zecx0r1l1DwJzID0FUKy\\n sAPfTBL1b15\\/lg5wqHpoGn4v6FU9\\/DGsUAOMr+4YqQ5wMn\\/ODG5C6QPV4CBtpdpKAGOYO5fQ\\n 64TD3C9Ecl8HARXNpee2JQEmHpH8M=\\nFrom: Perry Killington <offer@email.happycustomer.io>\\nSubject: =?utf-8?Q?Hi=20catrin=20w=20here's=20a=20special=2020%=20off=20from=20Dovetails=E2=80=8F?=\\nReceived: from [104.209.138.217] by mandrillapp.com id 6909a61779864994b969e16643d07851; Mon, 18 Jan 2016 23:54:03 +0000\\nTo: catrin w <catrin@itwilliams.co.uk>\\nX-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com\\nX-Report-Abuse: You can also report abuse here: http:\\/\\/mandrillapp.com\\/contact\\/abuse?id=30162339.6909a61779864994b969e16643d07851\\nX-Mandrill-User: md_30162339\\nMessage-Id: <30162339.20160118235403.569d7b1b975118.94523056@mail136-27.atl41.mandrillapp.com>\\nDate: Mon, 18 Jan 2016 23:54:03 +0000\\nMIME-Version: 1.0\\n\\n\\n\\n--938\\/mail144.extendcp.co.uk--\",\"headers\":[],\"text\":\"This is a MIME-encapsulated message\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: text\\/plain; charset=utf-8\\nContent-Disposition: inline\\nContent-Transfer-Encoding: 8bit\\n\\nYour message to <catrin@itwilliams.co.uk> was automatically rejected:\\nQuota exceeded (mailbox for user is full)\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/delivery-status\\n\\nReporting-MTA: dns; mail144.extendcp.co.uk\\nFinal-Recipient: rfc822; catrin@itwilliams.co.uk\\nAction: failed\\nStatus: 5.2.2\\n\\n--938\\/mail144.extendcp.co.uk\\nContent-Type: message\\/rfc822\\n\\nReturn-path: <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>\\nEnvelope-to: catrin@itwilliams.co.uk\\nDelivery-date: Mon, 18 Jan 2016 23:54:06 +0000\\nReceived: from mail by mail144.extendcp.com with spamvirus-scanned (Exim 4.80.1)\\n\\tid 1aLJcb-0000DQ-6F\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:06 +0000\\nX-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on\\n\\tmail144.extendcp.co.uk\\nX-Spam-Level: \\nX-Spam-Status: No, score=-0.1 required=3.9 tests=DKIM_SIGNED,DKIM_VALID,\\n\\tDKIM_VALID_AU,HTML_MESSAGE,T_REMOTE_IMAGE autolearn=disabled version=3.3.1\\nReceived: from mail136-27.atl41.mandrillapp.com ([198.2.136.27])\\n\\tby mail144.extendcp.com with esmtps (UNKNOWN:DHE-RSA-AES256-SHA:256)\\n\\t(Exim 4.80.1)\\n\\tid 1aLJca-0000CD-TV\\n\\tfor catrin@itwilliams.co.uk; Mon, 18 Jan 2016 23:54:05 +0000\\nDKIM-Signature: v=1; a=rsa-sha1; c=relaxed\\/relaxed; s=mandrill; d=email.happycustomer.io;\\n h=From:Subject:To:Message-Id:Date:MIME-Version:Content-Type; i=offer@email.happycustomer.io;\\n bh=mRpuCUGUqu0S9vQ84tu0pKKdd58=;\\n b=KAtnOPTabC+X0o17NvpXeu1RHmTzIfhbFSHJXAELNfmfXaqaQL5+qvZd2vgehOQWLOx1Iw4snT7b\\n   4gm4ugeK2Sd7hqv1CNG2p4ABpDOXRHnJg+hBIJCEpCWDDIFjm5t2XcaFZ1Ha7I2x5iTwUMzFQgSx\\n   TLYcH65bDyfmqa4IfFo=\\nDomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=email.happycustomer.io;\\n b=nF8QCqBXVwK372yltzxYoPwzMWqfHPMKANHdzLzpH9bNN6ZjEGkAupDrqjdzP3tBz\\/Zii2DsLqo+\\n   hyq7q147yGyizWuM5MyVPf6l4gjrJ33aSqTIdEv92dIgcT1ZKyKyw2XEB815Fvg\\/EJl80D1uc8z0\\n   DUsqOmV0f5kZQBku5RA=;\\nReceived: from pmta04.mandrill.prod.atl01.rsglab.com (127.0.0.1) by mail136-27.atl41.mandrillapp.com id hjltho1sb1k0 for <catrin@itwilliams.co.uk>; Mon, 18 Jan 2016 23:54:03 +0000 (envelope-from <bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io>)\\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed\\/relaxed; d=mandrillapp.com; \\n i=@mandrillapp.com; q=dns\\/txt; s=mandrill; t=1453161243; h=From : \\n Subject : To : Message-Id : Date : MIME-Version : Content-Type : From : \\n Subject : Date : X-Mandrill-User : List-Unsubscribe; \\n bh=iSIKJizc8zpOdKshlNQmT47wjxN1VMQfGE3VM3OzFJg=; \\n b=pi3dW8xyp0x16CZBrCQR5J\\/zEGCPas+C9lZgKcECNX1nhbqWO1Zecx0r1l1DwJzID0FUKy\\n sAPfTBL1b15\\/lg5wqHpoGn4v6FU9\\/DGsUAOMr+4YqQ5wMn\\/ODG5C6QPV4CBtpdpKAGOYO5fQ\\n 64TD3C9Ecl8HARXNpee2JQEmHpH8M=\\nFrom: Perry Killington <offer@email.happycustomer.io>\\nSubject: =?utf-8?Q?Hi=20catrin=20w=20here's=20a=20special=2020%=20off=20from=20Dovetails=E2=80=8F?=\\nReceived: from [104.209.138.217] by mandrillapp.com id 6909a61779864994b969e16643d07851; Mon, 18 Jan 2016 23:54:03 +0000\\nTo: catrin w <catrin@itwilliams.co.uk>\\nX-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com\\nX-Report-Abuse: You can also report abuse here: http:\\/\\/mandrillapp.com\\/contact\\/abuse?id=30162339.6909a61779864994b969e16643d07851\\nX-Mandrill-User: md_30162339\\nMessage-Id: <30162339.20160118235403.569d7b1b975118.94523056@mail136-27.atl41.mandrillapp.com>\\nDate: Mon, 18 Jan 2016 23:54:03 +0000\\nMIME-Version: 1.0\\n\\n\\n\\n--938\\/mail144.extendcp.co.uk--\",\"subject\":null,\"spf\":null,\"spam_report\":{\"score\":0,\"matched_rules\":[]},\"dkim\":{\"signed\":false,\"valid\":false},\"email\":\"bounce-md_30162339.569d7b1b.v1-6909a61779864994b969e16643d07851@email.happycustomer.io\",\"tags\":[],\"sender\":null,\"template\":null}}]"
  },
  "rack.request.form_input": "#<PhusionPassenger::Utils::TeeInput:0x000000096ec950>",
  "rack.request.query_hash": "",
  "rack.request.query_string": "",
  ...
}
tomdracz commented 8 years ago

Well, the headers in JSON are an empty array, not sure why would that be though. I've just tested webhook call to the gem from my mandrill and it's all working fine, not sure why would you get differently formatted json from the mandrill server

tardate commented 8 years ago

@zdraganov that's an unexpected message structure from Mandrill - decidedly sparse! It looks like either:

Either way, it's perhaps best if you raise a case with Mandrill to find out more?

As for mandrill-rails, we could make it tolerate headers as an empty array. Are you OK if I add the message you posted above to the fixtures collection?

zdraganov commented 8 years ago

It's OK for me. And here is what we received as message for the Mandrill support.


Matt (Mandrill Support)
Jan 20, 11:38 AM

Hi Zhivko,

Thanks for writing in. With inbound processing, we'll accept emails for your configured subdomain, parse those out, process them, and POST the parsed out version of those emails to a webhook route you've set up. While it doesn't happen often, there are times where a message will be formatted in such a way that our parsers aren't able to fully parse all the message parts of the inbound email. We always include the original message as it arrived at our SMTP servers for cases like that.

In this case, it looks like this message was a bounce response (NDR) that included the full headers of the original email. This likely confused our parsers and made it impossible to parse-out the headers of the message, which is why the headers object was empty.

Please feel free to write back if you have any further questions.
zdraganov commented 8 years ago

Here is a PR https://github.com/evendis/mandrill-rails/pull/40

valscion commented 8 years ago

This issue bit us, too, and in our case it seems like the incoming message isn't a bounce but a real message. I can confirm that in the original JSON payload the headers is really an empty array and not an object.

Click to see JSON payload in a redacted form ``` json { "event": "inbound", "ts": 1471463095, "msg": { "raw_msg": "Received: from COL004-OMC2S9.hotmail.com ... -- snip --", "headers": [], "text": "--_000_HE1PR06MB1417183FA44FC4D294D8D3C08E140HE1PR06MB1417eurp_\nContent-Type: text/plain; charset=\"gb2312\"\nContent-Transfer-Encoding: base64\n\nRGVhciBNYXJrdXMNCg0KSSBob3BlIHlvdSBoYXZlIGhhZC -- snip --", "subject": null, "spf": { "result": "pass", "detail": "sender SPF authorized" }, "spam_report": { "score": 1.2, "matched_rules": [ { "name": "RCVD_IN_DNSWL_NONE", "score": 0, "description": "RBL: Sender listed at http://www.dnswl.org/, no" }, { "name": null, "score": 0, "description": null }, { "name": "listed", "score": 0, "description": "in list.dnswl.org]" }, { "name": "FREEMAIL_FROM", "score": 0, "description": "Sender email is commonly abused enduser mail provider" }, { "name": "HTML_MESSAGE", "score": 0, "description": "BODY: HTML included in message" }, { "name": "DKIM_VALID_AU", "score": -0.1, "description": "Message has a valid DKIM or DK signature from author's" }, { "name": "DKIM_SIGNED", "score": 0.1, "description": "Message has a DKIM or DK signature, not necessarily valid" }, { "name": "DKIM_VALID", "score": -0.1, "description": "Message has at least one valid DKIM or DK signature" }, { "name": "RDNS_NONE", "score": 1.3, "description": "Delivered to internal network by a host with no rDNS" } ] }, "dkim": { "signed": true, "valid": true }, "email": "special-address+abcdefg123456@reply.venuu.se", "tags": [], "sender": null, "template": null } } ```

As for mandrill-rails, we could make it tolerate headers as an empty array.

I see Zhivko did PR #40 to do that, but it seems to be having test failures. Would such a PR be accepted if it had tests and didn't break the current tests?

This likely confused our parsers and made it impossible to parse-out the headers of the message, which is why the headers object was empty.

I'm not sure Mandrill understood correctly that the headers in this case was not an object but an empty array. I suppose this issue still stems from the fact that when Mandrill parsers are confused, the headers isn't an empty object but an empty array, which are totally different things.

Have you been in touch with Mandrill support after that message @zdraganov ?


For our case, I was able to get to the actual headers by using the Mail library to parse the raw message and querying for special fields I wanted:

mail = Mail.new(mandrill_event.message_body(:raw))
# This just returns an empty object
mail.headers
# => {}
# But this one works...
mail.from
# => ["our_customer@hotmail.com"]