Skip to content

Commit

Permalink
Fix ingestion of emails with attachments (#210)
Browse files Browse the repository at this point in the history
* Fix ingestion of emails with attachments

* Remove ca-certificates (installed by default)

* Add client email with attachment to integ tests

* Fix Sendgrid client API change
  • Loading branch information
c-w authored Jul 14, 2019
1 parent b173ac5 commit e9f2ec2
Show file tree
Hide file tree
Showing 6 changed files with 244 additions and 33 deletions.
6 changes: 1 addition & 5 deletions docker/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ RUN make ci clean

FROM python:${PYTHON_VERSION}-slim AS runtime

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates=20161130+nmu1+deb9u1 \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd -r opwen \
RUN groupadd -r opwen \
&& useradd -r -s /bin/false -g opwen opwen

COPY --from=builder /deps /deps
Expand Down
4 changes: 2 additions & 2 deletions opwen_email_server/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
from opwen_email_server.utils.serialization import from_base64
from opwen_email_server.utils.serialization import from_jsonl_bytes
from opwen_email_server.utils.serialization import to_base64
from opwen_email_server.utils.serialization import to_json
from opwen_email_server.utils.serialization import to_jsonl_bytes
from opwen_email_server.utils.serialization import to_msgpack_bytes
from opwen_email_server.utils.string import is_lowercase

Response = Union[dict, Tuple[str, int]]
Expand Down Expand Up @@ -114,7 +114,7 @@ def _parse_mime_email(self, mime_email: str) -> dict:

@classmethod
def _to_id(cls, email: dict) -> str:
return sha256(to_json(email).encode('utf-8')).hexdigest()
return sha256(to_msgpack_bytes(email)).hexdigest()


class StoreWrittenClientEmails(_Action):
Expand Down
15 changes: 7 additions & 8 deletions opwen_email_server/services/sendgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,13 @@ def _create_attachment(cls, attachment: dict) -> Attachment:
filename = attachment.get('filename', '')
content = attachment.get('content', b'')

mail_attachment = Attachment()
mail_attachment.disposition = 'attachment'
mail_attachment.filename = filename
mail_attachment.content_id = filename
mail_attachment.type = guess_type(filename)[0]
mail_attachment.content = to_base64(content)

return mail_attachment
return Attachment(
disposition='attachment',
file_name=filename,
content_id=filename,
file_type=guess_type(filename)[0],
file_content=to_base64(content),
)


class SetupSendgridMailbox(LogMixin):
Expand Down
Binary file modified tests/files/end_to_end/client-emails.tar.gz
Binary file not shown.
250 changes: 233 additions & 17 deletions tests/files/end_to_end/inbound-email.mime
Original file line number Diff line number Diff line change
@@ -1,27 +1,243 @@
Received: by mx0028p1mdw1.sendgrid.net with SMTP id Yt3NEnbnLU Mon, 13 Feb 2017 06:25:41 +0000 (UTC)
Received: from mail-yw0-f176.google.com (mail-yw0-f176.google.com [209.85.161.176]) by mx0028p1mdw1.sendgrid.net (Postfix) with ESMTPS id C726D640B63; Mon, 13 Feb 2017 06:25:41 +0000 (UTC)
Received: by mail-yw0-f176.google.com with SMTP id w75so45612320ywg.1; Sun, 12 Feb 2017 22:25:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ViHLGS6kOdo9Q9CkDDSSSS3bgKuN0a+UXhwMw06ak4Q=; b=f3WGzjgLe0tPG2edhiHxiCEZatThUga/qJFnWZNyY4lEVjRM9l3qn1BZ4ITawT9tDK LS6qFx//6in7u0rV0YKoa8TfScUFOpPHGCmq1Wxdp7mrWP7GDuCOz3LzyXQsrBe/erGy YEjAVU876sWJ109mcMcmbgOL1SD3d4ak+8GVBSC8oMKPj5XWZsET7WmsonhKf5PHE9IW eJHKqdOkxiPbmDutVx7uS1Bi5u4d9UYPhgxFwAK9lWyJ/Esw6yffjlrUvmQCPibSCxRv o979yY6FyJXDJ82l4ErntcOloFNpzWZ89WkRhb1aBLUoZs3402s6D3wC0ljpmvneIAkw 3D6A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ViHLGS6kOdo9Q9CkDDSSSS3bgKuN0a+UXhwMw06ak4Q=; b=sWY7uU6kK3dg62wVuxcLsRYLg3eGcoLuoLjL0Ju/sl9rGqSDxVc2saIS0ThfUaHlfZ g1zvF+rBoxa7v9jk7MhEw3izW01WXDMm0w2JGc1QLTo3ZM2xW9Clss63R3ZtNKabuyhd 77NHAgbarmQGW5XuqwS1Fy0NMWHkAlLsZd2AnkNb6gCI/VHCCv/oem19bWvNWwRTPBYE cQDPJfzRiUzRPNZPLtlL5ybd2yyb4lcuG+2QoQV8uxPsKS4eDOjNmM76UWZ9s/Ul/mR+ Qbyui7suOO0vPy8GFJHPV9X2ffLqesafTAetCj3LClCdLIdfQDaK86mmVHOT6zldeCTa HH6Q==
X-Gm-Message-State: AMke39n2h/OZU6fwgOdDltzsKqISVbe3ez6t19OeVrg2sT3pDRhSSQiIcwGzKjdWOD/oX96rQlTi0O9t9yhUfA==
X-Received: by 10.129.81.4 with SMTP id f4mr15409224ywb.239.1486967141412; Sun, 12 Feb 2017 22:25:41 -0800 (PST)
Received: by mx0032p1mdw1.sendgrid.net with SMTP id j5s6OrIxAo Mon, 13 Feb 2017 06:26:01 +0000 (UTC)
Received: from mail-yw0-f176.google.com (mail-yw0-f176.google.com [209.85.161.176]) by mx0032p1mdw1.sendgrid.net (Postfix) with ESMTPS id ED0E6865CD for <clemens@victoria.lokole.ca>; Mon, 13 Feb 2017 06:26:00 +0000 (UTC)
Received: by mail-yw0-f176.google.com with SMTP id v200so45517752ywc.3 for <clemens@victoria.lokole.ca>; Sun, 12 Feb 2017 22:26:00 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=BzB59eE6aqgBqNykdZ9LSb3ZuGuXFfDT9pvFSFek5s0=; b=FMASsyJpei2ae3965M1t46+/teaQXdqdsXOPd6viine1X10sEbhuGjX3LGTq3WnMUy f+xydQsjhTTSb15LuJivlsSyLN3dPKyqON4dnfQ6t4mPY3ol0Bnl2GvQico3U4whd6QG KuQtoJqijO4O8TBTWxQqoEjVapAZhr9qK0ZfhCuDCtZ5xfEtdphYkEq+pT52ykIn/Hy/ 6zjWfHKLB9fwiyKtc7Dv2GnPUt2vW/YJs8lsA/hrCISwq2Oy9dCyEX4+IZ/xABL+KLox nEsk4/wMLmHHvv3X1sODcIshGPuX0mloj2YkugRZHnwrTm7FEAjTAhRElwNGPSedSqqW l2Cw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=BzB59eE6aqgBqNykdZ9LSb3ZuGuXFfDT9pvFSFek5s0=; b=n+2qfxqxwNZyVk1+Rd4wS19yZrA7bE2U+AoQ7Jl3d7lAl1V7VV71/jBJFkXEIy6r2Q tqsInRPhv5aQ02W70y9gWB7Bib6Cf353jTHznF4qgjZoUohY8ygNyNrwvjnj2l7T2S+g xn0sCgyYsHbjyLOLF1PoBEUbmNGKcJWf2WIUxQ3wlSZ7tV/nuVj5n/QicAL9yk5e2YsH 5CNYDCFpTFS86SULGAfgeGpTswv0fjKPVipLJFJaw7WziV+v7t4F/jBngqSV0Sy4kyPn UlNn+T7uPlp8A9XgH1tiE7DMt99l2M7qWH0FMI45pZGoVpssmHQw1cuLqJf2F2So/Dhs dhhA==
X-Gm-Message-State: AMke39nSCiOqrDKq7uOX7CaQVazGrDl5fI6cBqEyIbOhxDeR85q1Sl9Ae6//kVayvLfguqV5ErlYVxvjE8p9vw==
X-Received: by 10.129.132.77 with SMTP id u74mr15464915ywf.125.1486967160539; Sun, 12 Feb 2017 22:26:00 -0800 (PST)
MIME-Version: 1.0
Received: by 10.129.156.139 with HTTP; Sun, 12 Feb 2017 22:25:01 -0800 (PST)
Received: by 10.129.156.139 with HTTP; Sun, 12 Feb 2017 22:25:20 -0800 (PST)
From: Clemens Wolff <clemens.wolff@gmail.com>
Date: Sun, 12 Feb 2017 22:25:01 -0800
Message-ID: <CAL79TcnjhV5PinZVY8Y3QEoNNcSa9uuNU5N3EP-gqcYPFfuHLA@mail.gmail.com>
Subject: Test email sent to Lokole client
Date: Sun, 12 Feb 2017 22:25:20 -0800
Message-ID: <CAL79Tc=+euwNVm73=vJLZYwOW+vq4Rr14TwhOWEU6uonM9rCLQ@mail.gmail.com>
Subject: With attachment
To: clemens@developer1.lokole.ca, laura@developer1.lokole.ca, nzola@developer2.lokole.ca
Content-Type: multipart/alternative; boundary=001a1146392641b94705486384bf
Content-Type: multipart/mixed; boundary=001a114f099665b49a0548638593

--001a1146392641b94705486384bf
--001a114f099665b49a0548638593
Content-Type: multipart/alternative; boundary=001a114f099665b4940548638591

--001a114f099665b4940548638591
Content-Type: text/plain; charset=UTF-8

Body of the message.
And a body

--001a1146392641b94705486384bf
--001a114f099665b4940548638591
Content-Type: text/html; charset=UTF-8

<div dir="ltr">Body of the <b>message</b>.</div>
<div dir="ltr">And a body</div>

--001a114f099665b4940548638591--

--001a114f099665b49a0548638593
Content-Type: image/png; name="cute-mouse-clipart-mouse4.png"
Content-Disposition: attachment; filename="cute-mouse-clipart-mouse4.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_iz3ptt6p0

iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAgAElEQVR4nO2d
eXiT173nP7ZlyZZtWba8r8IGG7AhZgnbDWAyUJK0cUIyaXM7TQtNbknbJ01I
MzO3mTvN0qc39/a2IZm5t006TbOQtjftJHToEpiQxIQWSEKCMYuBYltgwDve
JC+SseaP15Kld9P7Sq+JyfSr5zyWz3t0tt/3/M7vrC/8FVcDdmAzsBPoA/wy
7sjk84eAmquVsbirldAMgx2hkmuAjEm/PqABcE06o/AE8K3JNPXABfwWeNbg
/ITBSALYgVpgEbAQ+QL3A43Au0C9gWmLUTOZl7WT3506f+9CqPyXEUgRbR5e
xJjW/BICkVwGxGUonAgq6wjyak3NtSIUSm/LUIJ9Mr7WKPKi5t5F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oUc
ih6EVh5wg7FENg2vQQzCBqQyRQozsdsRAQS0Dwhz306FcM7JPIjhRln9BgQa
wNUSbCi8CIJ1I5As8D0mYcthOgmghizR3wBBTBhwB/41gIAW8SK04nGmjnhp
n3UyAJ8UAbTASrgtEKo9zMgTxUbkdQsjEGihYog1RagwA4KeUfh/94QyzjhB
wHUAAAAASUVORK5CYII=

--001a1146392641b94705486384bf--
--001a114f099665b49a0548638593--
2 changes: 1 addition & 1 deletion tests/opwen_email_server/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_200(self):
domain = 'test.com'
raw_email = 'dummy-mime'
parsed_email = {'to': ['foo@{}'.format(domain)]}
email_id = 'eaee7d51a5440981d5df66825134dcfe0490f145e1ad689bce8c68caeaecde53'
email_id = 'c1763288b50107e4e4df4f2d7144f1085729ed112500995ab8103dd532276c18'
stored_email = dict(parsed_email)
stored_email['_uid'] = email_id

Expand Down

0 comments on commit e9f2ec2

Please sign in to comment.