summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorspz <spz@pkgsrc.org>2010-11-10 07:51:36 +0000
committerspz <spz@pkgsrc.org>2010-11-10 07:51:36 +0000
commit36378e95829c319948a0f8bd9e728de73b96fa09 (patch)
tree2d19ed7e3a9d280c948152ce73c87c3ec27f0bf6 /mail
parentf4947c165b6e4e025e31dc4911378d82f6ea8188 (diff)
downloadpkgsrc-36378e95829c319948a0f8bd9e728de73b96fa09.tar.gz
more fixes for digest
Diffstat (limited to 'mail')
-rw-r--r--mail/majordomo/Makefile4
-rw-r--r--mail/majordomo/distinfo4
-rw-r--r--mail/majordomo/patches/patch-ae126
3 files changed, 113 insertions, 21 deletions
diff --git a/mail/majordomo/Makefile b/mail/majordomo/Makefile
index db5582e7b33..e34bed327f0 100644
--- a/mail/majordomo/Makefile
+++ b/mail/majordomo/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.39 2010/11/09 07:09:58 spz Exp $
+# $NetBSD: Makefile,v 1.40 2010/11/10 07:51:36 spz Exp $
DISTNAME= majordomo-1.94.5
-PKGREVISION= 9
+PKGREVISION= 10
CATEGORIES= mail
MASTER_SITES= ftp://ftp.sgi.com/other/majordomo/1.94.5/ \
ftp://ftp-europe.sgi.com/other/majordomo/1.94.5/
diff --git a/mail/majordomo/distinfo b/mail/majordomo/distinfo
index a17a7dc103f..87a070b1e51 100644
--- a/mail/majordomo/distinfo
+++ b/mail/majordomo/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2010/11/09 07:09:58 spz Exp $
+$NetBSD: distinfo,v 1.12 2010/11/10 07:51:36 spz Exp $
SHA1 (majordomo-1.94.5.tgz) = 44b18c7b9133f2cd992f6e718551d613d9d45c00
RMD160 (majordomo-1.94.5.tgz) = 7f6b48fb5cc5b23948133658b055588d0d6608c4
@@ -7,7 +7,7 @@ SHA1 (patch-aa) = 884e1ffa5e8cebef17328d0e6d5a7dc498ba72c0
SHA1 (patch-ab) = 68bdbd77029ebd8f113c492e50e60aa7efb35de9
SHA1 (patch-ac) = bea997e785b2656b1660a11efce759a56a700ab2
SHA1 (patch-ad) = 65370547240539128a405484e98c7ed15a869464
-SHA1 (patch-ae) = 984547fb26e22bba03d163eb7ce976dcd4582b16
+SHA1 (patch-ae) = 3957e2725fdf1e693236a9517e6e24ed61c0691e
SHA1 (patch-af) = b4a50a472a16eead08c189f68d47d2cf136308c6
SHA1 (patch-ag) = b469a639270d369732e75e6ae4df7f559e9c436e
SHA1 (patch-ah) = 666b52100cb50a948c145da0ba83c197386cbd1e
diff --git a/mail/majordomo/patches/patch-ae b/mail/majordomo/patches/patch-ae
index 0361aeeb078..04d20d1dfb8 100644
--- a/mail/majordomo/patches/patch-ae
+++ b/mail/majordomo/patches/patch-ae
@@ -1,10 +1,44 @@
-$NetBSD: patch-ae,v 1.3 2010/11/09 06:40:13 spz Exp $
+$NetBSD: patch-ae,v 1.4 2010/11/10 07:51:37 spz Exp $
bring up to perl 5.12 standard (this is old code)
--- digest.orig 2000-01-07 11:04:34.000000000 +0000
+++ digest
-@@ -175,12 +175,12 @@ sub send_digest {
+@@ -72,8 +72,8 @@ sub receive_message {
+ sub should_be_sent {
+ # fudge factors for headers and footers
+ $sum = 600 + length($HEADER) + length($HEADERS) + length($TRAILER);
+- $lines = 25 + ($HEADER =~ s/\n/\n/g) + ($HEADERS =~ s/\n/\n/g) +
+- ($TRAILER =~ s/\n/\n/g);
++ $lines = 25 + ($HEADER =~ s/\n/\n/gm) + ($HEADERS =~ s/\n/\n/gm) +
++ ($TRAILER =~ s/\n/\n/gm);
+ ##print "start: lines = $lines\n";
+ $i = shift;
+ while (1) {
+@@ -87,17 +87,17 @@ sub should_be_sent {
+
+ # only count From/Date/Subject header fields to get a
+ # more accurate size and line count.
+- $head =~ s/\n\s+/ /g;
+- $head =~ /^(From:\s+.*)/i && ($sum += length($1)+1, $lines++);
+- $head =~ /^(Subject:\s+.*)/i && ($sum += length($1)+1, $lines++);
+- $head =~ /^(Date:\s+.*)/i && ($sum += length($1)+1, $lines++);
++ $head =~ s/\n\s+/ /gm;
++ $head =~ /^(From:\s+.*)/im && ($sum += length($1)+1, $lines++);
++ $head =~ /^(Subject:\s+.*)/im && ($sum += length($1)+1, $lines++);
++ $head =~ /^(Date:\s+.*)/im && ($sum += length($1)+1, $lines++);
+ $sum++, $lines++;
+
+ # count the body of the message
+ undef $/;
+ $body = <COUNT>;
+ $sum += length($body);
+- $lines += ($body =~ s/\n/\n/g); # count newlines
++ $lines += ($body =~ s/\n/\n/gm); # count newlines
+
+ $/ = "\n";
+ close(COUNT);
+@@ -175,35 +175,35 @@ sub send_digest {
print STDERR "producing $V{'NAME'} V$VOLUME #$NUMBER\n";
foreach (@files) {
$message = "$V{'INCOMING'}/$_";
@@ -15,12 +49,16 @@ bring up to perl 5.12 standard (this is old code)
$/ = '';
- $head = <message>;
+- $head =~ s/\n\s+/ /g;
+ $head = <MESSAGE>;
- $head =~ s/\n\s+/ /g;
++ $head =~ s/\n\s+/ /gm;
$body = "";
- $subj = ($head =~ /^Subject:\s+(.*)/i)? $1: "[none]";
-@@ -188,8 +188,8 @@ sub send_digest {
- ($date) = $head =~ /^Date:\s+(.*)/i;
+- $subj = ($head =~ /^Subject:\s+(.*)/i)? $1: "[none]";
+- ($from) = $head =~ /^From:\s+(.*)/i;
+- ($date) = $head =~ /^Date:\s+(.*)/i;
++ $subj = ($head =~ /^Subject:\s+(.*)/im)? $1: "[none]";
++ ($from) = $head =~ /^From:\s+(.*)/im;
++ ($date) = $head =~ /^Date:\s+(.*)/im;
undef $/;
- $body = <message>;
@@ -30,7 +68,35 @@ bring up to perl 5.12 standard (this is old code)
# trim message fronter and footers inserted by resend in
# non digest version of list
-@@ -302,7 +302,6 @@ EOF
+ if ($RMHEADER) {
+- $body =~ s/$RMHEADER/\n/;
++ $body =~ s/$RMHEADER/\n/m;
+ }
+ if ($RMTRAILER) {
+- $body =~ s/$RMTRAILER/\n/;
++ $body =~ s/$RMTRAILER/\n/m;
+ }
+
+ # escape ^From <user> <weekday> <month> <day> <hr:min:sec> ...
+ $body =~
+- s/^From (\S+\s+\w{3}\s+\w{3}\s+\d+\s+\d+:\d+:\d+)/>From $1/g;
+- $body =~ s/^-/- -/g; # escape encapsulation boundaries in message
++ s/^From (\S+\s+\w{3}\s+\w{3}\s+\d+\s+\d+:\d+:\d+)/>From $1/gm;
++ $body =~ s/^-/- -/gm; # escape encapsulation boundaries in message
+ # trim trailing \n's
+ $len = length($body) - 1;
+ $len-- while (substr($body,$len,1) eq "\n");
+@@ -291,7 +291,9 @@ EOF
+ } else {
+ $sender = $V{'ERRORS-TO'};
+ $mailcmd = eval qq/"$mailer"/;
++ print STDERR "$mailcmd $V{'REALLY-TO'} < $DIGEST\n";
+ system("$mailcmd $V{'REALLY-TO'} < $DIGEST");
++ chmod 0664, $DIGEST;
+ unlink(@processed);
+ }
+
+@@ -302,7 +304,6 @@ EOF
}
sub init {
@@ -38,7 +104,7 @@ bring up to perl 5.12 standard (this is old code)
$HOME = $ENV{"HOME"} || (getpwuid($>))[7];
chdir($HOME);
&getopt("drRmpc:Cl:z") ||
-@@ -328,6 +327,10 @@ sub readconfig {
+@@ -328,6 +329,10 @@ sub readconfig {
chdir($homedir);
@@ -49,25 +115,51 @@ bring up to perl 5.12 standard (this is old code)
$opt_l =~ tr/A-Z/a-z/;
require "config_parse.pl";
-@@ -360,7 +363,7 @@ $bounce_mailer = "$sendmail_command -f\$
+@@ -360,9 +365,9 @@ $bounce_mailer = "$sendmail_command -f\$
&get_config($listdir, $config_opts{$opt_l,"digest_rm_fronter"});
$RMHEADER = $config_opts{$config_opts{$opt_l,"digest_rm_fronter"},
"message_fronter"};
- $RMHEADER =~ s/([^A-Za-z0-9 \001])/\\\1/g;
-+ $RMHEADER =~ s/([^A-Za-z0-9 \001])/\\$1/g;
- $RMHEADER =~ s/\\\$(SENDER|VERSION|LIST)/\[\^\\n\]\*/g;
- $RMHEADER =~ s/\001/\\n/g;
+- $RMHEADER =~ s/\\\$(SENDER|VERSION|LIST)/\[\^\\n\]\*/g;
+- $RMHEADER =~ s/\001/\\n/g;
++ $RMHEADER =~ s/([^A-Za-z0-9 \001])/\\\1/gm;
++ $RMHEADER =~ s/\\\$(SENDER|VERSION|LIST)/\[\^\\n\]\*/gm;
++ $RMHEADER =~ s/\001/\\n/gm;
}
-@@ -371,7 +374,7 @@ $bounce_mailer = "$sendmail_command -f\$
+ if ($config_opts{$opt_l,"digest_rm_footer"}) {
+ if ($config_opts{$opt_l,"digest_rm_footer"} ne
+@@ -371,16 +376,16 @@ $bounce_mailer = "$sendmail_command -f\$
}
$RMTRAILER = $config_opts{$config_opts{$opt_l,"digest_rm_footer"},
"message_footer"};
- $RMTRAILER =~ s/([^A-Za-z0-9 \001])/\\\1/g;
-+ $RMTRAILER =~ s/([^A-Za-z0-9 \001])/\\$1/g;
- $RMTRAILER =~ s/\\\$(SENDER|VERSION|LIST)/\[\^\\n\]\*/g;
- $RMTRAILER =~ s/\001/\\n/g;
+- $RMTRAILER =~ s/\\\$(SENDER|VERSION|LIST)/\[\^\\n\]\*/g;
+- $RMTRAILER =~ s/\001/\\n/g;
++ $RMTRAILER =~ s/([^A-Za-z0-9 \001])/\\\1/gm;
++ $RMTRAILER =~ s/\\\$(SENDER|VERSION|LIST)/\[\^\\n\]\*/gm;
++ $RMTRAILER =~ s/\001/\\n/gm;
+ }
+
+ # map config opts to internal variables and $V array
+ $HEADER = $config_opts{$opt_l,"message_fronter"};
+- $HEADER =~ s/\001/\n/g;
++ $HEADER =~ s/\001/\n/gm;
+ $TRAILER = $config_opts{$opt_l,"message_footer"};
+- $TRAILER =~ s/\001/\n/g;
++ $TRAILER =~ s/\001/\n/gm;
+ $VOLUME = $config_opts{$opt_l,"digest_volume"};
+ $NUMBER = $config_opts{$opt_l,"digest_issue"};
+ $Precedence = $config_opts{$opt_l,"precedence"};
+@@ -406,7 +411,7 @@ $bounce_mailer = "$sendmail_command -f\$
+ $from = $V{'FROM'};
+ $HEADERS = &config'substitute_values (
+ $config_opts{$opt_l,"message_headers"}, $opt_l);
+- $HEADERS =~ s/\001/\n/g;
++ $HEADERS =~ s/\001/\n/gm;
}
-@@ -441,13 +444,13 @@ $bounce_mailer = "$sendmail_command -fma
+ } # list is defined
+ } else { # not using -C
+@@ -441,13 +446,13 @@ $bounce_mailer = "$sendmail_command -fma
&abort("$program_name: can't get lock '$lockfile'\n");
$lock_set = 1;