MAILCAP.ORDER(5)
π MAILCAP.ORDER β the mailcap ordering specs, bestie edition
okay so real talk, this is mailcap.order from section 5 of the manual (the file-formats girlies know), and it lives at /etc/mailcap.order. It's giving "let me control the vibes of your mailcap file" and honestly? Iconic. β¨
πΈ NAME πΈ
/etc/mailcap.order β the mailcap ordering specifications
π DESCRIPTION π
So here's the tea, bestie: the order of entries in the /etc/mailcap file can be altered by editing the /etc/mailcap.order file. Yes, literally just by editing it. No cap. π«Ά
Every single line of that file specifies a package and an optional mime type. Mailcap entries that match will be placed in the order of this file. Entries that don't match? They get placed later. Sorry babes, no line-skipping. π
π Example π
mime-support:*/*
gv:application/postscript
netscape:text/html
less:text/*
emacs:text/*
So what does all that do? Let me break it down:
- The above would make any entries provided by the
mime-supportpackage (as found in the/usr/lib/mime/packagesdirectory) take priority over everything else. Main character energy fr fr. π - The
gvpackage will be used over anything else when it comes to postscript documents. - Netscape will be used for any html documents, and
lesswill be used for any remaining text documents. - However β and this is the plot twist π β since neither netscape or less provide for editing documents, any edit or compose actions will fall through to the
emacsrules.
After modifying this file, be sure to run/usr/sbin/update-mime(as root) to propagate the changes into the/etc/mailcapfile. Don't forget this step or your changes are just vibes with no follow-through. π
Also remember, bestie: this file takes package names and not executable names. If you want to define rules that reference specific programs, the best way is to include them in ~/.mailcap or the user section of the /etc/mailcap file. iykyk π
π LIMITATIONS π
ngl, there are some things this file just cannot do yet:
- There is currently no way to break out a certain type from a wildcard rule. If, for example, both
xvandgimpwere to specify"image/*"rules, it isn't possible to usexvfor gif images but usegimpfor jpeg images. Painful. Devastating. Not slay. π - Also, I would like to add the ability to specify certain actions in the rules. For example, if netscape were to have an edit rule but I wanted to use
emacsfor editing/creating html documents, I could place a line like
emacs:text/* action=edit|compose
before the netscape entry. The update-mime program would then spit out entries such that the netscape view rule comes before the emacs view rule, but have the netscape edit rule come after the emacs edit rule. Chef's kiss ordering, honestly. β¨
π¦ SEE ALSO π¦
π AUTHOR π
The mailcap.order specification was written by Brian White <bcwhite@pobox.com> β shoutout to the icon who made this whole thing happen. π
and that's the whole page, bestie!! π this came to you from the Debian Project, dated 16th Aug 1998, and it's the MAILCAP.ORDER(5) page in all its glory. go forth and order your mailcap entries, you absolute legend π«Άβ¨
π¦ where this page comes from
- debian bookworm: mailcap 3.70+nmu1 Β· ad-hoc
- debian trixie: mailcap 3.74 Β· ad-hoc
- ubuntu jammy: mailcap 3.70+nmu1ubuntu1 Β· ad-hoc
- ubuntu jammy: mailcap 3.70+nmu1ubuntu1.22.04.1 Β· ad-hoc
- ubuntu noble: mailcap 3.70+nmu1ubuntu1 Β· ad-hoc
- ubuntu noble: mailcap 3.70+nmu1ubuntu1.24.04.1 Β· ad-hoc
- ubuntu questing: mailcap 3.74ubuntu1
- ubuntu questing: mailcap 3.74ubuntu1.1
- ubuntu resolute: mailcap 3.75ubuntu1 Β· ad-hoc
- ubuntu resolute: mailcap 3.75ubuntu1.1 Β· ad-hoc
- ubuntu stonking: mailcap 3.77ubuntu1 Β· ad-hoc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms