MIMEFILTER(1)
π MIMEFILTER π
okay bestie, gather round, because this is the Debian GNU/Linux manual page for mimefilter and it is lowkey iconic. it's a little script that filters a MIME message and strips out the unwanted MIME parts. that's it. that's the whole vibe. π
β¨ NAME β¨
mimefilter β filter a MIME message, stripping out the unwanted MIME parts π§Ήβ¨
πΈ SYNOPSIS πΈ
mimefilter [OPTIONS]
π¦ DESCRIPTION π¦
so here's the tea: the mimefilter script accepts a MIME conforming message on STDIN, and outputs a MIME conforming message on STDOUT. simple. elegant. slay.
it strips out every unwanted MIME part, sends a warning email to the original author about it (yes, it snitches, but politely π), and then outputs a MIME compliant cleaned-up message β ready to be further processed by a mailing list software.
you will find this useful if you don't want certain attachments on your mailing lists, or if you want to allow just the text part from multipart/alternative messages, and so on. and the best part? you can easily fine tune the list of allowed MIME types to suit your particular needs, using normal Perl regexps. iykyk. π§
π OPTIONS π
the mimefilter script may take just one option, in either its short or its long form:
-h,--helpβ causes the script to print this very manpage and then successfully exit. π
but listen β the mimefilter script will not bark at you if it discovers you supplied some other options as well. it'll just politely ignore them. no drama. no cap. π«Ά
π ARGUMENTS π
the mimefilter script cheerfully takes an unlimited number of command line arguments and happily discards them all. like, every single one. gone. not a single thought. πβ¨
π FILES π
the mimefilter script will look for a system wide configuration file in:
/etc/mimefilter.rc
and for a local, per working directory, configuration file in:
./mimefilter.rc
the latter may be used to override any or all of the parameters defined by the former, which lets you do per mailing list customization super easily. obsessed. π
several configuration parameters are provided, the most important being:
- the list of admissible MIME types (where Perl regexps may be used)
- the list of never to be allowed ones
and because the two lists work together, you can even specify, e.g., 'text/.*' in the admissible types list and 'text/html' in the never to be allowed one β to allow every text part but html ones. periodt. π
see the default configuration file for examples of use and further documentation. π
π ENVIRONMENT π
the mimefilter script will look for the following environment variables:
listβ the name of the mailing list this message is intended for. used as the return address of the warning issued to the original author if the message is not already clean.
the Smartlist mailing list software will automatically pass this variable to mimefilter.
listaddrβ the address of the mailing list this message is intended for. used in theX-Loopfield of the warning issued to the original author if the message is not already clean.
the Smartlist mailing list software will automatically pass this variable to mimefilter.
listreqβ the administrative (owner) address of the mailing list this message is intended for. used in the return address of the warning issued to the original author if the message is not already clean.
the Smartlist mailing list software will automatically pass this variable to mimefilter.
maintainerβ the email address of the maintainer of the mailing list this message is intended for. if it is defined, it is used to send the maintainer original carbon copies of messages that have been modified by this filter β iffilter_mime_cc_maintaineris affirmative, of course.
the Smartlist mailing list software will automatically pass this variable to mimefilter.
filter_mime_cc_maintainerβ a boolean flag: if affirmative (i.e., if it matches the/y/iPerl regular expression), themimefilterscript will send carbon copies of every cleaned (modified) message to the maintainer of the mailing list the message is intended for. π
users of the Smartlist mailing list software may conveniently set this variable in rc.custom.
filter_mimeβ themimefilterscript itself will pay no attention to this variable, but if you have followed what the author suggests in the RECOMMENDED USE WITH THE SMARTLIST MAILING LIST SOFTWARE section, you will need to define it affirmative inrc.customto activate this script:
filter_mime = yes
β RETURN VALUE β
the mimefilter script returns 0 on success and a positive integer on errors. π«‘
π RECOMMENDED USE WITH THE SMARTLIST MAILING LIST SOFTWARE π
put the following lines in rc.local.s[012]0 (the right one just depends on your specific needs, look at rc.submit for more info):
:0
* filter_mime ?? y
{
# Pass the mail trough mimefilter
:0 fw
| mimefilter
# Executed if mimefilter died
:0 e
{
:0 hfw
| formail -A "X-Diagnostic: MIME filtering failed"
HOST=continue_with_rc.request
}
# Trash empty messages (author's already been warned by mimefilter)
:0 Bh
* < 1
/dev/null
}
also remember to uncomment the appropriate line in rc.custom, to activate rc.local.s[012]0, and don't forget to customize the list of admissible and never to be allowed MIME types in the configuration file(s). don't skip that part bestie, it's literally the whole point. π
πΈ USING THIS SCRIPT WITH OTHER MAILING LIST SOFTWARE πΈ
the author believes no particular arrangements are necessary to use this script with mailing list software other than Smartlist, although one should remember that mimefilter expects to find at least the list, listaddr, and listreq environment variables set. π
π₯ SEE ALSO π₯
- the Smartlist mailing list software documentation π
- the
mimefilter.rc(5)man page (yet to be written) β rip to that one, we're manifesting it π―οΈβ¨
π BUGS π
Naaa... ;-)
(no bugs, she's perfect, don't perceive her π)
π«Ά UNRESTRICTIONS π«Ά
this program is copylefted. refer to the GNU General Public License for conditions of use. π³οΈπ
π AUTHOR π
this program has been written and is actively maintained by Davide Giovanni Maria Salvetti, <salve@linux.it>. king behaviour honestly π
π§ HISTORY π§
this script was originally aimed for use with a bunch of Smartlist served mailing lists the author administers. he believes it can be successfully used with other mailing list softwares as well. glow-up arc fr fr β¨
okay bestie that's the whole page, you ate that π β this came to you from the Debian Project, version-dated 2025-12-16, and no you cannot escape the manpage footer, it lives in the sign-off now. mwah πππ¦
π¦ where this page comes from
- ubuntu resolute: mimefilter 1.8build1 Β· GPL-3.0-or-later
- ubuntu stonking: mimefilter 1.8build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms