Closed melimanrique closed 8 years ago
Nodemailer and mailparser options do not match one-on-one so you should check first what are you actually passing as the attachment. You should also check how the msg attachment is included in the parsed message - is it a "normal" attachment, eg. inside multipart/mixed container or a forwarded embedded message eg. message/rfc822 container because these need special treatment. You could also compre the input and output and see the differences of these two messages which ahould give a hint of what might be wrong
I'm processing the attachments like this: (didn't gave this info before as I though wasn't relevant)
var attachment_array = [];
attachments.map(function(attachment){
var new_attachment = {
filename: attachment.fileName,
content: attachment.content,
contentType: attachment.contentType,
contentDisposition: attachment.contentDisposition,
encoding: attachment.transferEncoding,
cid: attachment.contentId
};
attachment_array.push(new_attachment);
}
});
It is included inside a message/rfc822 container as an embedded message. This is what the mail_object.attachments looks like when printing in console:
{ contentType: 'message/rfc822',
contentDisposition: 'attachment',
generatedFileName: 'attachment.eml',
contentId: 'c3641c93181a2e01761b628aa86d60ae@mailparser',
checksum: '...',
length: ..,
content: <Buffer ... > }
How should it be treated then?
@andris9 do you know how should I treat the attachment?
Just to clarify – is there a problem with parsing (eg. the content
option is empty) or is the problem with sending (the receiver does not see the attached message)? It would help a lot to see the source of the sent message to see if and how the attachment was added.
If the problem is in sending, not parsing then you could try to upgrade Nodemailer to the beta version (run npm install nodemailer@beta
or set the nodemailer version as "beta"
in the package.json dependencies) and see if it helps anything
@andris9, I am working with @melimanrique in this issue. After multiple tests I can confirm is an issue in MailParser and not in not NodeMailer or other components. I change our mail server from Haraka to https://github.com/andris9/smtp-server to be sure it is not related. I also tried upgrading to the beta versions and the issue persists.
So this is what I see:
When we a message as attachment from from Outlook it looks like a regular attachment
But when we pass it to MailParser, we see the attachment like this
{ contentType: 'message/rfc822',
contentDisposition: 'attachment',
generatedFileName: 'attachment.eml',
contentId: 'c3641c93181a2e01761b628aa86d60ae@mailparser',
checksum: 'dc8f3704841b339c5f1ef564032d3cf6',
length: 71878,
content: <Buffer 52 65 63 65 69 76 65 64 3a 20 66 72 6f 6d 20 42 4c 32 50 52 30 35 4d 42 31 31 36 2e 6e 61 6d 70 72 64 30 35 2e 70 72 6f 64 2e 6f 75 74 6c 6f 6f 6b 2e ... > }
As you can see it does not contain a fileName
as a regular attachment, it contains a generatedFileName
.
What I can guess is that outlook does not attach it as a typical attachment, but creates another Mime tree that confuses MailParser.
This is the stream that generates this issue: https://gist.github.com/ricardopolo/8d44147861c42c2bacef
Any advice please?
Could you provide an example message source that fails proper parsing so I could test it and see what is going on?
Yes of course, I already attached it in my last message https://gist.github.com/ricardopolo/8d44147861c42c2bacef
Please tell me if you need any more information @andris9
Ok, sorry, didn't notice it at first. I'll look into it today
I checked and the problem is not in the parsing but in the sending side. Firstly you would have to use the beta version of nodemailer or wait until the end of this week when the beta is released as latest. Secondly, you need to remove duplicate content-type header before sending the mail.
This is the code that I used:
mailparser.on('end', function (mail_object) {
// Remove, otherwise the message ends up with 2 content-type headers that messes the output
delete mail_object.headers['content-type'];
var mailOptions = {
headers: mail_object.headers,
html: mail_object.html,
attachments: mail_object.attachments
};
...
Great @andris9. You do a great job in your projects! Thanks :smile:
@andris9 @melimanrique @ricardopolo
Hi there, i know this is an old issue, but i ran into a similar or the same problem. with mailparser and forwarding the mail afterwards.
We parse mail from Redmine to remove redmine-specific headers when the recipient is a Redmine mailbox or another issue tracker...
This works fine most of the time, even with attachments, with almost the same code as the example above. The problem occurs when the orignal mail is forwarded as an attachment.
Fun discovery on our side, sending the mail to GMail works and is in this case 80kb
test
----_NmP-17ae68c3fd443c7b-Part_3 Content-Type: message/rfc822; name=message.eml Content-ID: <6311b1673b880_58da25e4048764@redmine-live-7f7cc5b489-gbl2c.mail> Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=message.eml Received: from DB9P189MB1857.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:326::7) by VI1P18901MB0830.EURP189.PROD.OUTLOOK.COM with HTTPS; Fri, 2 Sep 2022 07:24:45 +0000 Received: from OL1P279CA0062.NORP279.PROD.OUTLOOK.COM (2603:10a6:e10:15::13) by DB9P189MB1857.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:326::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.21; Fri, 2 Sep 2022 07:24:44 +0000 Received: from HE1EUR04FT021.eop-eur04.prod.protection.outlook.com (2603:10a6:e10:15:cafe::c9) by OL1P279CA0062.outlook.office365.com (2603:10a6:e10:15::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.12 via Frontend Transport; Fri, 2 Sep 2022 07:24:44 +0000 Authentication-Results: spf=pass (sender IP is 209.85.128.169) smtp.mailfrom=gmail.com; dkim=pass (signature was verified) header.d=gmail.com;dmarc=pass action=none header.from=gmail.com;compauth=pass reason=100 Received-SPF: Pass (protection.outlook.com: domain of gmail.com designates 209.85.128.169 as permitted sender) receiver=protection.outlook.com; client-ip=209.85.128.169; helo=mail-yw1-f169.google.com; pr=C Received: from mail-yw1-f169.google.com (209.85.128.169) by HE1EUR04FT021.mail.protection.outlook.com (10.152.26.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10 via Frontend Transport; Fri, 2 Sep 2022 07:24:43 +0000 Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-334dc616f86so8509337b3.8 forAnd it looks like this when its forwarded to a Microsoft O365 Mailbox.. with only 47kb
This is my code snipped (all unnecessary stuff removed )
const server = new SMTPServer({
secure: false,
authOptional: true,
maxAllowedUnauthenticatedCommands: Infinity,
onRcptTo(address, session, callback) {
return callback();
},
onData(stream, session, callback) {
parse(stream, session);
}
});
server.listen(port);
async function parse(stream, session){
let isredmineprj = await checkRcpt(session.envelope, redmine_mails);
let myparsed = await simpleParser(stream);
if (isredmineprj) {
myparsed.headers.delete('x-redmine-ticket-id');
myparsed.headers.set('subject', myparsed.subject.replace(/(.*)(\[.*#[0-9]+\])/i, '$1'));
myparsed.subject = myparsed.subject.replace(/(.*)(\[.*#[0-9]+\])/i, '$1');
}
const fromAddress = myparsed.from.value[0].address;
var mailOptions = {
from: myparsed.from ? myparsed.from.value.map(from => from.address) : undefined,
to: myparsed.to ? myparsed.to.value.map(to => to.address).filter(e => e !== fromAddress).join(', ') : undefined,
cc: myparsed.cc ? myparsed.cc.value.map(cc => cc.address).filter(e => e !== fromAddress).join(', ') : undefined,
bcc: bccmap[session.id] ? bccmap[session.id].filter(e => e !== fromAddress).join(', ') : undefined, // bcc fehlt ??
subject: myparsed.subject,
text: myparsed.text,
html: myparsed.textAsHtml,
attachments: myparsed.attachments,
headers: myparsed.headers,
};
sendsmtp(mailOptions);
}
async function sendsmtp(mailOptions)
{
transport.sendMail(mailOptions, function(error, info){
nodemailerTransport.close();
});
}
Any help on figuring out how to handle attached eml/msg correctly would be appreciated :)
This is how the mail looks, when i send it through Mailhog, before forwarding it to O365/Gmail ... with the same result, works in gmail , broken in outlook (client and web)
Cc: d.someone@somedomain.de
Content-Type: multipart/alternative; boundary="--_NmP-4a03a036f0ddd48e-Part_1"
Date: Fri, 02 Sep 2022 09:08:50 +0000
From: max.power@somedomain.de
MIME-Version: 1.0
Message-ID: <1f9786b2-d3ed-feb0-0e2d-6d334ba2e759@somedomain.de>
Received: from [127.0.0.1] by somedomain.de (MailHog)
id 0pMRYIDXioJvAs12PlSX7ZlH3bc1MRmFQciL31k2VbY=@somedomain.de; Fri, 02 Sep 2022 09:08:50 +0000
Return-Path: <max.power@somedomain.de>
Subject: Re: Test [Aufgabe #369138]
To: someone@gmail.com
----_NmP-4a03a036f0ddd48e-Part_1
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
test
----_NmP-4a03a036f0ddd48e-Part_1
Content-Type: multipart/related; type="text/html";
boundary="--_NmP-4a03a036f0ddd48e-Part_3"
----_NmP-4a03a036f0ddd48e-Part_3
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<p>test</p>
----_NmP-4a03a036f0ddd48e-Part_3
Content-Type: message/rfc822; name=message.eml
Content-ID: <6311c8223928d_9c25e5480182@redmine-dev-858c7dc549-tp5lx.mail>
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=message.eml
UmVjZWl2ZWQ6IGZyb20gREI4UDE4OU1CMDY5Ny5FVVJQMTg5LlBST0QuT1VUTE9PSy5DT00gKDI2
###
Lots of base64 here... removed for readability
###
VlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWVlZWDQpWVlZWVlZW
VlZWVlZWVlZWVlZVPQ0KDQotLXNnbmlyay03NzNmODExNi1lMmRiLTQyMjgtOTU4MS1mZDZhMGI0
ZDk4YmItLQ0K
----_NmP-4a03a036f0ddd48e-Part_3--
----_NmP-4a03a036f0ddd48e-Part_1--
And this is the same mail directly from redmine to mailhog
Cc: someone@somedomain.de
Content-Transfer-Encoding: 7bit
Content-Type: multipart/mixed; boundary="--==_mimepart_6311cb9676089_9c25e54804c6"; charset=UTF-8
Date: Fri, 02 Sep 2022 11:23:34 +0200
From: max.power@somedomain.de
In-Reply-To: <trinity-a2e9c296-08b5-467a-8bde-ea29ed81edde-1662036422310@msvc-mesg-gmx102>
Message-ID: <6311cb96781e7_9c25e5480566@redmine-dev-858c7dc549-tp5lx.mail>
Mime-Version: 1.0
Received: from somedomain.de by somedomain.de (MailHog)
id T2VaoZM7P0CAMI-DcXKy21AhmnO9Qs3-jajJp2EAyfg=@somedomain.de; Fri, 02 Sep 2022 09:23:34 +0000
Return-Path: <max.power@somedomain.de>
Subject: Re: Test [Aufgabe #369138]
To: someone@gmail.com
X-Redmine-Ticket-ID: 369138
----==_mimepart_6311cb9676089_9c25e54804c6
Content-Type: multipart/alternative;
boundary="--==_mimepart_6311cb9675f3d_9c25e54803ca";
charset=UTF-8
Content-Transfer-Encoding: 7bit
----==_mimepart_6311cb9675f3d_9c25e54803ca
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: 7bit
test
----==_mimepart_6311cb9675f3d_9c25e54803ca
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" media="screen">
</style>
</head>
<body>
<div id="email_header">
</div>
<div class="wrapper" id="email_body">
<p>test</p>
</div>
<div id="email_footer">
</div>
<span style="background-image: url(https://redmine-dev-zentrale.dev.somedomain.de/mlnk/Q-wvQ4NfLw2rBaTsoTxMhA)"></span>
</body>
</html>
----==_mimepart_6311cb9675f3d_9c25e54803ca--
----==_mimepart_6311cb9676089_9c25e54804c6
Content-Type: message/rfc822;
filename=message.eml
Content-Transfer-Encoding:
Content-Disposition: attachment;
filename=message.eml
Content-ID: <6311cb9678bdc_9c25e54806f9@redmine-dev-858c7dc549-tp5lx.mail>
Received: from DB8P189MB0697.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:122::24)
by VI1P18901MB0830.EURP189.PROD.OUTLOOK.COM with HTTPS; Thu, 1 Sep 2022
12:47:05 +0000
Received: from OS6P279CA0038.NORP279.PROD.OUTLOOK.COM (2603:10a6:e10:32::11)
by DB8P189MB0697.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:122::24) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Thu, 1 Sep
2022 12:47:03 +0000
Received: from HE1EUR04FT042.eop-eur04.prod.protection.outlook.com
(2603:10a6:e10:32:cafe::10) by OS6P279CA0038.outlook.office365.com
(2603:10a6:e10:32::11) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.15 via Frontend
Transport; Thu, 1 Sep 2022 12:47:03 +0000
Authentication-Results: spf=pass (sender IP is 212.227.15.19)
smtp.mailfrom=gmx.de; dkim=pass (signature was verified)
header.d=gmx.net;dmarc=pass action=none header.from=gmx.de;compauth=pass
reason=100
Received-SPF: Pass (protection.outlook.com: domain of gmx.de designates
212.227.15.19 as permitted sender) receiver=protection.outlook.com;
client-ip=212.227.15.19; helo=mout.gmx.net; pr=C
Received: from mout.gmx.net (212.227.15.19) by
HE1EUR04FT042.mail.protection.outlook.com (10.152.26.159) with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.5588.10 via Frontend Transport; Thu, 1 Sep 2022 12:47:02 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
s=badeba3b8450; t=1662036422;
bh=gIq7BpDF7bjh7vajOaauYC0G9HptVABk6DQh3qePMqM=;
h=X-UI-Sender-Class:From:To:Subject:Date;
b=Rk/yRGO+HMw3RqRo8jHeuLRG5UK1PMRfWTK6AIdvbdizW8ZoWCfjOLNj4EL2RTWYf
0ityEkxS+Y4eeN4is6sGWGPDUu7cJ1hH/TqJ5yvk8lmNOpOkrC1+zxXVq9SkJwvR04
8+U8mpWr6KNW8IHbYUyyuJV1OzXvdpN5YiA7atXw=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [91.25.123.116] ([91.25.123.116]) by
msvc-mesg-gmx102.server.lan (via HTTP); Thu, 1 Sep 2022 14:47:02 +0200
Message-ID: <trinity-a2e9c296-08b5-467a-8bde-ea29ed81edde-1662036422310@msvc-mesg-gmx102>
From: someone@gmx.de
To: helpdesk@somedomain.de
Subject: Test
Content-Type: multipart/mixed;
boundary=sgnirk-773f8116-e2db-4228-9581-fd6a0b4d98bb
Date: Thu, 1 Sep 2022 14:47:02 +0200
X-Provags-ID: V03:K1:sCHpEwO5lJvI4COcprlh7x0YKKXCbD8bDbNEZewsGXCGUNR+GyYtbER58agApjTVpItR0
4fUFMPiKrjw+fyoUUaqeMXoXev5KLSzmywhf5uHSH0KHNPbumWwZt8cu+f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WBx0+ntmGWH7Y2T4Y0dkdYYcVyHz5YYg7g51kOGZH+rgZZ4KLsx5ouolWU1Ic4D99f9rlH4
Return-Path: someone@gmx.de
X-MS-Exchange-Organization-ExpirationStartTime: 01 Sep 2022 12:47:03.0702
(UTC)
X-MS-Exchange-Organization-ExpirationStartTimeReason: OriginalSubmit
X-MS-Exchange-Organization-ExpirationInterval: 1:00:00:00.0000000
X-MS-Exchange-Organization-ExpirationIntervalReason: OriginalSubmit
X-MS-Exchange-Organization-Network-Message-Id:
8239312c-eff4-410c-b49e-08da8c1811b7
X-EOPAttributedMessage: 0
X-EOPTenantAttributedMessage: 094a7fc1-25dc-4512-b446-33d24bd0d434:0
X-MS-Exchange-Organization-MessageDirectionality: Incoming
X-MS-PublicTrafficType: Email
X-MS-Exchange-Organization-AuthSource:
HE1EUR04FT042.eop-eur04.prod.protection.outlook.com
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Office365-Filtering-Correlation-Id: 8239312c-eff4-410c-b49e-08da8c1811b7
X-MS-TrafficTypeDiagnostic: DB8P189MB0697:EE_
X-MS-Exchange-AtpMessageProperties: SA|SL
X-MS-Exchange-Organization-SCL: 1
X-Microsoft-Antispam: BCL:0;
X-Forefront-Antispam-Report:
CIP:212.227.15.19;CTRY:US;LANG:de;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mout.gmx.net;PTR:mout.gmx.net;CAT:NONE;SFS:(13230016)(4636009)(7916004)(84050400002)(336012)(956004)(7596003)(356005)(26005)(33964004)(86362001)(9686003)(3480700007)(58800400005)(34206002)(75640400001)(1096003)(4006050)(5660300002)(33716001)(7116003)(8676002)(564344004)(19618925003)(6706004);DIR:INB;
X-Auto-Response-Suppress: DR, OOF, AutoReply
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Sep 2022 12:47:02.9296
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 8239312c-eff4-410c-b49e-08da8c1811b7
X-MS-Exchange-CrossTenant-Id: 094a7fc1-25dc-4512-b446-33d24bd0d434
X-MS-Exchange-CrossTenant-AuthSource:
HE1EUR04FT042.eop-eur04.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8P189MB0697
X-MS-Exchange-Transport-EndToEndLatency: 00:00:02.2517859
X-MS-Exchange-Processed-By-BccFoldering: 15.20.5588.010
X-Microsoft-Antispam-Mailbox-Delivery:
ucf:1;jmr:0;auth:0;dest:C;OFR:CustomRules;ENG:(910001)(944506478)(944626604)(920097)(930097);
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?azVlMzBkeSs2UnhLa2NoUU1TNEhMMzl4UHU3YStyM0lIeXJ0SDk3S01Kd2hz?=
=?utf-8?B?dk5KOTlRelFnaG5nOXlQNmxUYXRzTEpTaHpVNGtWSGVPZjdpbCtlSFY1WnF4?=
=?utf-8?B?WDNjOXpxdmJyN1Z2MFhJaTBNWStoeW9ta2JhZ3VXazdvdGszS0pBLzFEbjRW?=
=?utf-8?B?T2I5bkdPV1d5d2I3T2pMUjZZUjJXMEd2d21BRzRSMUtFUzg3Zkx2TGJYREp5?=
=?utf-8?B?M3VpNy93RDlLZ0VZNG5HSk1YQnk3QWNOVWdSUmg0VW9OSmhNNlVLVXJPeXBt?=
=?utf-8?B?RU5xdnAwY29id3ViUjJkZk1URFZERnJPRjNXSlg0S21xNGM5bnJSZkJzcUYr?=
=?utf-8?B?cWdwZzZkWTNjMStPajVJOE9XdnIyZzVkcWZwSTNDc08vdk1IVTBjZ2llVzdK?=
=?utf-8?B?ZFZkZnVUUGdkd1FtMHR0azhrNWgwNkU4ZFlJaTNsVUM1M01Da3QxQklVWDdR?=
=?utf-8?B?OVBPU29tWGpicVlTdHRPZG5wWWJMVjg3NHVUWkllUlV4c3Q4cUZ3TWE4YytT?=
=?utf-8?B?M1Rmcm9pcytRVGFNVGVzOXVJSXF0VTFpZzZsc3Zm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3hzejQw?=
=?utf-8?B?U3JtVnRTMndvaFBWS09UYVl4MGtuU1ZZSGt0VjdDdFZZeE4zemJNUVE3ZWpw?=
=?utf-8?B?TEloSFQ0Z3A2VDRvVTgrOG1qWVErQnZ3TlVnUWNBdTZLbGxXVFE1eGtOWk5N?=
=?utf-8?Q?TeJMW9F1CQV?=
MIME-Version: 1.0
--sgnirk-773f8116-e2db-4228-9581-fd6a0b4d98bb
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Gesendet mit der GMX Mail App
--sgnirk-773f8116-e2db-4228-9581-fd6a0b4d98bb
Content-Type: audio/mpeg
Content-Disposition: attachment; filename=my_man.mp3
Content-Transfer-Encoding: base64
SUQzBAAAAAAAQFRQRTEAAAAIAAADbGVsYW5kAFREUkwAAAALAAADNC8yNC8yMDE2AFRTU0UAAAAP
AAADTGF2ZjU0LjI5LjEwNAD/+5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABJbmZv
###
Lots of base64 here... removed for readability
###
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
VVVVVVVVVVVVVVVVVVU=
--sgnirk-773f8116-e2db-4228-9581-fd6a0b4d98bb--
----==_mimepart_6311cb9676089_9c25e54804c6--
I'm parsing an email with mailparser and resending the email with nodemailer. Like this:
When the email contains an Outlook Email (.msg) as attachment, this attachment is corrupted. Doesn't seem correctly parsed because there's no content on it.
Is there a way to just forward the attachment without damaging it?