Getting Alpine on the Mac to Open Attachments in Firefox

I’ve been fighting this for a while: alpine can open links just fine in Firefox, but when it’s an attachment I want to open (like the HTML part of a message), it fails saying that Firefox is already running and it can’t run another instance. First, I enabled the Prefer Plain Text option. The results are typically nicer than the rendered HTML. It’s easy to see the internally rendered HTML anyway, just use the A key in the message viewer. Now, when an HTML attachment is being opened, the confusing thing is that is automagically associated with the text/html mime type. On a real Unix system, /etc/mailcap will be the config file that sets this up, but this doesn’t exist on the Mac – no idea how this works really. Fortunately, alpine allows me to configure my own mailcap path, which I set to ~/.mailcap. Then I created that file with this line inside:

text/html; /usr/bin/open %s

And voila – suddenly everything works just fine. Final hint: in the attachment list for a message, the A key can be used to show info about an attachment, including the command used to view it. This should show /usr/bin/open if everything is set up correctly.

Sorry, this blog does not support comments.

I used various blog hosting services since this blog was established in 2005, but unfortunately they turned out to be unreliable in the long term and comment threads were lost in unavoidable transitions. At this time I don't want to enable third-party services for comments since it has become obvious in recent years that these providers invariably monetize information about their visitors and users.

Please use the links in the page footer to get in touch with me. I'm available for conversations on Keybase, Matrix, Mastodon or Twitter, as well as via email.