[Bug 1175107] New: mutt: nametemplate in mailcap not working
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1175107 Bug ID: 1175107 Summary: mutt: nametemplate in mailcap not working Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: screening-team-bugs@suse.de Reporter: P.Suetterlin@royac.iac.es QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- I'm using mutt as mail client. As sometimes HTML attachments are only usable via a real browser :( I added an entry in my .mailcap, following the mutt documentation: text/html; vivaldi '%s'; nametemplate=%s.html; test=test -n "$DISPLAY" (the reason for the nametemplate is that vivaldi only renders files if they end in .html) With this, mutt saves the file as /tmp/mutt-<host>-<UID>-<PID>-<random> and then calls "vivaldi /tmp/mutt.html" which of course results in a 'file not found' :(( I have also tried nametemplate='%s'.html That expands to /tmp/_mutt_.html Without the nametemplate definition it properly starts vivaldi with the correct file name (but it isn't rendered then....) mutt-1.14.4 on TW 20200804 -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1175107 http://bugzilla.opensuse.org/show_bug.cgi?id=1175107#c1 --- Comment #1 from Dr. Werner Fink <werner@suse.com> --- Why this a bug of mutt? -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1175107 http://bugzilla.opensuse.org/show_bug.cgi?id=1175107#c2 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #2 from Dr. Werner Fink <werner@suse.com> --- You might also miss auto_view text/html in your personal ~/.muttrc ... or likewise alternativeview_order text/plain text/html or alternativeview_order text/html text/plain or set implicit_autoview=yes last one is a bad idea as it might follow bad links Also otherwise F1 is you friend within mutt ... also don't foget `copiousoutput` ... see manual page mailcap(4) -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1175107 http://bugzilla.opensuse.org/show_bug.cgi?id=1175107#c3 --- Comment #3 from Dr. Werner Fink <werner@suse.com> --- Btw: My entry for html looks like this ``` text/html; w3m -no-cookie -no-proxy -F -T text/html -I %{charset} -dump %s ;\ nametemplate=%s.html;\ x-mozilla-flags=internal;\ test=test -n "$DISPLAY"; copiousoutput ``` Works with auto_view text/html flawless: ``` [-- Autoview using w3m -no-cookie -no-proxy -F -T text/html -I 'UTF-8' -dump '/suse/werner/Mail/tmp/mutt.html' --] ``` OK I use also set tmpdir=~/Mail/tmp in my ~/muttrc -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1175107 http://bugzilla.opensuse.org/show_bug.cgi?id=1175107#c4 --- Comment #4 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- Hmm, mixed experience: - first issue was it does need 'needterminal', else the file gets deleted again right away, as the call opens the file in an existing browser window and returns, which is why I couldn't see it. My fault. - with needsterminal and nametemplate=%s.html, it saves the file as /tmp/mutt.html, without any host/user unification and number randomization, which does look like a security issue? At least it would fail miserably on multiuser systems, or even with two mutt sessions of one user.... The mailcap setup itself is fine, it uses text/plain or the w3m pipe for autoview of mails, in detail view 'Enter' also uses the w3m pipe for html, and I use 'm' to call the external browser entry. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1175107 http://bugzilla.opensuse.org/show_bug.cgi?id=1175107#c5 --- Comment #5 from Dr. Werner Fink <werner@suse.com> --- (In reply to Peter Sütterlin from comment #4)
Hmm, mixed experience:
- first issue was it does need 'needterminal', else the file gets deleted again right away, as the call opens the file in an existing browser window and returns, which is why I couldn't see it. My fault.
- with needsterminal and nametemplate=%s.html, it saves the file as /tmp/mutt.html, without any host/user unification and number randomization, which does look like a security issue? At least it would fail miserably on multiuser systems, or even with two mutt sessions of one user....
Without nametemplate=%s.html I see something like this [-- Autoview using w3m -no-cookie -no-proxy -F -T text/html -I 'UTF-8' -dump '/suse/werner/Mail/tmp/mutt-boole-223-27227-4893549781887054105' --] together with set tmpdir.
The mailcap setup itself is fine, it uses text/plain or the w3m pipe for autoview of mails, in detail view 'Enter' also uses the w3m pipe for html, and I use 'm' to call the external browser entry.
-- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1175107 http://bugzilla.opensuse.org/show_bug.cgi?id=1175107#c6 --- Comment #6 from Peter Sütterlin <P.Suetterlin@royac.iac.es> --- Yes, *without* nametemplate my filename also is /tmp/mutt-woodstock-1000-11933-1206042331875854250 which is multisession- and multiuser-safe, and not predictable. But that secure name generation seems bypassed when using nametemplate, reducing %s to just 'mutt'. -- You are receiving this mail because: You are on the CC list for the bug.
![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
http://bugzilla.opensuse.org/show_bug.cgi?id=1175107 http://bugzilla.opensuse.org/show_bug.cgi?id=1175107#c7 --- Comment #7 from Dr. Werner Fink <werner@suse.com> --- (In reply to Peter Sütterlin from comment #6)
Yes, *without* nametemplate my filename also is
/tmp/mutt-woodstock-1000-11933-1206042331875854250
which is multisession- and multiuser-safe, and not predictable. But that secure name generation seems bypassed when using nametemplate, reducing %s to just 'mutt'.
If think this is a bug then report it upstream, maybe you have more luck to get this changed. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com