From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arun Isaac To: Ricardo Wurmus , guile-email@systemreboot.net Subject: Re: [guile-email] parse-email-headers returns just =?utf-8?B?4oCc?= =?utf-8?B?ZmllbGRz4oCd?= In-Reply-To: <87k129kowf.fsf@elephly.net> References: <87k129kowf.fsf@elephly.net> Date: Thu, 23 Apr 2020 06:56:28 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > In some cases the emails don=E2=80=99t seem to have a > content-transfer-encoding header, This is not a problem. RFC2045 specifies that "Content-Transfer-Encoding: 7BIT" should be assumed if the Content-Transfer-Encoding header is not present. guile-email implements this recommendation. > * I sometimes need to discard the first two lines of the raw email to > get the headers to be fully parsed Your attachment is an mbox, not a raw email. Perhaps you are treating it as a raw email and that's why you have to chop off the first line? And, I'm guessing your other problems are also related to this. The following snippet works for me. Could you confirm? =2D-8<---------------cut here---------------start------------->8--- (parse-email (first (call-with-input-file "/path/to/your/attachment" mbox->emails))) =2D-8<---------------cut here---------------end--------------->8--- --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6g7ssACgkQLiXui2GA K7MFDggAj7T16GhJ7W8Hc0g2hANTARTmsToE0hYnVZ6t4uMUyKaBpDYlpgLgytOH m1firNAep4VJUEdANnqqPXFWnk/MDmEiLQDojTfNVcVbESXVxLrxX80HNklL9xjm djtktUe8b8CYlj7JvP5ozB0JZcrRnISJrxCZVv9l6csAfTQYUowrJyN5hO8DDTW7 euILLdyXAC4SWd+8I8lIUpaY0SMkbR6CBgmk5mKDVH6gi2nZ3CjT+sbBdtNP6l1J Oa/xmku5jYUFIGgNyQT5Kj9vGkdaG5FfsFnx+/4Sf2RuzOoOW9qVbvijQmzt1oRy 6xmqw7omdCnYN5GDh9WDh4QNBZe2aA== =39Rx -----END PGP SIGNATURE----- --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.systemreboot.net (mugam.systemreboot.net [139.59.75.54]) by localhost (mpop-1.4.7) with POP3 for ; Thu, 23 Apr 2020 07:20:15 +0530 Return-path: Envelope-to: arunisaac@systemreboot.net Delivery-date: Thu, 23 Apr 2020 06:56:38 +0530 Received: from localhost.localdomain ([127.0.0.1] helo=[192.168.2.12]) by systemreboot.net with esmtp (Exim 4.93) (envelope-from ) id 1jRQdS-0000Nq-Ql for arunisaac@systemreboot.net; Thu, 23 Apr 2020 06:56:38 +0530 Received: from [192.168.2.1] (helo=steel) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jRQdP-0000Ng-Lk; Thu, 23 Apr 2020 06:56:35 +0530 From: Arun Isaac To: Ricardo Wurmus , guile-email@systemreboot.net In-Reply-To: <87k129kowf.fsf@elephly.net> References: <87k129kowf.fsf@elephly.net> Date: Thu, 23 Apr 2020 06:56:28 +0530 Message-ID: MIME-Version: 1.0 Subject: Re: [guile-email] =?utf-8?q?parse-email-headers_returns_just_?= =?utf-8?b?4oCcZmllbGRz4oCd?= X-BeenThere: guile-email@systemreboot.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: guile-email discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1227468237074113291==" Errors-To: guile-email-bounces@systemreboot.net Message-ID: <20200423012628.QODeqAYNb7FgdFv9s8JS6Y0SU2F7tkGJx0iXw34K_WM@z> --===============1227468237074113291== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > In some cases the emails don=E2=80=99t seem to have a > content-transfer-encoding header, This is not a problem. RFC2045 specifies that "Content-Transfer-Encoding: 7BIT" should be assumed if the Content-Transfer-Encoding header is not present. guile-email implements this recommendation. > * I sometimes need to discard the first two lines of the raw email to > get the headers to be fully parsed Your attachment is an mbox, not a raw email. Perhaps you are treating it as a raw email and that's why you have to chop off the first line? And, I'm guessing your other problems are also related to this. The following snippet works for me. Could you confirm? =2D-8<---------------cut here---------------start------------->8--- (parse-email (first (call-with-input-file "/path/to/your/attachment" mbox->emails))) =2D-8<---------------cut here---------------end--------------->8--- --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl6g7sQACgkQLiXui2GA K7Oi4QgAsMBzmpSYE3RxVHK2B7U9PmzeSvpbXSlwEv+f53Ol500+p5owBP+r7yVS 9ax3xeqKVIl0Y2CzOd6WTND/oQGkzJNh393bhNcq1as4COkDe4S9GwLcDcMYfuFU lC2Nn/TQPfUasY7ToKlfxuCHgzyTt1kC4yUBNHIMeqtLudlx5nKzQhD6i4ktMBUn ZpRGoP9xPAEiuV5SZ/0IFR/Rl+bZj0xSYSGQZ9eVmSMVHuxSjxh9dN/nvDyCtgLH zvmKEvcyzCcBAPB3MSXC+6Jq2oAwvFt+pUu6gphingDp/EJr+bdFMucv0OJtEBO8 NVDSH3KyhBCkiVsjdI6NXBNrOdoCkA== =+eAx -----END PGP SIGNATURE----- --=-=-=-- --===============1227468237074113291== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- guile-email mailing list guile-email@systemreboot.net https://lists.systemreboot.net/listinfo/guile-email --===============1227468237074113291==--