diff --git a/lib/mail-drop.js b/lib/mail-drop.js index 4037a91..d86bf92 100644 --- a/lib/mail-drop.js +++ b/lib/mail-drop.js @@ -12,6 +12,8 @@ const util = require('util'); const libmime = require('libmime'); const StreamHash = require('./stream-hash'); +const MAX_HEAD_SIZE = 2 * 1024 * 1024; + // Processes a message stream and stores it to queue class MailDrop { @@ -109,7 +111,8 @@ class MailDrop { let raw = new PassThrough(); let splitter = new mailsplit.Splitter({ - ignoreEmbedded: true + ignoreEmbedded: true, + maxHeadSize: MAX_HEAD_SIZE }); let streamer = new PassThrough({ objectMode: true