From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6822 invoked from network); 9 Feb 2021 21:03:53 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 9 Feb 2021 21:03:53 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l9aAn-00Denh-Hf for ml@inbox.vuxu.org; Tue, 09 Feb 2021 15:03:49 -0600 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1l9aAn-00BclG-1t for ml@inbox.vuxu.org; Tue, 09 Feb 2021 15:03:49 -0600 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l8hFh-00B83I-MZ for ding@lists.math.uh.edu; Sun, 07 Feb 2021 04:25:13 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l8hFf-00C7q8-7y for ding@lists.math.uh.edu; Sun, 07 Feb 2021 04:25:13 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:Mime-Version:References:Message-ID:Date:Subject: From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Jo/tNgydhzqQx1hd67HN3Vw1vynHj1AZEujTBlyM0s0=; b=QKsVOKWtUiCygIckbjSdb+thDy eFha6r5eNteuto2yZDE/W94MqKPyHJJotSHxC6ASf4FMGDjJJx6K7CID90zkn8X28TzlVklWtsQjF x8BgtSKBneLgzfS6YlQFr/P1MANqOZxVdHN4aDueo81TUORfnBK+95yRQO/tfqe1FnNY=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l8hFX-0007gK-Gc for ding@gnus.org; Sun, 07 Feb 2021 11:25:06 +0100 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1l8hFV-00034M-Ur for ding@gnus.org; Sun, 07 Feb 2021 11:25:01 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Valtteri Vuorikoski Subject: Re: View HTML Mail in Browser Date: Sun, 07 Feb 2021 12:23:32 +0200 Message-ID: <87sg68fa6z.fsf@notcom.org> References: <87wnvlz56f.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (gnu/linux) Cancel-Lock: sha1:RhlEIgdAD6l2IJ/qJQQvcY+XVsM= List-ID: Precedence: bulk Felix Natter writes: > Is there a modern best practice for reading non-trivial HTML mails? I > know about shr, but it often fails. I don't know about best practice, but I use Thunderbird to open problematic mail. This is nicer than a browser since external images and Javascript are disabled by default, and attachments can also be accessed in the GUI application. First, a shell script called thunderbird-open-file (I also use this with the file indexer Recoll for opening mail files so it has some extra functionality): #!/bin/bash if [[ -z "$1" ]] ; then echo "usage: thunderbird-open-file " >&2 exit 1 fi umask 077 f=/tmp/tb-open-$$.eml if [[ "$1" == "-" ]] ; then rm -f "$f" cat > "$f" else cp --remove-destination "$1" $f fi ( thunderbird -file $f ; rm -f $f ) < /dev/null > /dev/null 2>&1 & Next, the gnus integration (copypasta from gnus-summary-pipe-to-muttprint): (defun gnus-summary-pipe-to-thunderbird (&optional command) "Pipe this article to Thunderbird with a helper script." (unless (stringp command) (setq command (expand-file-name "~/bin/thunderbird-open-file -"))) (let ((gnus-summary-pipe-output-default-command gnus-summary-pipe-output-default-command)) (gnus-summary-save-in-pipe command t))) (defun gnus-summary-thunderbird (&optional arg) "Show the current article using Thunderbird." (interactive "P") (require 'gnus-art) (let ((gnus-default-article-saver 'gnus-summary-pipe-to-thunderbird)) (gnus-summary-save-article arg t))) (define-key gnus-summary-mode-map (kbd "O t") 'gnus-summary-thunderbird) (define-key gnus-article-mode-map (kbd "O t") 'gnus-summary-thunderbird) Tip if you end up rolling your own instead: the file name passed to "thunderbird -file" must end with ".eml". Otherwise it tries to be smart and falls over. -Valtteri