Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

rfc-822 type attachment (.msg) file, seem to be getting ignored by the perl mime parser, since it headers doesn't seem to have the filename, due to which application is not able to recognize the file as attachment.

Any insight on how this issue can be resolved.

Thank you,

  • Comment on rfc822 type attachment (.msg ) file is not getting recognized.

Replies are listed 'Best First'.
Re: rfc822 type attachment (.msg ) file is not getting recognized.
by Corion (Patriarch) on May 06, 2022 at 10:37 UTC

    Can you post an example of input data and your code so we can reproduce the problem?

    I have Perl code parsing attachments using MIME::Parser without problems, but that may be because I've never encountered attachments that you seem to have.

      Hi Corion, sorry for late reply.

      But, below is what input for rfc-822 attachment input looks like,

      --_008_FRYP281MB07669A69AA3ECE4ECD6568DAF1599FRYP281MB0766DEUP_ Content-Type: message/rfc822 Content-Disposition: attachment; creation-date="Wed, 19 Jan 2022 10:11:09 GMT"; modification-date="Mon, 09 May 2022 16:54:17 GMT" Received: from BE0P281MB0291.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:d +::15) by FR2P281MB0283.DEUP281.PROD.OUTLOOK.COM with HTTPS; Tue, 24 Aug 2021 1 +2:46:18 +0000 Received: from BEXP281MB0088.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:8 +::16) by BE0P281MB0291.DEUP281.PROD.OUTLOOK.COM (2603:10a6:b10:d::15) with Mic +rosoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SH +A384) id 15.20.4457.10; Tue, 24 Aug 2021 12:46:17 +0000 Received: from BEXP281MB0088.DEUP281.PROD.OUTLOOK.COM ([fe80::44f8:df7b:de7a:ace9]) by BEXP281MB0088.DEUP281.PROD.OUTLOOK.C +OM ([fe80::44f8:df7b:de7a:ace9%2]) with mapi id 15.20.4436.009; Tue, 24 +Aug 2021 12:46:17 +0000 From: "Wyszniewski, Petra (SE GP T SP PRO DE OEN ICC PC)" <petra.wyszniewski@xyz.com> To: "Cvejic, Djordje (ext) (SE GP T EU EE RS)" <djordje.cvejic.ext@xyz.com> CC: "Radonjic, Marko (SE GP T SP SYS EUA RS)" <marko.radonjic@xyz.com>, "Petrovic, Aleksa (ext) (SE GP T EU EE RS)" <aleksa.petrovic.ext@xyz.com>, "Buschkowski, Uwe (SE GP T SP PRO DE QM QAC)" <uwe.buschkowski@xyz.com>, "Swiatczak, Maciej (SE GP T SV PF SP EN)" <maciej.swiatczak@xyz.com> Subject: AW: 20-1333 SRB RE: 3DN1 Question Thread-Topic: 20-1333 SRB RE: 3DN1 Question Thread-Index: Addto+gBUDY8X2fVSYOpDBg2Z9efxwXffvXgAAS9FaAAjTOXsARVnRsw +AAja1nA= X-MS-Exchange-MessageSentRepresentingType: 1 Date: Tue, 24 Aug 2021 12:46:17 +0000 Message-ID: <BEXP281MB0088BE25F65795A2ADB8C8B8CFC59@BEXP281MB0088.DEUP281.PROD +.OUTLOOK.COM> References: <BE0P281MB0081C407B80DCC5FF7E2DAC0CF019@BE0P281MB0081.DEUP281.PROD +.OUTLOOK.COM> <FR2P281MB028319D0D8FA705263C5783EF1EC9@FR2P281MB0283.DEUP281.PROD.OU +TLOOK.COM> <BE0P281MB0081FA99E8FDFD9EE62CD966CFEC9@BE0P281MB0081.DEUP281.PROD.OU +TLOOK.COM> <FR2P281MB0283B0654E27DC6739508343F1EF9@FR2P281MB0283.DEUP281.PROD.OU +TLOOK.COM> <FR2P281MB0283C407DCCA60CD2399D841F1C59@FR2P281MB0283.DEUP281.PROD.OU +TLOOK.COM> In-Reply-To: <FR2P281MB0283C407DCCA60CD2399D841F1C59@FR2P281MB0283.DEUP281.PROD +.OUTLOOK.COM> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Exchange-Organization-AuthMechanism: 04 X-MS-Exchange-Organization-AuthSource: BEXP281MB0088.DEUP281.PROD.OUTL +OOK.COM X-MS-Has-Attach: yes X-MS-Exchange-Organization-Network-Message-Id: 889b4579-d56a-4769-8d6d-08d966fd2aa5 X-MS-TNEF-Correlator: X-MS-Exchange-Organization-RecordReviewCfmType: 0 x-ms-publictraffictype: Email x-ms-exchange-organization-originalclientipaddress: 92.213.31.127 x-ms-exchange-organization-originalserveripaddress: 2603:10a6:b10:8::1 +6 authentication-results: siemens-energy.com; dkim=none (message not sig +ned) header.d=none;siemens-energy.com; dmarc=none action=none header.from=siemens-energy.com; x-ms-office365-filtering-correlation-id: 889b4579-d56a-4769-8d6d-08d96 +6fd2aa5 x-ms-traffictypediagnostic: BE0P281MB0291: X-Microsoft-Antispam-Mailbox-Delivery: ucf:0;jmr:0;auth:0;dest:I;ENG:(750129)(520011016)(706158)(94450645 +8)(944626604); X-Microsoft-Antispam-Message-Info: xteVNwK9Wfv2yLbg7rAS4PvcwgT9gYhOdJO66n9FDR2oC5E3/AN7QYByAYHIVcITNS +sSAaHJKMxBKyN0esEsTFVuNqYuVOtoksHhNRzkggoUWGOfFUbI3IuJKSIpNTUONXZZh3T +IYHe6Y2R/a7RCnampgl2RO6N66WnPEQThc3TKj2UX+TeNe8u25Onwdl48D/FnV2K4U70y +K9mz3dMmFiZ3jzm7rlZuO0hl1fWOZf8j5KnX39W9HA5T6jaPrR25Yj3iyTPhcWOjP2B8k +nQX/ZtHAKg3GbCpfr6pKuYaHvhhqmk+6eYZD4ctMLIh8MJyAjilaBOfu1UZShqk+rYxPL +eH7BEAumiiVSgNakip+0cmi8812y6KwWq7b50d1djJ7t4rGZxc4G3vml3G7rfNzIOyX6c +vy/Vrw7C0PmGPULhCrwz7TMSjW3sm7YMcuZ1Kw4N+VzU1+eWTSDk6LGycmGCYfrSJwTwu +odpU7IoEiBYvga1PUt32d9kqosHoDTTSFZgr0SMMPdlgTpwVZ0HPo1XoZqwN4orZhxP82 +jl7lzK6zkIZlpIol5xjr0NN5r0EzatR3hfFg6rmVcaYidQq/LagF+SNNk+0Clel4dUEIu +xd04Y2w0ci4f7KOsWBtQLoAk9Ait1TAs8BDQfdJVG5q6NeEsvbV45qieK/V6ld+y41zgo +aEb3WBWfbMADjhQeOgBkoSx0EHeB14YlExuQNtaXAkms3WZywRUbHoGc7DI74EDR0YDmk +dgB2n0H8zRiE

      Thank you.

        There are weird newlines / empty lines your example post. Are these also in your input data? If so, that is likely a cause for the attachment not conforming to the MIME specification.