'\" t .\" .\" .\" Title: makemime .\" Author: Sam Varshavchik .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 08/28/2025 .\" Manual: Double Precision, Inc. .\" Source: Courier Mail Server .\" Language: English .\" .TH "MAKEMIME" "1" "08/28/2025" "Courier Mail Server" "Double Precision, Inc\&." .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" makemime \- Create MIME\-formatted messages .SH "SYNOPSIS" .HP \w'\fBmakemime\fR\ 'u \fBmakemime\fR [\fIoptions\fR...] .HP \w'\fBmakemime\fR\ 'u \fBmakemime\fR [@\fIfilename\fR] .SH "DESCRIPTION" .PP \fBmakemime\fR creates MIME\-formatted messages of arbitrary complexity\&. \fBmakemime\fR reads one or more individual files, MIME\-encodes them, adds basic MIME headers, and adds any additional headers specified by command line options\&. The result is saved to another file or standard output\&. Complex MIME\-formatted messages are created by piping together multiple instances of \fBmakemime\fR\&. Advanced options direct \fBmakemime\fR to \fBfork\fR() itself, and handle the details of setting up all the pipelines\&. .PP In most cases, options for \fBmakemime\fR come directly from the command line\&. @filename reads the options from a file\&. "@&\fIn\fR" reads options from a pipe on file descriptor #\fIn\fR\&. "@\-" is a shortcut for "@&0", which reads options from standard input\&. .PP When options are read from a file or a pipe, each option must be on a line by itself\&. If an option requires an argument, the argument must follow on the next line\&. .PP For readability, leading whitespace is deleted when options are read from a file or a pipe\&. Empty lines are also ignored, as well as lines that begin with the \*(Aq#\*(Aq character\&. .PP Options and their arguments may contain characters that are special characters to the shell, such as \*(Aq(\*(Aq and \*(Aq)\*(Aq\&. These characters must be backslashed when specified on the command line, to avoid their special meaning to the shell\&. These characters MUST NOT be backslashed when options are read from a file or a pipe\&. Similarly, the contents of most headers nearly always include spaces\&. Therefore they must be quoted when specified on the command line\&. Header contents MUST NOT be quoted when options come from a file or a pipe\&. .PP \fBmakemime\fR reads the content to be formatted as a MIME message from some other file\&. The files can also be a pipe\&. It is possible to supply both the options and a file from the same pipe, by terminating the options list with a line containing the single character "\-"\&. The remainder of the pipe will be available to be used as an input file (which must be explicitly specified by one of the options)\&. Of course, only one input file can come from a single pipe\&. .PP For this to work the file with the option gets opened with a specific file descriptor, and then the options are read from that file descriptor: .sp .if n \{\ .RS 4 .\} .nf # Open options\&.txt on file descriptor 3, # then specify that options # are read from file descriptor 3\&. # Quote special shell character "&" makemime "@&3" 3