mime-construct-1.11/0002775000175000000620000000000011410446600014067 5ustar roderickstaffmime-construct-1.11/MANIFEST0000664000175000000620000000026006701320250015213 0ustar roderickstaff $Id: MANIFEST,v 1.1 1999-04-03 05:01:28 roderick Exp $ MANIFEST MANIFEST.SKIP Makefile.PL README debian/changelog debian/control debian/copyright debian/rules mime-construct mime-construct-1.11/MANIFEST.SKIP0000664000175000000620000000012106701320250015754 0ustar roderickstaff# $Id: MANIFEST.SKIP,v 1.1 1999-04-03 05:01:28 roderick Exp $ ,v$ ~$ ^Makefile$ mime-construct-1.11/Makefile.PL0000664000175000000620000000071110222611416016035 0ustar roderickstaff# $Id: Makefile.PL,v 1.2 2005-03-30 20:58:54 roderick Exp $ use ExtUtils::MakeMaker; WriteMakefile( EXE_FILES => ['mime-construct'], NAME => 'mime-construct', PREREQ_PM => { 'MIME::Base64' => 0, 'MIME::QuotedPrint' => 0, 'MIME::Types' => 0, 'Proc::WaitStat' => 0, }, VERSION_FROM => 'mime-construct', ); sub MY::dist_core { return q(dist:; @echo "use dpkg-buildpackge, not make dist" >&2; false); } mime-construct-1.11/README0000664000175000000620000000256006701320250014747 0ustar roderickstaffThis is the mime-construct distribution. mime-construct constructs and (by default) mails MIME messages. It is entirely driven from the command line, it is designed to be used by other programs, or people who act like programs. The change log is in debian/changelog. Other than this you'll probably want to ignore the contents of the debian subdirectory, it contains the files which turn the distribution into a Debian package. The program can be installed in the usual manner: perl Makefile.PL make install Roderick Schertler Copyright (C) 1999 Roderick Schertler. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. For a copy of the GNU General Public License write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/doc/copyright/GPL'. $Id: README,v 1.1 1999-04-03 05:01:28 roderick Exp $ mime-construct-1.11/mime-construct0000775000175000000620000006465211410446550017005 0ustar roderickstaff#!/usr/bin/perl -w use strict; # $Id: mime-construct,v 1.13 2010-06-23 18:07:36 roderick Exp $ # # Roderick Schertler # Copyright (C) 1999 Roderick Schertler # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or (at # your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # For a copy of the GNU General Public License write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # XXX # - set envelope sender # - don't always load bodies into memory? # - continue long header lines I construct use Proc::WaitStat qw(close_die); (my $Me = $0) =~ s-.*/--; my # new line required for makemaker $VERSION = '1.11'; my $Debug = 0; my $Exit = 0; my $Usage = < '--file-attach', '--body' => '--string', ); sub xwarndie_mess { my @mess = ("$Me: ", @_); $mess[$#mess] =~ s/:(?!\n)$/: $!\n/; return @mess; } sub xdie { die xwarndie_mess @_; } sub xwarn { warn xwarndie_mess @_; $Exit ||= 1; } sub usage { xwarn @_ if @_; die $Usage; } sub init { srand; } # Perform header continuation on STRING and return the result. sub cont { my $s = join '', @_; $s =~ s/\n(\S)/\n\t$1/g; return $s; } # Quote STRING as a MIME token and return the result. sub token_quote { my $s = shift; # XXX Characters \200-\377 aren't actually valid. if ($s =~ /[\040\000-\037\177\200-\377()<>@,;:\\\"\/\[\]?=]/) { $s =~ s/([\"\015\\])/\\$1/g; $s = qq["$s"]; } return $s; } # Choose an appropriate encoding for STRING and return it. If DESCRIBE_ONLY # is given, don't suggest an encoding that would actually change the data, # just return an encoding appropriate for what the data already is. sub choose_encoding { my ($s, $describe_only) = @_; return '7bit' if $s eq ''; # Use 7bit if possible. return '7bit' if $s !~ /[^\011\012\040-\176]/ # valid chars && $s =~ /\n\Z/ # trailing \n && $s !~ /[ \t]\n/ # no trailing spaces && $s !~ /^From /m # no "From " lines && $s !~ /^.{81,}$/m; # no long lines # If requested, just classify other data as either 8bit or binary, # don't suggest an actual encoding for it. if ($describe_only) { return '8bit' if $s !~ /[\x00\x0d]/ # no nulls or CRs && $s !~ /^.{999,}/m; # no long lines return 'binary'; } # QP can't represent a bytestream which lacks a trailing newline. return 'base64' unless $s =~ /\n\Z/; # Use QP if it's mostly ASCII. my $n = $s =~ tr/\000-\010\013-\037\200-\377//; return 'quoted-printable' if $n / length($s) < 0.25; return 'base64'; } # Given HER_ENCODING and STRING, encode and return the string (choosing # an encoding if none is specified). sub encode { my ($encoding, $s) = @_; my ($lc_encoding); $encoding = choose_encoding $s if $encoding eq ''; $lc_encoding = lc $encoding; if ($lc_encoding =~ /^(7bit|8bit|binary)$/) { # do nothing } elsif ($lc_encoding eq 'quoted-printable') { require MIME::QuotedPrint; $s = MIME::QuotedPrint::encode($s); # Escape /^From / to prevent an MTA from mangling it. $s =~ s/^From /=46rom /mg; } elsif ($lc_encoding eq 'base64') { require MIME::Base64; $s = MIME::Base64::encode($s); } else { xdie "invalid encoding $encoding\n"; } return $encoding, $s; } # Given REF (a reference to an array of strings) and SUBSTRING, return # false if the substring appears in any of the strings. sub try_boundary { my ($rpart, $boundary) = @_; for (@$rpart) { return 0 if index($_, $boundary) >= 0; } return 1; } # Given REF (a reference to an array of strings), return a string which # doesn't appear in any of the strings. sub choose_boundary { my ($rpart) = @_; # Try words from the built in dictionary to avoid yucky random # boundary strings. NB: This is destructive to @Word. for (my $try = 0; $try < 100 && @Word; $try++) { my $word = splice @Word, rand @Word, 1; if (try_boundary $rpart, $word) { return $word; } } # That failed, she's probably mailing me. Fall back to randomness. for (my $try = 0; $try < 100; $try++) { my $word = join '', map { $Alphabet[rand @Alphabet] } 0..9; if (try_boundary $rpart, $word) { return $word; } } xdie "can't find a reasonable boundary\n"; } { my $mts; sub choose_type { my ($path) = @_; $mts ||= do { require MIME::Types; MIME::Types->new(only_complete => 1) }; my $mt = $mts->mimeTypeOf($path) or return; return $mt->type; } } sub choose_attachment_name { my ($path) = @_; require File::Basename; return File::Basename::basename($path); } sub process { my @args = @_; if (@args == 1 && $args[0] eq '--version') { print "$Me $VERSION\n"; return 0; } my ($switch, $arg, $subject, @to, @cc, @bcc, $header, $part_header, $output, $subpart, $embedded_to, $encoding, @part, $type, $attach_name, @output, $multipart, $multipart_encoding, @recip, $prelude); $output = 0; $subpart = 0; $embedded_to = 0; $subject = ''; $header = ''; $prelude = ''; $multipart = 'multipart/mixed'; $multipart_encoding = '7bit'; # per-part $encoding = $part_header = $type = $attach_name = undef; while (@args) { $switch = shift @args; if (defined(my $s = $Switch_synonym{$switch})) { $switch = $s; } $switch =~ /^-/ or usage "invalid arg (non-switch) $switch\n"; # switches which don't take args if ($switch eq '--debug') { $Debug = 1; next; } elsif ($switch eq '--help') { usage; # not reached next; } elsif ($switch eq '--output') { $output = 1; next; } elsif ($switch eq '--subpart') { $subpart = $output = 1; next; } elsif ($switch eq '--embedded-to') { $embedded_to = 1; next; } elsif ($switch eq '--version') { print "$Me $VERSION\n"; xdie "--version specified with other switches\n"; } # switches which do take args @args or xdie "invalid trailing arg (invalid switch or arg needed) ", "$switch\n"; $arg = shift @args; if ($switch eq '--attachment') { $attach_name = $arg; } elsif ($switch eq '--bcc') { push @bcc, $arg; } elsif ($switch eq '--cc') { push @cc, $arg; } elsif ($switch eq '--encoding') { $encoding = $arg; } elsif ($switch eq '--header') { $header .= $arg; $header .= "\n" unless $header =~ /\n\Z/; } elsif ($switch eq '--multipart') { $multipart = $arg; } elsif ($switch eq '--part-header') { $part_header .= $arg; $part_header .= "\n" unless $part_header =~ /\n\Z/; } elsif ($switch eq '--prelude') { $prelude .= $arg; $prelude .= "\n" unless $prelude =~ /\n\Z/; } elsif ($switch eq '--subject') { $subject = $arg; } elsif ($switch eq '--to') { push @to, $arg; } elsif ($switch eq '--type') { $type = $arg; } elsif ($switch =~ /^--(subpart-)?(file(-auto|-attach)?|string)\z/) { my ($body, $actual_encoding); my $is_sub = ($switch =~ s/^--subpart-/--/); my $is_attach = $switch eq '--file-attach'; my $is_auto_type = $is_attach || $switch eq '--file-auto'; if ($switch eq '--string') { $body = $arg; } else { if ($is_auto_type) { $type = choose_type($arg) || $type || 'application/octet-stream'; } if ($is_attach) { $attach_name ||= choose_attachment_name $arg; } require FileHandle; # This will work with an arbitrarily weird file name, # but it will also allow 'zcat file.gz|' to work. my $fh = FileHandle->new($arg, 'r') || FileHandle->new($arg) || xdie "can't read $arg:"; { local $/; $body = <$fh>; } close_die $fh, $arg; } my $type_extra = ''; if (defined $attach_name) { $part_header .= "Content-Disposition: attachment; filename=" . token_quote($attach_name) . "\n"; # This might not be strictly safe (maybe a particular # type uses name to mean something else), but it's # required by some mail clients. $type_extra .= "; name=" . token_quote $attach_name; } my $p = defined $part_header ? $part_header : ''; if ($is_sub) { for ([$encoding, 'an encoding'], [$type, 'a type']) { defined $_->[0] and xdie "can't specify $_->[1] for input subparts\n"; } $actual_encoding = choose_encoding $body, 1; } else { $encoding = '' unless defined $encoding; $type = 'text/plain' unless defined $type; ($actual_encoding, $body) = encode $encoding, $body; $type .= $type_extra; $p .= cont "Content-Type: $type\n" unless $type =~ m|^\s* text/plain (?:\s* ; \s* charset=(\")?us-ascii\1)? \s*$|xi; $p .= cont "Content-Transfer-Encoding: $actual_encoding\n" unless lc($actual_encoding) eq '7bit'; $p .= "\n"; } if (lc($actual_encoding) eq 'binary') { $multipart_encoding = 'binary'; } elsif (lc($actual_encoding) eq '8bit') { $multipart_encoding = '8bit' unless $multipart_encoding eq 'binary'; } $p .= $body; push @part, $p; $encoding = $part_header = $type = $attach_name = undef; } else { xdie "invalid switch $switch\n"; } } defined $encoding and xdie "useless trailing --encoding\n"; defined $part_header and xdie "useless trailing --part-header\n"; defined $type and xdie "useless trailing --type\n"; # Don't choke if --prelude was specified but it turned out not to be # multipart, that's allowed. @recip = (@to, @cc, @bcc) or xdie "no recipients specified\n" unless $output || $embedded_to; unshift @recip, '-t' if $embedded_to; push @output, cont "To: ", join(", ", @to), "\n" if @to; push @output, cont "Cc: ", join(", ", @cc), "\n" if @cc; push @output, cont "Subject: $subject\n" if $subject ne ''; push @output, $header if $header ne ''; push @output, "MIME-Version: 1.0 ($Me $VERSION)\n" unless $subpart; # empty body if (@part == 0) { push @output, "\n"; } # single part elsif (@part == 1) { push @output, $part[0]; } # multipart else { push @part, $prelude; my $boundary = choose_boundary \@part; pop @part; push @output, cont "Content-Type: $multipart; boundary=" . token_quote($boundary) . "\n"; push @output, "Content-Transfer-Encoding: $multipart_encoding\n" unless $multipart_encoding eq '7bit'; push @output, "\n$prelude" if $prelude ne ''; for (@part) { push @output, "\n--$boundary\n"; push @output, $_; } push @output, "\n--$boundary--\n"; } # It's possible to wind up with a message with no trailing newline # (by explicitly giving an --encoding for a single part message # which lacks the trailing newline). Add the newline in that case. push @output, "\n" unless $output[-1] =~ /\n\Z/; my ($fh, $cmd); if ($output) { $fh = *STDOUT; $cmd = 'stdout'; } else { my $pid = open SENDMAIL, '|-'; defined $pid or xdie "can't fork:"; if (!$pid) { $ENV{PATH} = '/usr/local/bin:/bin:/usr/bin' if !defined $ENV{PATH}; $ENV{PATH} .= ':/usr/sbin:/usr/lib'; exec qw(sendmail -oi), @recip or xdie "can't run sendmail:"; } $fh = *SENDMAIL; $cmd = 'sendmail'; } { local $SIG{PIPE} = 'IGNORE'; for (@output) { print $fh $_ or xdie "error writing to $cmd:"; } } close_die $fh, $cmd; } sub main { init; process @ARGV; return 0; } $Exit = main || $Exit; $Exit = 1 if $Exit && !($Exit % 256); exit $Exit; __END__ =head1 NAME mime-construct - construct and optionally mail MIME messages =head1 SYNOPSIS B I... Sorry, it's hard to provide a meaningful synopsis. See the examples. =head1 DESCRIPTION B constructs and (by default) mails MIME messages. It is entirely driven from the command line, it is designed to be used by other programs, or people who act like programs. =head1 OPTIONS =head2 Global Settings =over 4 =item B<--debug> Turn debugging on. =item B<--help> Show the usage message and die. =item B<--output> Don't mail the generated message, print it to stdout instead. This loses B<--bcc> info. =item B<--subpart> Generate a subpart which can be used in another MIME message, rather than a top-level MIME message itself. This turns on B<--output> and changes some internal semantics a bit. See the examples. =item B<--version> Print the version and exit successfully, if this is the only arg. Otherwise, print the version and die. =back =head2 Main Header These arguments add text to the top-level header of the message, or control who it gets sent to. =over 4 =item B<--bcc> I
Add I
to the recipient list. This doesn't actually add anything to the header, of course. If you're not actually mailing the message (if you use B<--output> or B<--subpart>) B<--bcc> will have no effect. =item B<--cc> I
Add an address to the B list. =item B<--embedded-to> Send the message to the recipients already listed in the header, in addition to those given with B<--to>, B<--cc>, and B<--bcc>. This makes sense if you use the B<--header> switch to add your own B or B. In this case you probably don't want to use B<--to> or B<--cc> because they would create new headers rather than adding to the ones already in the message. This switch passes the B<-t> switch to sendmail (B doesn't try to parse the headers you provide), so it doesn't really do anything if you're not mailing the message. =item B<--header> I Add arbitrary text to the header. The I can be anything you like, including multiple lines. You can create invalid messages this way. If you include a blank line in the I you'll really screw up the message. =item B<--multipart> I This specifies the multipart content type and options. The default is C. Don't include a C setting, that's supplied by B. It's okay if you specify the B<--multipart> type but the message turns out to be a single part, the type you supply will just be ignored. =item B<--prelude> I This adds I to the multipart prelude text. If you specify B<--prelude> multiple times the Is will all be concatenated. There isn't any default for this text. It seems to me that nowadays adding an explanation of MIME to the beginning of a message is like explaining how to use a seat buckle to people who are riding in an airplane. It's okay if you specify the B<--prelude> but the message turns out to be a single part, the prelude you supply will just be ignored. =item B<--subject> I Specify the subject for the message. =item B<--to> I
Add an address to the B list. =back =head2 Per-part Header These switches control the per-part headers. If the message turns out not to be multipart they actually add data to the top level header. Each of these applies only to the next part output. After each part is output they are reset to their default values. It doesn't make sense to use them without a following part, so B will sputter and die if you try to do that. =over 4 =item B<--attachment> I This adds a C header with the given I as the value of the C attribute. It's just a convenience, since B is often used to send files as attachments. Using B<--attachment> I does not cause B to read any data from the file called I! It just uses that name in the header. The actual data which will go into this part of the message comes from one of the regular part output switches (given below). You might prefer to use the B<--file-attach> switch, which does read from the Id file. =item B<--encoding> I This specifies the type of encoding you want this part to use. You normally shouldn't use this switch, though. If this switch isn't used B will choose an appropriate encoding. The data you supply mustn't be encoded already, B will encode it according to the I you specify here. Valid encodings are B<7bit>, B<8bit>, B, B, and B. It's easy to generate an illegal MIME message by specifying the encoding yourself. =item B<--part-header> I Add arbitrary text to the per-part header. The I can be anything you like, including multiple lines. You can create invalid messages this way. If you include a blank line in the I you'll really screw up the message. =item B<--type> I Specify the content type for this part. If you don't specify a B<--type> it defaults to C. The I you supply can contain not only the type proper but also options. The whole thing will just be plopped onto the end of C and stuck into the header. You might prefer to use the B<--file-auto> or B<--file-attach> switches, which set the B<--type> automatically based on a file's name. =back =head2 Part Output These switches add data to the body of the message. You use one of these for each for each part of a multipart message (or just one of them if the message isn't to be multipart). =over 4 =item B<--file> I =item B<--file-auto> I =item B<--file-attach> I =item B<--attach> I =item B<--string> I =item B<--body> I Use the contents of the file I or the literal string I as the body of this part. B<--file-auto> causes the Content-Type to be set based on the file's name, if possible. B<--file-attach> does that and sets the B<--attachment> name as well. Be sure to include the trailing newline on I unless there really isn't supposed to be one. If you leave the trailing newline off the part will have to be encoded in C (because C has an artificial limitation which prevents it from being able to encode such a data stream). B<--attach> is an alias for B<--file-attach>, and B<--body> is an alias for B<--string>. =item B<--subpart-file> I =item B<--subpart-string> I Use either the contents of I or I itself as the body of this part, but treat it as a subpart. This means that the data contains both some headers and some text. It also means that you can't use B<--type> or B<--encoding> for this part. Normally the I or I will have been generated by a different invocation of B which was given the B<--subpart> switch. =back Arguments to switches which take a file name (such as B<--file> and B<--subpart-file>) can have some magic. If there is no file with the I supplied a regular Perl open() is done on it. See L<"EXAMPLES">. =head1 EXAMPLES The examples assume that $nl contains a newline. The other variables used are I hope self-explanatory. Send a simple message. mime-construct --to "$recip" --subject 'hi there' --string "$body" Send a message which is read from stdin. fortune | mime-construct --to "$recip" --subject fortune --file - Send a plain text part and attach a file, setting the file's content type and B<--attachment> name automatically. mime-construct --to "$recip" --subject "$file" \ --string "Here's the file I told you about.$nl" \ --file-attach "$file" Most people think of attachments as multipart messages, but they don't have to be. This generates a zip of all the files in the current directory and sends them as an attachment but as a single part message. zip -q - * | mime-construct --to "$recip" --subject 'zipped directory' \ --attachment dir.zip --type application/zip --file - You can use the full expressiveness of Perl's open() when constructing file names. Eg, you can run processes XXX bad examples, there's no file names mime-construct --to "$recip" --subject "$subject" \ --string "Here are those two files you wanted.$nl" \ --type application/x-gzip --attachment file1.gz --file 'gzip -c file1 |' \ --type application/x-gzip --attachment file1.gz --file 'gzip -c file2 |' or read from alternate file descriptors (C&=4> to read from file descriptor 4) or whatever. See L for a tutorial. Here's an example of using a separate invocation of B to create a subpart. This creates a message which has two parts at the top level. The first part is some text, the second part is a digest. The digest itself is a multipart message which contains a number of message/rfc822 parts. msg_args= for msg in $msg_list do msg_args="$msg_args --type message/rfc822 --file $msg" done set fnord for recip in $recip_list do set "$@" --bcc $recip done shift mime-construct --subpart --multipart multipart/digest $msg_args | mime-construct \ --header "To: Digest recipients:;$nl" \ --subject 'Foo digest' \ "$@" \ --file "$introduction" \ --subpart-file - Here is how to send an encrypted messages (multipart/encrypted, as defined in RFC 1847). You use B C<--subpart> to generate the real message you want to send (which can be kind of MIME message -- non-text, multi-part, what have you), then encrypt that and use another B to contruct and send the multipart/encrypted message which contains it. enc_type=application/pgp-encrypted enc_params="Version: 1$nl" mime-construct --subpart --file body --file-auto image.jpg | gpg --encrypt --armor -r "$recip" | mime-construct --output \ --to "$recip" \ --subject "$subject" \ --multipart "multipart/encrypted; protocol=\"$enc_type\"" \ --type "$enc_type" \ --string "$enc_params" \ --type application/octet-stream \ --file - =head1 BUGS The body of the message is always held in memory, so you can expect problems if you work with bodies which are large compared to the amount of memory you've got. =head1 AVAILABILITY The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ for updated versions. =head1 AUTHOR Roderick Schertler =cut mime-construct-1.11/debian/0002775000175000000620000000000011410446600015311 5ustar roderickstaffmime-construct-1.11/debian/TODO0000664000175000000620000000014011410446563016002 0ustar roderickstaff$Id: TODO,v 1.1 2010-06-23 18:07:47 roderick Exp $ - support for character encoding in headers mime-construct-1.11/debian/changelog0000664000175000000620000000341711410446552017174 0ustar roderickstaffmime-construct (1.11) unstable; urgency=low * Add --body and --attach aliases. -- Roderick Schertler Wed, 23 Jun 2010 14:04:40 -0400 mime-construct (1.10) unstable; urgency=low * Escape /^From / as "=46rom " in quoted-printable to prevent an MTA from mangling it (closes: #499398). * Bump Standards-Version to 3.8.0 (no changes). -- Roderick Schertler Thu, 19 Nov 2009 19:59:31 -0500 mime-construct (1.9) unstable; urgency=low * Add --file-auto which sets the --type based on the file's extention. * Add --file-attach which does --file-auto plus sets the --attach name. * Have --attachment set a name=$name in the Content-Type. This might not be strictly safe (maybe a particular type uses name to mean something else), but it's required by some mail clients. * Bump Standards-Version to 3.6.1 (bump debhelper version dependency). -- Roderick Schertler Wed, 30 Mar 2005 15:58:32 -0500 mime-construct (1.8-1) unstable; urgency=low * Don't install extraneous empty directories. -- Roderick Schertler Tue, 31 Jul 2001 10:50:52 -0400 mime-construct (1.8) unstable; urgency=low * Update to policy 3.5.2 (closes: #91005, #91587). * Update to latest Perl policy. -- Roderick Schertler Fri, 6 Apr 2001 22:59:21 -0400 mime-construct (1.7) unstable; urgency=low * Tiny documentation tweaks. * Simple updates for 3.0.0 standards. * Simple updates for new Perl policy. -- Roderick Schertler Thu, 15 Jul 1999 11:37:31 -0400 mime-construct (1.6) unstable; urgency=low * Initial version. -- Roderick Schertler Sat, 3 Apr 1999 00:11:48 -0500 $Id: changelog,v 1.8 2010-06-23 18:07:38 roderick Exp $ mime-construct-1.11/debian/control0000664000175000000620000000120111301367043016706 0ustar roderickstaffSource: mime-construct Section: mail Priority: optional Maintainer: Roderick Schertler Standards-Version: 3.8.0 Build-Depends: debhelper (>= 3.0.18), perl (>= 5.6.0-16), libmime-base64-perl, libmime-types-perl, libproc-waitstat-perl Package: mime-construct Architecture: all Depends: ${perl:Depends}, libmime-base64-perl, libmime-types-perl, libproc-waitstat-perl Description: construct/send MIME messages from the command line mime-construct constructs and (by default) mails MIME messages. It is entirely driven from the command line, it is designed to be used by other programs, or people who act like programs. mime-construct-1.11/debian/copyright0000664000175000000620000000151211301367043017243 0ustar roderickstaff$Id: copyright,v 1.3 2009-11-20 01:17:23 roderick Exp $ Copyright (C) 1999 Roderick Schertler. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. For a copy of the GNU General Public License write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. mime-construct-1.11/debian/rules0000775000175000000620000000261107331542742016402 0ustar roderickstaff#!/usr/bin/make -f # $Id: rules,v 1.4 2001-07-31 14:51:14 roderick Exp $ dt := debian/mime-construct prefix = `pwd`/$(dt) stamp_build := debian/stamp.build stamp_install := debian/stamp.install clean := $(stamp_build) $(stamp_install) ifneq "" "$(findstring debug,$(DEB_BUILD_OPTIONS))" CFLAGS += -g endif export DH_COMPAT := 3 PERL ?= perl build: $(stamp_build) $(stamp_build): dh_testdir $(PERL) Makefile.PL INSTALLDIRS=vendor $(MAKE) OPTIMIZE="-O2 -Wall $(CFLAGS)" $(MAKE) test touch $@ install: $(stamp_install) $(stamp_install): $(stamp_build) dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) install PREFIX=$(prefix)/usr find $(prefix) -depth -type d -print0 | \ xargs -0r rmdir --ignore-fail-on-non-empty touch $@ clean: dh_testdir dh_testroot [ ! -f Makefile ] || $(MAKE) realclean dh_clean $(clean) binary: binary-indep binary-arch binary-arch: binary-indep: $(stamp_install) dh_testdir dh_testroot # dh_installdebconf dh_installdocs dh_installexamples dh_installmenu # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_installinit dh_installcron dh_installman dh_installinfo # dh_undocumented dh_installchangelogs dh_link dh_strip dh_compress dh_fixperms # dh_makeshlibs dh_installdeb dh_perl dh_shlibdeps dh_gencontrol -u -isp dh_md5sums dh_builddeb .PHONY: build install clean binary-indep binary-arch binary mime-construct-1.11/debian/watch0000664000175000000620000000020010222611420016322 0ustar roderickstaff# $Id: watch,v 1.1 2005-03-30 20:58:56 roderick Exp $ version=2 http://www.argon.org/~roderick/mime-construct-(\d.*)\.tar\.gz