diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1998-03-03 00:38:18 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1998-03-03 00:38:18 +0000 |
commit | 72bfa4768b1fe65c21e3bec942df331f4d354245 (patch) | |
tree | d937041a5ef3ec2c8f98838abc3c0fa021898b27 | |
parent | Upgrade to 4.3.8 (diff) |
Upgrade to 3.6
Diffstat (limited to '')
-rw-r--r-- | mail/adcomplain/Makefile | 6 | ||||
-rw-r--r-- | mail/adcomplain/distinfo | 2 | ||||
-rw-r--r-- | mail/adcomplain/files/patch-aa | 215 |
3 files changed, 182 insertions, 41 deletions
diff --git a/mail/adcomplain/Makefile b/mail/adcomplain/Makefile index f53666ca79c9..f03d4076b4a9 100644 --- a/mail/adcomplain/Makefile +++ b/mail/adcomplain/Makefile @@ -1,13 +1,13 @@ # New ports collection makefile for: adcomplain # http://www.rdrop.com/users/billmc/adcomplain.html -# Version required: 2.87b +# Version required: 3.6 # Date created: 13 Sep 1997 # Whom: ache@FreeBSD.org # -# $Id: Makefile,v 1.9 1998/01/02 05:40:46 ache Exp $ +# $Id: Makefile,v 1.10 1998/01/17 13:50:29 ache Exp $ # -DISTNAME= adcomplain-2.87b +DISTNAME= adcomplain-3.6 CATEGORIES= mail news MASTER_SITES= http://www.rdrop.com/users/billmc/ DISTFILES= adcomplain.pl.uu diff --git a/mail/adcomplain/distinfo b/mail/adcomplain/distinfo index 79ba41eccca4..d3f67011bb91 100644 --- a/mail/adcomplain/distinfo +++ b/mail/adcomplain/distinfo @@ -1 +1 @@ -MD5 (adcomplain.pl.uu) = 820341dba1f1a68c3836de17f4ecb998 +MD5 (adcomplain.pl.uu) = 09560eb5a2a7974f94e174faecb113b9 diff --git a/mail/adcomplain/files/patch-aa b/mail/adcomplain/files/patch-aa index 09ef570b3736..3010e139a0ff 100644 --- a/mail/adcomplain/files/patch-aa +++ b/mail/adcomplain/files/patch-aa @@ -1,5 +1,5 @@ -*** adcomplain.pl.orig Fri Jan 2 08:20:55 1998 ---- adcomplain.pl Fri Jan 2 08:24:07 1998 +*** adcomplain.pl.old Tue Mar 3 03:20:37 1998 +--- adcomplain.pl Tue Mar 3 03:23:52 1998 *************** *** 1,3 **** --- 1,4 ---- @@ -27,44 +27,185 @@ #----------------------------------------------- # DESCRIPTION *************** -*** 279,286 **** - # depending on your system, to find out where sendmail is. - # If left blank, we try to find sendmail in /usr/lib, /usr/sbin, and then - # the user's $PATH, and then invoke it with the "-t" flag. -! #$mailcmd = "/usr/lib/sendmail -t"; -! $mailcmd = ""; - - # this is a list of domain names for your system (e.g., "compuserve.com") - # Names in this list are considered "friendly". Including your own system ---- 280,287 ---- - # depending on your system, to find out where sendmail is. - # If left blank, we try to find sendmail in /usr/lib, /usr/sbin, and then - # the user's $PATH, and then invoke it with the "-t" flag. -! $mailcmd = "/usr/sbin/sendmail -t"; -! #$mailcmd = ""; - - # this is a list of domain names for your system (e.g., "compuserve.com") - # Names in this list are considered "friendly". Including your own system +*** 633,648 **** + &moref($tempname); + } + +- if ($batchmode) { +- $ok = &send_to_list($from, $send_to, $tempname); +- unlink $tempname; +- exit 1 if !$ok; +- } +- else { + ## send, abort, edit, or list the message + for (;;) { +! print "\n"; +! $ans = &get_answer("Send, abort, edit, or list (s/a/e/l)?", "a"); + if ($ans =~ /s.*/ || $ans =~ /y.*/) { + # re-extract the addressee from the body + open(F, "<$tempname") || die "temp file $tempname has disappeared!"; +--- 634,647 ---- + &moref($tempname); + } + + ## send, abort, edit, or list the message + for (;;) { +! if ($batchmode) { +! $ans = "s"; +! } else { +! print "\n"; +! $ans = &get_answer("Send, abort, edit, or list (s/a/e/l)?", "a"); +! } + if ($ans =~ /s.*/ || $ans =~ /y.*/) { + # re-extract the addressee from the body + open(F, "<$tempname") || die "temp file $tempname has disappeared!"; *************** -*** 542,547 **** ---- 543,549 ---- - close TEXTFILE; - $response = ""; # garbage collection +*** 659,669 **** +--- 658,676 ---- + } + } + if ($send_to eq "") { ++ if ($batchmode) { ++ print "no addressee!\n"; ++ last; ++ } + print "no addressee! re-edit and continue\n"; + next; + } + + $ok = &send_to_list($from, $send_to, $tempname); ++ if ($batchmode && !$ok) { ++ print "can't send to $send_to!\n"; ++ last; ++ } + next if !$ok; + print "sent to $send_to\n"; -+ if (!$quiet) { - ## print copy of message on terminal - print "\n"; - $pager = $ENV{"PAGER"}; *************** -*** 576,581 **** ---- 578,587 ---- - } # for +*** 687,693 **** + print "what?\n"; + } + } # for +- } print "\n"; -+ } else { -+ system "$mailcmd <$tempname"; # Unix dependent -+ print "sent\n"; -+ } unlink $tempname; - close STDIN; - exit 0; +--- 694,699 ---- +*************** +*** 726,731 **** +--- 732,738 ---- + local($local_inetaddr, $remote_inetaddr); + local($targetPort) = "smtp"; # or 25, world-wide standard + local($response); ++ local($local_prot) = (getprotobyname('tcp'))[2]; + + if (defined($mailscript) && $mailscript ne "") { + $name = "$mailscript $body "; +*************** +*** 764,774 **** + } + } + +! $local_inetaddr = pack($sockaddr, $AF_INET, 0, $thisaddr); +! $remote_inetaddr = pack($sockaddr, $AF_INET, $targetPort, $thataddr); + + #MAKE the socket filehandle. +! if ( ! socket( S, $AF_INET, $SOCK_STREAM, 0)) { + print STDERR "socket() failure: $!\n"; + return 0; + } +--- 771,781 ---- + } + } + +! $local_inetaddr = pack($sockaddr, &AF_INET, 0, $thisaddr); +! $remote_inetaddr = pack($sockaddr, &AF_INET, $targetPort, $thataddr); + + #MAKE the socket filehandle. +! if ( ! socket( S, &PF_INET, &SOCK_STREAM, $local_prot)) { + print STDERR "socket() failure: $!\n"; + return 0; + } +*************** +*** 1490,1496 **** + local ($name, $aliases, $addrtype, $length, @addrs); + local ($addr_int); + local ($a, $b, $c, $d); +- local ($AF_INET) = 2; # not portable, but pretty common + + $name = $ips_to_hosts{$text}; + return $name if defined($name) && $name ne ""; +--- 1497,1502 ---- +*************** +*** 1506,1512 **** + $addr_int = pack("C4", $a, $b, $c, $d); + + ($name, $aliases, $addrtype, $length, @addrs) = +! gethostbyaddr($addr_int, $AF_INET); + if (defined($name) && $name ne "") { + &log_mapping($name, $text, "gethostbyaddr"); + return $name; +--- 1512,1518 ---- + $addr_int = pack("C4", $a, $b, $c, $d); + + ($name, $aliases, $addrtype, $length, @addrs) = +! gethostbyaddr($addr_int, &AF_INET); + if (defined($name) && $name ne "") { + &log_mapping($name, $text, "gethostbyaddr"); + return $name; +*************** +*** 2317,2323 **** + # Windows 95, as opposed to Windows NT which would pass previous test + $os_kind = "win32"; + } +! elsif (-x "/bin/uname") { + # $^O would work with perl5, but then I would have to distinguish + # between AIX, HP-UX, Solaris, SunOS, Linux, SINIX, SVr4, etc. + $os_kind = "unix"; +--- 2323,2329 ---- + # Windows 95, as opposed to Windows NT which would pass previous test + $os_kind = "win32"; + } +! elsif (-x "/bin/uname" || -x "/usr/bin/uname") { + # $^O would work with perl5, but then I would have to distinguish + # between AIX, HP-UX, Solaris, SunOS, Linux, SINIX, SVr4, etc. + $os_kind = "unix"; +*************** +*** 2333,2339 **** + # years ago by someone who _really_ didn't know what he was doing. + # All of the host-specific libraries are really a mess, and disentangling + # it for our different architectures is not practical. +! $junk = `/bin/uname -rs`; + if ($junk =~ /^SunOS 5.*/) { # Solaris + $AF_INET = 2; + $SOCK_STREAM = 2; # they just _had_ to be different. +--- 2339,2345 ---- + # years ago by someone who _really_ didn't know what he was doing. + # All of the host-specific libraries are really a mess, and disentangling + # it for our different architectures is not practical. +! $junk = -x "/bin/uname" ? `/bin/uname -rs` : `/usr/bin/uname -rs`; + if ($junk =~ /^SunOS 5.*/) { # Solaris + $AF_INET = 2; + $SOCK_STREAM = 2; # they just _had_ to be different. +*************** +*** 2411,2422 **** + $local_hostname = $name if defined($name) && $name ne ""; + + if (!defined($mailhost) || $mailhost eq "") { +! local($name, $aliases, $type, $len, $addr) = gethostbyname("mailhost"); +! $addr = $addr; # shut up perl5 -w +! if (defined($name) && $name ne "") { +! $mailhost = $name; +! } +! elsif ($os_kind eq "unix") { + $mailhost = $local_hostname; + # $mailhost = "localhost"; + } +--- 2417,2423 ---- + $local_hostname = $name if defined($name) && $name ne ""; + + if (!defined($mailhost) || $mailhost eq "") { +! if ($os_kind eq "unix") { + $mailhost = $local_hostname; + # $mailhost = "localhost"; + } |