summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1999-01-13 12:14:58 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1999-01-13 12:14:58 +0000
commit35ac9d41053280ddd6b7f8e252ff41b77afb1fe6 (patch)
tree7943ede9ed053f25fe78c7d6293e9549f33ff30e /mail
parent- Upgrade to Apache 1.3.4 (diff)
handle -- sendmail arg
Notes
Notes: svn path=/head/; revision=16032
Diffstat (limited to 'mail')
-rw-r--r--mail/premail/Makefile4
-rw-r--r--mail/premail/files/patch-aa110
2 files changed, 56 insertions, 58 deletions
diff --git a/mail/premail/Makefile b/mail/premail/Makefile
index dd5553394b46..6f0acbf86d40 100644
--- a/mail/premail/Makefile
+++ b/mail/premail/Makefile
@@ -5,7 +5,7 @@
# Date created: 31 Jan 1997
# Whom: ache
#
-# $Id: Makefile,v 1.10 1998/10/06 15:15:22 ache Exp $
+# $Id: Makefile,v 1.11 1998/10/07 10:14:36 ache Exp $
#
DISTNAME= premail-0.46
@@ -25,7 +25,7 @@ RESTRICTED= "Author treats it as ITAR subject"
post-patch:
cd ${WRKSRC}; \
cp premail premail.old; \
- sed 's=%PERL5%=${PERL}=' < premail.old > premail
+ sed 's=#!/usr/local/bin/perl=#!${PERL} -w=' < premail.old > premail
do-install:
cd ${WRKSRC} && ${INSTALL_SCRIPT} premail ${PREFIX}/bin
diff --git a/mail/premail/files/patch-aa b/mail/premail/files/patch-aa
index b503fa5bb7af..ff20c1b4314f 100644
--- a/mail/premail/files/patch-aa
+++ b/mail/premail/files/patch-aa
@@ -1,11 +1,5 @@
--- premail.orig Sat Oct 25 02:19:07 1997
-+++ premail Tue Oct 6 18:59:57 1998
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/perl
-+#!%PERL5% -w
- #
- # premail, an e-mail privacy package
- #
++++ premail Wed Jan 13 14:49:50 1999
@@ -85,8 +85,11 @@
$config{'rlist-valid'} = 300;
@@ -50,8 +44,12 @@
# Newer BSD-based systems
(-x '/usr/sbin/sendmail') && return '/usr/sbin/sendmail';
# Okay, I give up
-@@ -308,6 +316,12 @@
+@@ -306,8 +314,16 @@
+ } elsif (/^\-oe(.)$/) {
+ $error_mode = $1;
if ($1 =~ /^[mwpqe]$/) { push (@sendmail_args, $_); }
++ } elsif (/^\--$/) {
++ ; #end of sendmail args
} elsif (/^\-od(.)$/) {
push (@sendmail_args, $_);
+ } elsif (/^\-[BNRV].+$/) {
@@ -63,7 +61,7 @@
} elsif (/^\-f$/) {
if ($#_ < 0) { &error ("$_ option needs an argument\n"); }
shift; # discard
-@@ -363,7 +377,7 @@
+@@ -363,7 +379,7 @@
&apply_cmdline_configs ();
if ($config{'preferences'}) {
$preferences = &tilde_expand ($config{'preferences'});
@@ -72,7 +70,7 @@
while (<PREF>) {
if (/^\s*\$config\{\"([^\"]+)\"\}\s*\=\s*\"([^\"]*)\"/
|| /^\s*\$config\{\'([^\']+)\'\}\s*\=\s*\'([^\']*)\'/) {
-@@ -371,10 +385,11 @@
+@@ -371,10 +387,11 @@
}
}
close (PREF);
@@ -85,7 +83,7 @@
while (<ADDR>) {
if (/^([\w\-\_\+\.\@\!]+)\:\s*(.*)$/) {
$recip = &strip_address ($1);
-@@ -382,6 +397,7 @@
+@@ -382,6 +399,7 @@
}
}
close (ADDR);
@@ -93,7 +91,7 @@
}
if ($config{'logfile'}) {
open (LOG, '>>'.&tilde_expand_mkdir ($config{'logfile'}));
-@@ -413,6 +429,7 @@
+@@ -413,6 +431,7 @@
if (!open (IN, $editfile)) {
&error ("cannot open edit file $editfile\n");
}
@@ -101,7 +99,7 @@
return 1;
} elsif ($dashbs) {
# do simple SMTP
-@@ -463,7 +480,9 @@
+@@ -463,7 +482,9 @@
@in_headers = ();
for ($lineno = 0;;$lineno++) {
@@ -112,7 +110,7 @@
if ($handle_from && $lineno == 0 && $line =~ /^From /) {
return $line;
}
-@@ -495,16 +514,16 @@
+@@ -495,16 +516,16 @@
my $line;
if ($edit || $post) {
@@ -132,7 +130,7 @@
return $line;
}
-@@ -516,6 +535,7 @@
+@@ -516,6 +537,7 @@
# }
if ($edit || $post) {
close (IN);
@@ -140,7 +138,7 @@
} elsif ($dashbs) {
print "250 Message accepted for delivery\n";
$more_input = 1;
-@@ -600,10 +620,7 @@
+@@ -600,10 +622,7 @@
# suppress cmdline remailers in -t mode; sendmail 8.6.8 manpage '-t'
if ($dasht) {
@@ -152,7 +150,7 @@
}
@recips = ();
-@@ -1268,7 +1285,7 @@
+@@ -1268,7 +1287,7 @@
my ($body, @the_recips) = @_;
my ($key_type, $key);
my (@keys);
@@ -161,7 +159,7 @@
my (@mime_fields, $prefix, $boundary);
my ($sign_type, $sign);
my ($invoc, $errfile);
-@@ -1354,7 +1371,7 @@
+@@ -1354,7 +1373,7 @@
my ($body, @the_recips) = @_;
my ($key_type, $key);
my (@keys);
@@ -170,7 +168,7 @@
my (@mime_fields, $prefix);
my ($sign_type, $sign);
my ($invoc, $errfile);
-@@ -1487,6 +1504,16 @@
+@@ -1487,6 +1506,16 @@
} else {
$num_shuf = 3;
}
@@ -187,7 +185,7 @@
foreach $hop (@chain) {
if ($hop =~ /^\d+$/) {
for ($i = 0; $i < $hop; $i++) {
-@@ -1498,8 +1525,14 @@
+@@ -1498,8 +1527,14 @@
|| &member ('eric', @options))) {
next;
}
@@ -204,7 +202,7 @@
if ($config{'encrypt'} &&
(&member ('pgp', @options)
|| &member ('pgp.', @options))) {
-@@ -1511,7 +1544,8 @@
+@@ -1511,7 +1546,8 @@
|| &member ('pgponly', @options)) { next; }
if ($config{'no-middle'}
&& &member ('middle', @options)) { next; }
@@ -214,7 +212,7 @@
if (&member ('filter', @options)) { $score -= 10; }
if (&member ('mon', @options)) { $score -= 10; }
if ($#new_chain < 0 && !$erb
-@@ -1687,7 +1721,7 @@
+@@ -1687,7 +1723,7 @@
}
}
if ($put_open) { close (PUT); }
@@ -223,7 +221,7 @@
}
}
-@@ -1817,7 +1851,7 @@
+@@ -1817,7 +1853,7 @@
}
}
push (@deliver_headers, "To\: $new_to\n");
@@ -232,7 +230,7 @@
$hash = "$1\n".$hash;
$body = &cat_tail ($body, "\*\*\n");
}
-@@ -2214,7 +2248,7 @@
+@@ -2214,7 +2250,7 @@
# we know it's sendmail
$invoc = &bin_sendmail ();
if ($#sendmail_args >= 0) {
@@ -241,7 +239,7 @@
}
$invoc .= ' -oi';
foreach $recip (@the_recips) {
-@@ -2252,11 +2286,11 @@
+@@ -2252,11 +2288,11 @@
&close_body ($body);
if ($post) {
close (DELIVER);
@@ -257,7 +255,7 @@
unlink $tmpfile;
} elsif ($edit && !$prezilla) {
close (DELIVER);
-@@ -2441,6 +2475,7 @@
+@@ -2441,6 +2477,7 @@
}
$strip =~ s/^\s+//s;
$strip =~ s/\s+$//s;
@@ -265,7 +263,7 @@
return ($strip, $caret);
}
-@@ -2801,6 +2836,7 @@
+@@ -2801,6 +2838,7 @@
# (@new_dict) = &delete_field ($key, @dict)
my ($key, @dict) = @_;
my (@new_dict);
@@ -273,7 +271,7 @@
@new_dict = ();
foreach $field (@dict) {
-@@ -2972,8 +3008,8 @@
+@@ -2972,8 +3010,8 @@
$data = '';
if (open (ERRFILE, $file)) {
@@ -283,7 +281,7 @@
$data .= $_;
}
close (ERRFILE);
-@@ -3040,7 +3076,7 @@
+@@ -3040,7 +3078,7 @@
$pass = '';
}
if ($pubring) { $invoc .= ' +pubring='.&shell_quote ($pubring); }
@@ -292,7 +290,7 @@
if ($sign) {
$invoc .= 's -u '.&shell_quote ($signuser);
&load_secrets ();
-@@ -3126,7 +3162,7 @@
+@@ -3126,7 +3164,7 @@
$signuser = '0x';
$pass = '';
}
@@ -301,7 +299,7 @@
$invoc .= ' -u '.&shell_quote ($signuser);
unless (defined $pass) {
if (defined $pgppass{$signuser}) {
-@@ -3182,7 +3218,7 @@
+@@ -3182,7 +3220,7 @@
$signuser = '0x';
$pass = '';
}
@@ -310,7 +308,7 @@
$invoc .= ' -u '.&shell_quote ($signuser);
unless (defined $pass) {
if (defined $pgppass{$signuser}) {
-@@ -3238,7 +3274,7 @@
+@@ -3238,7 +3276,7 @@
return ($mimefile, $err, $boundary);
}
@@ -319,7 +317,7 @@
sub pgp_decrypt {
# ($out_body, $err) = &pgp_decrypt ($body, $pass)
# Try to decrypt $body using passphrase $pass. $out_body is null on error.
-@@ -3251,7 +3287,7 @@
+@@ -3251,7 +3289,7 @@
$outfile = &tmp_filename ();
$errfile = &tmp_filename ();
$invoc = &tilde_expand ($config{'pgp'});
@@ -328,7 +326,7 @@
$invoc .= " +pubring=$PUBRING" if $PUBRING;
$invoc .= " +secring=$SECRING" if $SECRING;
# if ($pass =~ /^RING$;/) {
-@@ -3299,7 +3335,7 @@
+@@ -3299,7 +3337,7 @@
$errfile = &tmp_filename ();
$invoc = &tilde_expand ($config{'pgp'});
@@ -337,7 +335,7 @@
$invoc .= ' '.$pgp_file;
$invoc .= ' '.$signed_file;
$invoc .= ' > '.$errfile.' 2>&1';
-@@ -3390,7 +3426,7 @@
+@@ -3390,7 +3428,7 @@
$chars_needed = 2 + sprintf ("%d", $bits / 8);
&pdv ($config{'pgp'}." +makerandom=$chars_needed $outf"
." >/dev/null 2>&1\n");
@@ -346,7 +344,7 @@
." >/dev/null 2>&1";
&pdv ($status."\n");
if (!$status) {
-@@ -3626,11 +3662,14 @@
+@@ -3626,11 +3664,14 @@
$errfile = &tmp_filename ();
$invoc = &tilde_expand ($config{'pgp'});
@@ -362,7 +360,7 @@
$status = &open_pgp ($invoc, $pass, '');
$err = &read_and_delete ($errfile);
&pdv ($err);
-@@ -3647,7 +3686,7 @@
+@@ -3647,7 +3688,7 @@
unlink $ps_pgp;
}
$invoc = &tilde_expand ($config{'pgp'});
@@ -371,7 +369,7 @@
$invoc .= ' < '.$ps;
$invoc .= ' > '.$ps_pgp;
$invoc .= ' 2> '.$errfile;
-@@ -3910,7 +3949,8 @@
+@@ -3910,7 +3951,8 @@
&replace_field ('Content-Type: text/plain; charset='
.$config{'charset'}."\n",
@deliver_headers);
@@ -381,7 +379,7 @@
# Should we detect other charsets which are supersets of us-ascii?
if (!$mv_present) {
push (@deliver_headers, 'MIME-Version: 1.0'."\n");
-@@ -3923,7 +3963,8 @@
+@@ -3923,7 +3965,8 @@
}
}
# must deal with existing cte, charset, etc.
@@ -391,7 +389,7 @@
# Do the QP
&pdv ("Doing QP encoding!\n");
if (!$mv_present) {
-@@ -4336,6 +4377,8 @@
+@@ -4336,6 +4379,8 @@
exit 0;
}
@@ -400,7 +398,7 @@
sub decode_msg {
# &decode_msg ($msg)
# This is possibly the ugliest function in all of premail. Most of it is
-@@ -5129,7 +5172,7 @@
+@@ -5129,7 +5174,7 @@
&load_secrets ();
foreach (keys %pgpring) {
my ($tpr, $tsr) = &makerings ($pgpring{$_});
@@ -409,7 +407,7 @@
#filecat ($tpr, $pr);
filecat ($tsr, $sr);
&delete_tmpfile ($tpr);
-@@ -5157,12 +5200,12 @@
+@@ -5157,12 +5202,12 @@
# &pdv ('&makerings ("'.join ('", "', @_)."\")\n");
foreach ([$pr, $pk], [$sr, $sk]) {
open TMP, ">$$_[0]";
@@ -424,7 +422,7 @@
. "$id $pr $pubring 2>&1";
&pdv ("$invoc > /dev/null\n");
system "$invoc > /dev/null";
-@@ -5189,7 +5232,7 @@
+@@ -5189,7 +5234,7 @@
$outfile = &tmp_filename ();
$errfile = &tmp_filename ();
$invoc = &tilde_expand ($config{'pgp'});
@@ -433,7 +431,7 @@
$invoc .= " +pubring=$pr +secring=$sr ";
$invoc .= $cmd;
$invoc .= ' < ' . $infile if $infile;
-@@ -5248,7 +5291,7 @@
+@@ -5248,7 +5293,7 @@
EOF
<STDIN>;
@@ -442,7 +440,7 @@
print STDERR "\nKey generation failed.\n";
&killbaks ($pr, $sr);
&delete_open_tmpfiles ();
-@@ -5272,7 +5315,7 @@
+@@ -5272,7 +5317,7 @@
foreach $a ("$kid $pr",
"$remid $pr " . &tilde_expand ($config{'pubring'}),
"$kid $sr $defsr") {
@@ -451,7 +449,7 @@
# print STDERR "+ $invoc\n";
my $result = `$invoc`;
unless ($result =~ /^Key extracted/m) {
-@@ -5300,7 +5343,7 @@
+@@ -5300,7 +5345,7 @@
EOF
<STDIN>;
@@ -460,7 +458,7 @@
# print STDERR "+ $invoc\n";
if (system ($invoc)) {
print STDERR "Edit failed.\n";
-@@ -5495,6 +5538,7 @@
+@@ -5495,6 +5540,7 @@
}
}
}
@@ -468,7 +466,7 @@
if ($#args >= 1) {
$to = $args[1];
} elsif ($#args < 0) {
-@@ -5609,7 +5653,6 @@
+@@ -5609,7 +5655,6 @@
$fullname = &query ('Full name of pseudonym (not just '
. 'E-mail address)', $fullname);
$fullname =~ s/[\'\^\n]//g; # kludge for secrets file
@@ -476,7 +474,7 @@
$signsend = &query ('Sign mail with (R)emailer key, '
. '(P)seudonym key or (N)o key?',
$signsend);
-@@ -5652,7 +5695,7 @@
+@@ -5652,7 +5697,7 @@
}
# print "Here's the encrypted block:\n";
# system "cat $replyblock_fn";
@@ -485,7 +483,7 @@
if (&member ('newnym', @options)) {
$secret = "\$nym\{\'$time\,$remailer\=$nym\'\} \= ".
"\'chain=$chain\^to=$to^"
-@@ -5771,6 +5814,7 @@
+@@ -5771,6 +5816,7 @@
if (!open (IN, $body)) {
&error ("Internal error opening replyblock\n");
}
@@ -493,7 +491,7 @@
@in_headers = ("To: $to\n");
push (@in_headers, "Chain: $chain\n") if $chain;
$header_sep = "\n";
-@@ -5784,6 +5828,7 @@
+@@ -5784,6 +5830,7 @@
}
&send_group ($groups[0]);
close (IN);
@@ -501,7 +499,7 @@
}
sub find_nym {
-@@ -5997,7 +6042,7 @@
+@@ -5997,7 +6044,7 @@
# The main loop
$quit = 0;
@@ -510,7 +508,7 @@
while (!$quit) {
$rin = $win = $ein = '';
vec ($rin, fileno(STDIN), 1) = 1 unless $ineof;
-@@ -6315,7 +6360,7 @@
+@@ -6315,7 +6362,7 @@
# Open a Web connection for the file as file handle WWW.
my ($url) = @_;
my ($host, $port, $suf);
@@ -519,7 +517,7 @@
my ($name, $proto);
my ($that);
my ($savesel, $gotsep);
-@@ -6330,7 +6375,7 @@
+@@ -6330,7 +6377,7 @@
$host = $1;
$port = $2;
$suf = $3;
@@ -528,7 +526,7 @@
else { $port = 80; }
($fqdn, $aliases, $type, $len, $thataddr) = gethostbyname ($host);
return &pdv ("Host not found: $host\n") if ($thataddr eq '');
-@@ -6345,7 +6390,7 @@
+@@ -6345,7 +6392,7 @@
unpack ('C4', $thataddr), $port));
eval {
$SIG{'ALRM'} = sub { die "Timeout error on $url\n" };
@@ -537,7 +535,7 @@
# bind(WWW, $this) || &die_disarm ("bind: $!\n");
# &pdv ("bound the socket...\n");
connect(WWW, $that) || &die_disarm ("connect: $!\n");
-@@ -6368,6 +6413,21 @@
+@@ -6368,6 +6415,21 @@
};
if ($@) { return &pdv ($@); }
return &pdv ("No response from server\n") unless $gotsep;