diff options
author | ache <ache@FreeBSD.org> | 1998-10-06 20:01:18 +0800 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1998-10-06 20:01:18 +0800 |
commit | fc3962c79f09c481500a647fd09503de41575ce0 (patch) | |
tree | 20924a5b7425b261df3ed0028779ab9bc2349ea9 /mail/premail | |
parent | 27a3612b4cca5a699a582698dddd1897faed3718 (diff) | |
download | freebsd-ports-gnome-fc3962c79f09c481500a647fd09503de41575ce0.tar.gz freebsd-ports-gnome-fc3962c79f09c481500a647fd09503de41575ce0.tar.zst freebsd-ports-gnome-fc3962c79f09c481500a647fd09503de41575ce0.zip |
properly suppress cmadline recipients for -t
Diffstat (limited to 'mail/premail')
-rw-r--r-- | mail/premail/files/patch-aa | 96 |
1 files changed, 54 insertions, 42 deletions
diff --git a/mail/premail/files/patch-aa b/mail/premail/files/patch-aa index dd772aca5dc6..9bb78837519e 100644 --- a/mail/premail/files/patch-aa +++ b/mail/premail/files/patch-aa @@ -1,5 +1,5 @@ --- premail.orig Thu Oct 31 06:25:10 1996 -+++ premail Fri Oct 2 10:26:02 1998 ++++ premail Tue Oct 6 15:58:32 1998 @@ -1,4 +1,4 @@ -#!/usr/local/bin/perl +#!%PERL5% -w @@ -140,7 +140,19 @@ } elsif ($dashbs) { print "250 Message accepted for delivery\n"; $more_input = 1; -@@ -1268,7 +1288,7 @@ +@@ -600,10 +620,7 @@ + + # suppress cmdline remailers in -t mode; sendmail 8.6.8 manpage '-t' + if ($dasht) { +- foreach (@cmdline_recips) { +-# print ":".&strip_address($_).":\n"; +- $ealias{&strip_address($_)} = ''; +- } ++ @cmdline_recips = (); + } + + @recips = (); +@@ -1268,7 +1285,7 @@ my ($body, @the_recips) = @_; my ($key_type, $key); my (@keys); @@ -149,7 +161,7 @@ my (@mime_fields, $prefix, $boundary); my ($sign_type, $sign); my ($invoc, $errfile); -@@ -1354,7 +1374,7 @@ +@@ -1354,7 +1371,7 @@ my ($body, @the_recips) = @_; my ($key_type, $key); my (@keys); @@ -158,7 +170,7 @@ my (@mime_fields, $prefix); my ($sign_type, $sign); my ($invoc, $errfile); -@@ -1487,6 +1507,16 @@ +@@ -1487,6 +1504,16 @@ } else { $num_shuf = 3; } @@ -175,7 +187,7 @@ foreach $hop (@chain) { if ($hop =~ /^\d+$/) { for ($i = 0; $i < $hop; $i++) { -@@ -1498,8 +1528,14 @@ +@@ -1498,8 +1525,14 @@ || &member ('eric', @options))) { next; } @@ -192,7 +204,7 @@ if ($config{'encrypt'} && (&member ('pgp', @options) || &member ('pgp.', @options))) { -@@ -1511,7 +1547,8 @@ +@@ -1511,7 +1544,8 @@ || &member ('pgponly', @options)) { next; } if ($config{'no-middle'} && &member ('middle', @options)) { next; } @@ -202,7 +214,7 @@ if (&member ('filter', @options)) { $score -= 10; } if (&member ('mon', @options)) { $score -= 10; } if ($#new_chain < 0 && !$erb -@@ -1687,7 +1724,7 @@ +@@ -1687,7 +1721,7 @@ } } if ($put_open) { close (PUT); } @@ -211,7 +223,7 @@ } } -@@ -1817,7 +1854,7 @@ +@@ -1817,7 +1851,7 @@ } } push (@deliver_headers, "To\: $new_to\n"); @@ -220,7 +232,7 @@ $hash = "$1\n".$hash; $body = &cat_tail ($body, "\*\*\n"); } -@@ -2214,7 +2251,7 @@ +@@ -2214,7 +2248,7 @@ # we know it's sendmail $invoc = &bin_sendmail (); if ($#sendmail_args >= 0) { @@ -229,7 +241,7 @@ } $invoc .= ' -oi'; foreach $recip (@the_recips) { -@@ -2252,11 +2289,11 @@ +@@ -2252,11 +2286,11 @@ &close_body ($body); if ($post) { close (DELIVER); @@ -245,7 +257,7 @@ unlink $tmpfile; } elsif ($edit && !$prezilla) { close (DELIVER); -@@ -2441,6 +2478,7 @@ +@@ -2441,6 +2475,7 @@ } $strip =~ s/^\s+//s; $strip =~ s/\s+$//s; @@ -253,7 +265,7 @@ return ($strip, $caret); } -@@ -2801,6 +2839,7 @@ +@@ -2801,6 +2836,7 @@ # (@new_dict) = &delete_field ($key, @dict) my ($key, @dict) = @_; my (@new_dict); @@ -261,7 +273,7 @@ @new_dict = (); foreach $field (@dict) { -@@ -2972,8 +3011,8 @@ +@@ -2972,8 +3008,8 @@ $data = ''; if (open (ERRFILE, $file)) { @@ -271,7 +283,7 @@ $data .= $_; } close (ERRFILE); -@@ -3040,7 +3079,7 @@ +@@ -3040,7 +3076,7 @@ $pass = ''; } if ($pubring) { $invoc .= ' +pubring='.&shell_quote ($pubring); } @@ -280,7 +292,7 @@ if ($sign) { $invoc .= 's -u '.&shell_quote ($signuser); &load_secrets (); -@@ -3126,7 +3165,7 @@ +@@ -3126,7 +3162,7 @@ $signuser = '0x'; $pass = ''; } @@ -289,7 +301,7 @@ $invoc .= ' -u '.&shell_quote ($signuser); unless (defined $pass) { if (defined $pgppass{$signuser}) { -@@ -3182,7 +3221,7 @@ +@@ -3182,7 +3218,7 @@ $signuser = '0x'; $pass = ''; } @@ -298,7 +310,7 @@ $invoc .= ' -u '.&shell_quote ($signuser); unless (defined $pass) { if (defined $pgppass{$signuser}) { -@@ -3238,7 +3277,7 @@ +@@ -3238,7 +3274,7 @@ return ($mimefile, $err, $boundary); } @@ -307,7 +319,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 +3290,7 @@ +@@ -3251,7 +3287,7 @@ $outfile = &tmp_filename (); $errfile = &tmp_filename (); $invoc = &tilde_expand ($config{'pgp'}); @@ -316,7 +328,7 @@ $invoc .= " +pubring=$PUBRING" if $PUBRING; $invoc .= " +secring=$SECRING" if $SECRING; # if ($pass =~ /^RING$;/) { -@@ -3299,7 +3338,7 @@ +@@ -3299,7 +3335,7 @@ $errfile = &tmp_filename (); $invoc = &tilde_expand ($config{'pgp'}); @@ -325,7 +337,7 @@ $invoc .= ' '.$pgp_file; $invoc .= ' '.$signed_file; $invoc .= ' > '.$errfile.' 2>&1'; -@@ -3390,7 +3429,7 @@ +@@ -3390,7 +3426,7 @@ $chars_needed = 2 + sprintf ("%d", $bits / 8); &pdv ($config{'pgp'}." +makerandom=$chars_needed $outf" ." >/dev/null 2>&1\n"); @@ -334,7 +346,7 @@ ." >/dev/null 2>&1"; &pdv ($status."\n"); if (!$status) { -@@ -3626,11 +3665,14 @@ +@@ -3626,11 +3662,14 @@ $errfile = &tmp_filename (); $invoc = &tilde_expand ($config{'pgp'}); @@ -350,7 +362,7 @@ $status = &open_pgp ($invoc, $pass, ''); $err = &read_and_delete ($errfile); &pdv ($err); -@@ -3647,7 +3689,7 @@ +@@ -3647,7 +3686,7 @@ unlink $ps_pgp; } $invoc = &tilde_expand ($config{'pgp'}); @@ -359,7 +371,7 @@ $invoc .= ' < '.$ps; $invoc .= ' > '.$ps_pgp; $invoc .= ' 2> '.$errfile; -@@ -3910,7 +3952,8 @@ +@@ -3910,7 +3949,8 @@ &replace_field ('Content-Type: text/plain; charset=' .$config{'charset'}."\n", @deliver_headers); @@ -369,7 +381,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 +3966,8 @@ +@@ -3923,7 +3963,8 @@ } } # must deal with existing cte, charset, etc. @@ -379,7 +391,7 @@ # Do the QP &pdv ("Doing QP encoding!\n"); if (!$mv_present) { -@@ -4336,6 +4380,8 @@ +@@ -4336,6 +4377,8 @@ exit 0; } @@ -388,7 +400,7 @@ sub decode_msg { # &decode_msg ($msg) # This is possibly the ugliest function in all of premail. Most of it is -@@ -5129,7 +5175,7 @@ +@@ -5129,7 +5172,7 @@ &load_secrets (); foreach (keys %pgpring) { my ($tpr, $tsr) = &makerings ($pgpring{$_}); @@ -397,7 +409,7 @@ #filecat ($tpr, $pr); filecat ($tsr, $sr); &delete_tmpfile ($tpr); -@@ -5157,12 +5203,12 @@ +@@ -5157,12 +5200,12 @@ # &pdv ('&makerings ("'.join ('", "', @_)."\")\n"); foreach ([$pr, $pk], [$sr, $sk]) { open TMP, ">$$_[0]"; @@ -412,7 +424,7 @@ . "$id $pr $pubring 2>&1"; &pdv ("$invoc > /dev/null\n"); system "$invoc > /dev/null"; -@@ -5189,7 +5235,7 @@ +@@ -5189,7 +5232,7 @@ $outfile = &tmp_filename (); $errfile = &tmp_filename (); $invoc = &tilde_expand ($config{'pgp'}); @@ -421,7 +433,7 @@ $invoc .= " +pubring=$pr +secring=$sr "; $invoc .= $cmd; $invoc .= ' < ' . $infile if $infile; -@@ -5248,7 +5294,7 @@ +@@ -5248,7 +5291,7 @@ EOF <STDIN>; @@ -430,7 +442,7 @@ print STDERR "\nKey generation failed.\n"; &killbaks ($pr, $sr); &delete_open_tmpfiles (); -@@ -5272,7 +5318,7 @@ +@@ -5272,7 +5315,7 @@ foreach $a ("$kid $pr", "$remid $pr " . &tilde_expand ($config{'pubring'}), "$kid $sr $defsr") { @@ -439,7 +451,7 @@ # print STDERR "+ $invoc\n"; my $result = `$invoc`; unless ($result =~ /^Key extracted/m) { -@@ -5300,7 +5346,7 @@ +@@ -5300,7 +5343,7 @@ EOF <STDIN>; @@ -448,7 +460,7 @@ # print STDERR "+ $invoc\n"; if (system ($invoc)) { print STDERR "Edit failed.\n"; -@@ -5495,6 +5541,7 @@ +@@ -5495,6 +5538,7 @@ } } } @@ -456,7 +468,7 @@ if ($#args >= 1) { $to = $args[1]; } elsif ($#args < 0) { -@@ -5609,7 +5656,6 @@ +@@ -5609,7 +5653,6 @@ $fullname = &query ('Full name of pseudonym (not just ' . 'E-mail address)', $fullname); $fullname =~ s/[\'\^\n]//g; # kludge for secrets file @@ -464,7 +476,7 @@ $signsend = &query ('Sign mail with (R)emailer key, ' . '(P)seudonym key or (N)o key?', $signsend); -@@ -5652,7 +5698,7 @@ +@@ -5652,7 +5695,7 @@ } # print "Here's the encrypted block:\n"; # system "cat $replyblock_fn"; @@ -473,7 +485,7 @@ if (&member ('newnym', @options)) { $secret = "\$nym\{\'$time\,$remailer\=$nym\'\} \= ". "\'chain=$chain\^to=$to^" -@@ -5771,6 +5817,7 @@ +@@ -5771,6 +5814,7 @@ if (!open (IN, $body)) { &error ("Internal error opening replyblock\n"); } @@ -481,7 +493,7 @@ @in_headers = ("To: $to\n"); push (@in_headers, "Chain: $chain\n") if $chain; $header_sep = "\n"; -@@ -5784,6 +5831,7 @@ +@@ -5784,6 +5828,7 @@ } &send_group ($groups[0]); close (IN); @@ -489,7 +501,7 @@ } sub find_nym { -@@ -5997,7 +6045,7 @@ +@@ -5997,7 +6042,7 @@ # The main loop $quit = 0; @@ -498,7 +510,7 @@ while (!$quit) { $rin = $win = $ein = ''; vec ($rin, fileno(STDIN), 1) = 1 unless $ineof; -@@ -6315,7 +6363,7 @@ +@@ -6315,7 +6360,7 @@ # Open a Web connection for the file as file handle WWW. my ($url) = @_; my ($host, $port, $suf); @@ -507,7 +519,7 @@ my ($name, $proto); my ($that, $thataddr); my ($savesel, $gotsep); -@@ -6330,7 +6378,7 @@ +@@ -6330,7 +6375,7 @@ $host = $1; $port = $2; $suf = $3; @@ -516,7 +528,7 @@ else { $port = 80; } ($fqdn, $aliases, $type, $len, $thataddr) = gethostbyname ($host); return &pdv ("Host not found: $host\n") if ($thataddr eq ''); -@@ -6345,7 +6393,7 @@ +@@ -6345,7 +6390,7 @@ unpack ('C4', $thataddr), $port)); eval { $SIG{'ALRM'} = sub { die "Timeout error on $url\n" }; @@ -525,7 +537,7 @@ # bind(WWW, $this) || &die_disarm ("bind: $!\n"); # &pdv ("bound the socket...\n"); connect(WWW, $that) || &die_disarm ("connect: $!\n"); -@@ -6356,7 +6404,7 @@ +@@ -6356,7 +6401,7 @@ ."User-Agent: premail/$version (perl; unix)\n" ."\n"; $response = <WWW>; @@ -534,7 +546,7 @@ &die_disarm ("Remote server error: $response"); } $gotsep = 0; -@@ -6368,6 +6416,21 @@ +@@ -6368,6 +6413,21 @@ }; if ($@) { return &pdv ($@); } return &pdv ("No response from server\n") unless $gotsep; |