]> git.rmz.io Git - dotfiles.git/commitdiff
mutt: render dmarc reports using w3m
authorSamir Benmendil <me@rmz.io>
Tue, 31 Jan 2023 23:43:20 +0000 (23:43 +0000)
committerSamir Benmendil <me@rmz.io>
Tue, 31 Jan 2023 23:47:25 +0000 (23:47 +0000)
This needs a bit more work, maybe even a different xsl for rendering
text directly.

mutt/dmarc.xsl
mutt/mailcap
mutt/muttrc

index 25bd7df1b0ce75d6f11635092d6a33e0f13df6ce..b942425ce01a16441d6e3b42ebe6e37521b68de9 100644 (file)
        <xsl:template match="spf">
                <td>
                        <xsl:call-template name="class_attribute" />
+                       <xsl:value-of select="result"/>
+                       <br/>
                        <xsl:value-of select="domain"/>
                        <br/>
                        <xsl:value-of select="scope"/>
        <xsl:template match="dkim">
                <td>
                        <xsl:call-template name="class_attribute" />
+                       <xsl:value-of select="result"/>
+                       <br/>
                        <xsl:value-of select="domain"/>
                        <br/>
                        <xsl:value-of select="selector"/>
index 57f82474e02f13273c8ac4305d5d03c2c497f095..7faa4b87fdfc332952f5effe6dd847a4c75adb01 100644 (file)
@@ -6,7 +6,7 @@ application/gzip; zcat  | xsltproc $XDG_CONFIG_HOME/mutt/dmarc.xsl - > /tmp/dmar
     test=[[ '%s' == *rmz.io* ]]
 application/zip; funzip | xsltproc $XDG_CONFIG_HOME/mutt/dmarc.xsl - > /tmp/dmarc.html && qutebrowser /tmp/dmarc.html ;\
     test=[[ '%s' == *rmz.io* ]]
-application/gzip; zcat  | xmllint --format - ; copiousoutput ; test=[[ '%s' == *rmz.io* ]]
-application/zip; funzip | xmllint --format - ; copiousoutput ; test=[[ '%s' == *rmz.io* ]]
+application/gzip; zcat  | xsltproc $XDG_CONFIG_HOME/mutt/dmarc.xsl - | w3m -dump - -T text/html ; copiousoutput ; test=[[ '%s' == *rmz.io* ]]
+application/zip;  funzip | xsltproc $XDG_CONFIG_HOME/mutt/dmarc.xsl - | w3m -dump - -T text/html ; copiousoutput ; test=[[ '%s' == *rmz.io* ]]
 application/*;   $XDG_CONFIG_HOME/mutt/mutt_bgrun rifle -f F %s;
 image/*;         rifle -f F %s;
index 8cb3f591d97ab92772a0f4ff84562b8db1d426bb..0c86fa4343cd36997ae3d760738c9f44971fe837 100644 (file)
@@ -78,6 +78,7 @@ hdr_order from: to: cc: date: subject: x-clacks-overhead:
 set mailcap_path = $my_config_dir/mailcap
 auto_view text/html      # view html automatically
 auto_view text/calendar  # view ical automatically
+auto_view application/gzip application/zip  # for dmarc reports
 alternative_order text/calendar text/plain text/enriched text/html  # view ical first, html last
 
 # IMAP: mbsync