mailagent-svn Mailing List for mailagent - Perl mail filter / processor
Brought to you by:
rmanfredi
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
(21) |
Jun
(30) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <rma...@us...> - 2015-02-12 18:12:45
|
Revision: 82 http://sourceforge.net/p/mailagent/code/82 Author: rmanfredi Date: 2015-02-12 18:12:38 +0000 (Thu, 12 Feb 2015) Log Message: ----------- Bumping revision after 2 bug fixes. Modified Paths: -------------- trunk/mailagent/revision.h Modified: trunk/mailagent/revision.h =================================================================== --- trunk/mailagent/revision.h 2015-02-12 18:10:21 UTC (rev 81) +++ trunk/mailagent/revision.h 2015-02-12 18:12:38 UTC (rev 82) @@ -4,4 +4,4 @@ * Generated by ./bin/svn-revision. */ -#define REVISION 78 +#define REVISION 81 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2015-02-12 18:10:24
|
Revision: 81 http://sourceforge.net/p/mailagent/code/81 Author: rmanfredi Date: 2015-02-12 18:10:21 +0000 (Thu, 12 Feb 2015) Log Message: ----------- The biff() routine was missing a ++ to prevent duplicate biffs on same tty. Modified Paths: -------------- trunk/mailagent/agent/pl/biff.pl Modified: trunk/mailagent/agent/pl/biff.pl =================================================================== --- trunk/mailagent/agent/pl/biff.pl 2015-02-12 18:06:16 UTC (rev 80) +++ trunk/mailagent/agent/pl/biff.pl 2015-02-12 18:10:21 UTC (rev 81) @@ -51,7 +51,7 @@ &add_log("$cf'user is logged on @ttys") if $loglvl > 15; my %done; # Solaris might give same tty twice foreach $tty (@ttys) { - &biff'notify($tty, $folder, $type) unless $done{$tty}; + &biff'notify($tty, $folder, $type) unless $done{$tty}++; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2015-02-12 18:06:18
|
Revision: 80 http://sourceforge.net/p/mailagent/code/80 Author: rmanfredi Date: 2015-02-12 18:06:16 +0000 (Thu, 12 Feb 2015) Log Message: ----------- Removed obsolete "defined(@array)" construct. Modified Paths: -------------- trunk/mailagent/agent/pl/dbr.pl Modified: trunk/mailagent/agent/pl/dbr.pl =================================================================== --- trunk/mailagent/agent/pl/dbr.pl 2013-05-17 20:49:33 UTC (rev 79) +++ trunk/mailagent/agent/pl/dbr.pl 2015-02-12 18:06:16 UTC (rev 80) @@ -136,7 +136,7 @@ } $linenum = (&info($hname, $tag))[1] unless defined($linenum); if ($linenum == 0) { # No entry previously recorded - return unless defined(@values); # Nothing to delete + return unless @values; # Nothing to delete unless(open(DBR, ">>$file")) { &'add_log("ERROR cannot append in $file: $!") if $'loglvl; return; @@ -162,7 +162,7 @@ if ($. < $linenum) { # Before line to update print DBR; # Print line verbatim } elsif ($. == $linenum) { # We reached line to be updated - next unless defined(@values); + next unless @values; print DBR "$hname $tag $now\t"; print DBR join("\t", @values); print DBR "\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2013-05-17 20:49:41
|
Revision: 79 http://sourceforge.net/p/mailagent/code/79 Author: rmanfredi Date: 2013-05-17 20:49:33 +0000 (Fri, 17 May 2013) Log Message: ----------- Make sure message IDs do not contain any '/' or DBR will not like it. Modified Paths: -------------- trunk/mailagent/agent/pl/header.pl trunk/mailagent/revision.h Modified: trunk/mailagent/agent/pl/header.pl =================================================================== --- trunk/mailagent/agent/pl/header.pl 2012-12-15 10:12:05 UTC (rev 78) +++ trunk/mailagent/agent/pl/header.pl 2013-05-17 20:49:33 UTC (rev 79) @@ -178,6 +178,7 @@ s/>\s+</>\01</g; # Protect spaces between IDs for References $fixup++ if s/\s/-/g; # No spaces $fixup++ if s/_/-/g; # No _ in names + $fixup++ if s|/|-|g; # No / in names $fixup++ if s/[(){}]//g; # No () nor {} in names and ID $fixup++ if s/\.+>/>/g; # No trailing dot(s) $fixup++ if s/\.\.+/./g; # No consecutive dots Modified: trunk/mailagent/revision.h =================================================================== --- trunk/mailagent/revision.h 2012-12-15 10:12:05 UTC (rev 78) +++ trunk/mailagent/revision.h 2013-05-17 20:49:33 UTC (rev 79) @@ -4,4 +4,4 @@ * Generated by ./bin/svn-revision. */ -#define REVISION 72 +#define REVISION 78 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2012-12-15 10:12:07
|
Revision: 78 http://sourceforge.net/p/mailagent/code/78 Author: rmanfredi Date: 2012-12-15 10:12:05 +0000 (Sat, 15 Dec 2012) Log Message: ----------- Migrated perload to new Perl 5 modules for option parsing. Modified Paths: -------------- trunk/mailagent/bin/perload Modified: trunk/mailagent/bin/perload =================================================================== --- trunk/mailagent/bin/perload 2012-01-08 23:55:16 UTC (rev 77) +++ trunk/mailagent/bin/perload 2012-12-15 10:12:05 UTC (rev 78) @@ -37,8 +37,8 @@ $init_emitted = 0; # True when dataloading stamp was emitted $in_function = 0; -require 'getopt.pl'; -&Getopt; +use Getopt::Std; +getopt(); while (<>) { if ($. == 1 && /^(:|#).*perl/) { # Invocation stub This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2012-01-08 23:55:24
|
Revision: 77 http://mailagent.svn.sourceforge.net/mailagent/?rev=77&view=rev Author: rmanfredi Date: 2012-01-08 23:55:16 +0000 (Sun, 08 Jan 2012) Log Message: ----------- Adjustements due to announced removal of legacy perl4 routines after perl 5.14. Modified Paths: -------------- trunk/mailagent/MANIFEST trunk/mailagent/agent/pl/actions.pl trunk/mailagent/agent/pl/newcmd.pl trunk/mailagent/agent/pl/utmp/utmp_pl.sh trunk/mailagent/agent/test/TEST Added Paths: ----------- trunk/mailagent/agent/test/getopt.pl Modified: trunk/mailagent/MANIFEST =================================================================== --- trunk/mailagent/MANIFEST 2011-12-23 11:18:15 UTC (rev 76) +++ trunk/mailagent/MANIFEST 2012-01-08 23:55:16 UTC (rev 77) @@ -192,6 +192,7 @@ agent/test/Makefile.SH Makefile for test suite agent/test/README About the regression tests agent/test/TEST Runs the full test suite +agent/test/getopt.pl Legacy &Getopt() routine definition from perl4 agent/test/actions Rule file for cmd tests agent/test/atail Active monitoring of the out/agentlog file agent/test/base64 Sample base64 encoded email Modified: trunk/mailagent/agent/pl/actions.pl =================================================================== --- trunk/mailagent/agent/pl/actions.pl 2011-12-23 11:18:15 UTC (rev 76) +++ trunk/mailagent/agent/pl/actions.pl 2012-01-08 23:55:16 UTC (rev 77) @@ -1719,7 +1719,10 @@ # Note that the @ARGV array is held in the main package, but since the # mailagent makes no use of it at this point, there is no need to save its # value before clobbering it. - require 'shellwords.pl'; + + require Text::ParseWords; + *shellwords = \&Text::ParseWords::old_shellwords; + eval '@ARGV = &shellwords($script)'; if (chop($@)) { # There was an unmatched quote $@ =~ s/^U/u/; Modified: trunk/mailagent/agent/pl/newcmd.pl =================================================================== --- trunk/mailagent/agent/pl/newcmd.pl 2011-12-23 11:18:15 UTC (rev 76) +++ trunk/mailagent/agent/pl/newcmd.pl 2012-01-08 23:55:16 UTC (rev 77) @@ -156,7 +156,9 @@ # the mailhook variable in the current package. &hook'initvar('newcmd'); # Initialize convenience variables local(@ARGV); # Argument vector for command - require 'shellwords.pl'; + + require Text::ParseWords; + *shellwords = \&Text::ParseWords::old_shellwords; eval '@ARGV = &shellwords($cmd)'; # We don't need to protect the following execution within an eval, since Modified: trunk/mailagent/agent/pl/utmp/utmp_pl.sh =================================================================== --- trunk/mailagent/agent/pl/utmp/utmp_pl.sh 2011-12-23 11:18:15 UTC (rev 76) +++ trunk/mailagent/agent/pl/utmp/utmp_pl.sh 2012-01-08 23:55:16 UTC (rev 77) @@ -67,7 +67,7 @@ # Returns the amount of records anyway. sub update { &init unless $init; - require 'stat.pl'; + my $ST_MTIME = 9 + $[; # Field st_mtime from inode structure local($mtime) = (stat($utmp))[$ST_MTIME]; return 0 + @utmp unless $mtime > $lmtime; $lmtime = $mtime; Modified: trunk/mailagent/agent/test/TEST =================================================================== --- trunk/mailagent/agent/test/TEST 2011-12-23 11:18:15 UTC (rev 76) +++ trunk/mailagent/agent/test/TEST 2012-01-08 23:55:16 UTC (rev 77) @@ -56,7 +56,7 @@ $failed = 0; $how_many = 0; -require 'getopt.pl'; +require './getopt.pl'; &Getopt; $mailagent = 'mailagent'; # Default program (dataloaded version) Added: trunk/mailagent/agent/test/getopt.pl =================================================================== --- trunk/mailagent/agent/test/getopt.pl (rev 0) +++ trunk/mailagent/agent/test/getopt.pl 2012-01-08 23:55:16 UTC (rev 77) @@ -0,0 +1,50 @@ +;# $RCSfile: getopt.pl,v $$Revision$$Date$ +# +# This library is no longer being maintained, and is included for backward +# compatibility with Perl 4 programs which may require it. +# This legacy library is deprecated and will be removed in a future +# release of perl. +# +# In particular, this should not be used as an example of modern Perl +# programming techniques. +# +# Suggested alternatives: Getopt::Long or Getopt::Std + +;# Process single-character switches with switch clustering. Pass one argument +;# which is a string containing all switches that take an argument. For each +;# switch found, sets $opt_x (where x is the switch name) to the value of the +;# argument, or 1 if no argument. Switches which take an argument don't care +;# whether there is a space between the switch and the argument. + +;# Usage: +;# do Getopt('oDI'); # -o, -D & -I take arg. Sets opt_* as a side effect. + +sub Getopt { + local($argumentative) = @_; + local($_,$first,$rest); + + while (@ARGV && ($_ = $ARGV[0]) =~ /^-(.)(.*)/) { + ($first,$rest) = ($1,$2); + if (index($argumentative,$first) >= 0) { + if ($rest ne '') { + shift(@ARGV); + } + else { + shift(@ARGV); + $rest = shift(@ARGV); + } + ${"opt_$first"} = $rest; + } + else { + ${"opt_$first"} = 1; + if ($rest ne '') { + $ARGV[0] = "-$rest"; + } + else { + shift(@ARGV); + } + } + } +} + +1; Property changes on: trunk/mailagent/agent/test/getopt.pl ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2011-12-23 11:18:22
|
Revision: 76 http://mailagent.svn.sourceforge.net/mailagent/?rev=76&view=rev Author: rmanfredi Date: 2011-12-23 11:18:15 +0000 (Fri, 23 Dec 2011) Log Message: ----------- Removed unneeded agent/pl/ctime.pl. Modified Paths: -------------- trunk/mailagent/MANIFEST trunk/mailagent/revision.h Removed Paths: ------------- trunk/mailagent/agent/pl/ctime.pl Modified: trunk/mailagent/MANIFEST =================================================================== --- trunk/mailagent/MANIFEST 2011-12-23 10:18:37 UTC (rev 75) +++ trunk/mailagent/MANIFEST 2011-12-23 11:18:15 UTC (rev 76) @@ -122,7 +122,6 @@ agent/pl/cmdserv.pl Implements generic mail server agent/pl/compress.pl Folder compression library agent/pl/context.pl Mailagent context file handling -agent/pl/ctime.pl Legacy perl4 library to implement ctime() agent/pl/dbr.pl Internal database management agent/pl/distribs.pl Perl library to scan the distribs file agent/pl/dynload.pl Dynamically loads perl code into mailagent Deleted: trunk/mailagent/agent/pl/ctime.pl =================================================================== --- trunk/mailagent/agent/pl/ctime.pl 2011-12-23 10:18:37 UTC (rev 75) +++ trunk/mailagent/agent/pl/ctime.pl 2011-12-23 11:18:15 UTC (rev 76) @@ -1,71 +0,0 @@ -;# $Id$ -;# -;# Comes from perl 5.10 -- inclusion in mailagent is: -;# -;# Copyright (c) 2011, Raphael Manfredi -;# -;# You may redistribute only under the terms of the Artistic License, -;# as specified in the README file that comes with the distribution. -;# You may reuse parts of this distribution only within the terms of -;# that same Artistic License; a copy of which may be found at the root -;# of the source tree for mailagent 3.0. -;# -;# ctime.pl is a simple Perl emulation for the well known ctime(3C) function. -# -# This library is no longer being maintained, and is included for backward -# compatibility with Perl 4 programs which may require it. -# -# In particular, this should not be used as an example of modern Perl -# programming techniques. -# -# Suggested alternative: the POSIX ctime function -;# -;# Waldemar Kebsch, Federal Republic of Germany, November 1988 -;# kebsch.pad@nixpbe.UUCP -;# Modified March 1990, Feb 1991 to properly handle timezones -;# $RCSfile: ctime.pl,v $$Revision$$Date$ -;# Marion Hakanson (hak...@cs...) -;# Oregon Graduate Institute of Science and Technology -;# -;# usage: -;# -;# #include <ctime.pl> # see the -P and -I option in perl.man -;# $Date = &ctime(time); - -CONFIG: { - package ctime; - - @DoW = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); - @MoY = ('Jan','Feb','Mar','Apr','May','Jun', - 'Jul','Aug','Sep','Oct','Nov','Dec'); -} - -sub ctime { - package ctime; - - local($time) = @_; - local($[) = 0; - local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); - - # Determine what time zone is in effect. - # Use GMT if TZ is defined as null, local time if TZ undefined. - # There's no portable way to find the system default timezone. - - $TZ = defined($ENV{'TZ'}) ? ( $ENV{'TZ'} ? $ENV{'TZ'} : 'GMT' ) : ''; - ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = - ($TZ eq 'GMT') ? gmtime($time) : localtime($time); - - # Hack to deal with 'PST8PDT' format of TZ - # Note that this can't deal with all the esoteric forms, but it - # does recognize the most common: [:]STDoff[DST[off][,rule]] - - if($TZ=~/^([^:\d+\-,]{3,})([+-]?\d{1,2}(:\d{1,2}){0,2})([^\d+\-,]{3,})?/){ - $TZ = $isdst ? $4 : $1; - } - $TZ .= ' ' unless $TZ eq ''; - - $year += 1900; - sprintf("%s %s %2d %2d:%02d:%02d %s%4d\n", - $DoW[$wday], $MoY[$mon], $mday, $hour, $min, $sec, $TZ, $year); -} - Modified: trunk/mailagent/revision.h =================================================================== --- trunk/mailagent/revision.h 2011-12-23 10:18:37 UTC (rev 75) +++ trunk/mailagent/revision.h 2011-12-23 11:18:15 UTC (rev 76) @@ -4,4 +4,4 @@ * Generated by ./bin/svn-revision. */ -#define REVISION 69 +#define REVISION 72 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2011-12-23 10:18:47
|
Revision: 75 http://mailagent.svn.sourceforge.net/mailagent/?rev=75&view=rev Author: rmanfredi Date: 2011-12-23 10:18:37 +0000 (Fri, 23 Dec 2011) Log Message: ----------- Fixed English typos. Modified Paths: -------------- trunk/mailagent/agent/mailhelp.SH trunk/mailagent/agent/maillist.SH trunk/mailagent/agent/man/mailagent.SH trunk/mailagent/agent/man/mailhelp.SH Modified: trunk/mailagent/agent/mailhelp.SH =================================================================== --- trunk/mailagent/agent/mailhelp.SH 2011-12-23 09:46:48 UTC (rev 74) +++ trunk/mailagent/agent/mailhelp.SH 2011-12-23 10:18:37 UTC (rev 75) @@ -65,7 +65,7 @@ $fullcmd = $ENV{'fullcmd'}; $dest=shift; # Who should the help be sent to -$dest = $ENV{'path'} if $dest eq ''; # If dest was ommitted +$dest = $ENV{'path'} if $dest eq ''; # If dest was omitted # A single '-' as first argument stands for return path $dest = $ENV{'path'} if $dest eq '-'; Modified: trunk/mailagent/agent/maillist.SH =================================================================== --- trunk/mailagent/agent/maillist.SH 2011-12-23 09:46:48 UTC (rev 74) +++ trunk/mailagent/agent/maillist.SH 2011-12-23 10:18:37 UTC (rev 75) @@ -76,7 +76,7 @@ $fullcmd = $ENV{'fullcmd'}; $dest=shift; # Who should the list to be sent to -$dest = $ENV{'path'} if $dest eq ''; # If dest was ommitted +$dest = $ENV{'path'} if $dest eq ''; # If dest was omitted # A single '-' as first argument stands for return path $dest = $ENV{'path'} if $dest eq '-'; Modified: trunk/mailagent/agent/man/mailagent.SH =================================================================== --- trunk/mailagent/agent/man/mailagent.SH 2011-12-23 09:46:48 UTC (rev 74) +++ trunk/mailagent/agent/man/mailagent.SH 2011-12-23 10:18:37 UTC (rev 75) @@ -760,7 +760,7 @@ .TP .I servshell This is the name of the shell used to launch SERVER shell commands (actually -to proces the wrapper file that will ultimately exec() the command). On some +to process the wrapper file that will ultimately exec() the command). On some systems like HPUX 10.x, this has to be set to /usr/old/bin/sh to get the plain old Bourne shell, because /bin/sh is a braindead POSIX shell that closes file descriptors greater than 2 upon exec(), whereas the Bourne Modified: trunk/mailagent/agent/man/mailhelp.SH =================================================================== --- trunk/mailagent/agent/man/mailhelp.SH 2011-12-23 09:46:48 UTC (rev 74) +++ trunk/mailagent/agent/man/mailhelp.SH 2011-12-23 10:18:37 UTC (rev 75) @@ -63,7 +63,7 @@ .PP .I Maildist is used to mail a whole distribution to the given address. The version -number may be ommitted if the system has no version specified !! +number may be omitted if the system has no version specified !! .I Maildist looks for the \fISpool/distribs\fR file to find where the distribution is located. If it has been archived, the file name extension is used @@ -86,7 +86,7 @@ .PP Note that on file systems with short file names, the final \fB.Z\fR extension could be dropped. Therefore, compressed archives must be -explicitely stated in the \fISpool/distribs\fR file. +explicitly stated in the \fISpool/distribs\fR file. .PP Once the directory is found (or extracted), \fImaildist\fR looks for a \fI.package\fR file. If one is found, then it is assumed this @@ -114,7 +114,7 @@ patches are available. .PP .I Mailhelp -sends help to the address (if ommitted, the return path of the mail +sends help to the address (if omitted, the return path of the mail is used). The help text is found in \fISpool/agenthelp\fR. It should have been correctly set in the installation procedure, as explained in the \fImailagent\fR($manext) manual page. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2011-12-23 09:46:54
|
Revision: 74 http://mailagent.svn.sourceforge.net/mailagent/?rev=74&view=rev Author: rmanfredi Date: 2011-12-23 09:46:48 +0000 (Fri, 23 Dec 2011) Log Message: ----------- Fixed previous patch (was missing scalar in front of localtime() call). Modified Paths: -------------- trunk/mailagent/agent/pl/stats.pl Modified: trunk/mailagent/agent/pl/stats.pl =================================================================== --- trunk/mailagent/agent/pl/stats.pl 2011-12-22 22:44:07 UTC (rev 73) +++ trunk/mailagent/agent/pl/stats.pl 2011-12-23 09:46:48 UTC (rev 74) @@ -540,11 +540,9 @@ # Print general informations, as found in @Top. sub print_general { local($what) = @_; - local($last) = localtime($lasttime); - local($now) = localtime($current_time); + local($last) = scalar localtime($lasttime); + local($now) = scalar localtime($current_time); local($n, $s); - chop $now; - chop $last; # Header of statistics print "$what from $now to $last:\n"; print '~' x 79 . "\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2011-12-22 22:44:15
|
Revision: 73 http://mailagent.svn.sourceforge.net/mailagent/?rev=73&view=rev Author: rmanfredi Date: 2011-12-22 22:44:07 +0000 (Thu, 22 Dec 2011) Log Message: ----------- Applied patch from Julian Gilbey which fixed ctime() problem, replacting all the calls to ctime() with scalar(localtime()). Modified Paths: -------------- trunk/mailagent/agent/magent.sh trunk/mailagent/agent/pl/callout.pl trunk/mailagent/agent/pl/context.pl trunk/mailagent/agent/pl/stats.pl Modified: trunk/mailagent/agent/magent.sh =================================================================== --- trunk/mailagent/agent/magent.sh 2011-07-06 17:03:08 UTC (rev 72) +++ trunk/mailagent/agent/magent.sh 2011-12-22 22:44:07 UTC (rev 73) @@ -518,9 +518,8 @@ $HD_KEEP = 1; # Keep header fields # Faked leading From line (used for digest items, by SPLIT) - local($now) = &ctime(time); + local($now) = scalar(localtime()); $now =~ s/\s(\d:\d\d:\d\d)\b/0$1/; # Add leading 0 if hour < 10 - chop($now); $FAKE_FROM = "From mailagent " . $now; # Miscellaneous constants @@ -764,7 +763,6 @@ } !NO!SUBS! -$grep -v '^;#' pl/ctime.pl >>magent $grep -v '^;#' pl/jobnum.pl >>magent $grep -v '^;#' pl/read_conf.pl >>magent $grep -v '^;#' pl/acs_rqst.pl >>magent Modified: trunk/mailagent/agent/pl/callout.pl =================================================================== --- trunk/mailagent/agent/pl/callout.pl 2011-07-06 17:03:08 UTC (rev 72) +++ trunk/mailagent/agent/pl/callout.pl 2011-12-22 22:44:07 UTC (rev 73) @@ -214,7 +214,8 @@ return; } - print CALLOUT "# Mailagent callout queue, last updated " . &'ctime(time); + print CALLOUT "# Mailagent callout queue, last updated " . + scalar(localtime()) . "\n"; local(@type, @action, @file); local($type, $action, $file); Modified: trunk/mailagent/agent/pl/context.pl =================================================================== --- trunk/mailagent/agent/pl/context.pl 2011-07-06 17:03:08 UTC (rev 72) +++ trunk/mailagent/agent/pl/context.pl 2011-12-22 22:44:07 UTC (rev 73) @@ -85,7 +85,8 @@ } &'add_log("saving context file $cf'context") if $'loglvl > 17; local($key, $value, $item); - print CONTEXT "# Mailagent context, last updated " . &'ctime(time); + print CONTEXT "# Mailagent context, last updated " . + scalar(localtime()) . "\n"; while (($key, $value) = each %Context) { next unless $value; $item++; Modified: trunk/mailagent/agent/pl/stats.pl =================================================================== --- trunk/mailagent/agent/pl/stats.pl 2011-07-06 17:03:08 UTC (rev 72) +++ trunk/mailagent/agent/pl/stats.pl 2011-12-22 22:44:07 UTC (rev 73) @@ -540,8 +540,8 @@ # Print general informations, as found in @Top. sub print_general { local($what) = @_; - local($last) = &'ctime($lasttime); - local($now) = &'ctime($current_time); + local($last) = localtime($lasttime); + local($now) = localtime($current_time); local($n, $s); chop $now; chop $last; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2011-07-06 17:03:17
|
Revision: 72 http://mailagent.svn.sourceforge.net/mailagent/?rev=72&view=rev Author: rmanfredi Date: 2011-07-06 17:03:08 +0000 (Wed, 06 Jul 2011) Log Message: ----------- Added legacy ctime.pl file from the perl 5.10 distribution since ctime.pl is no longer part of the perl 5.12 environment. Modified Paths: -------------- trunk/mailagent/MANIFEST trunk/mailagent/agent/magent.sh trunk/mailagent/agent/pl/callout.pl trunk/mailagent/agent/pl/context.pl trunk/mailagent/agent/pl/stats.pl Added Paths: ----------- trunk/mailagent/agent/pl/ctime.pl Modified: trunk/mailagent/MANIFEST =================================================================== --- trunk/mailagent/MANIFEST 2011-05-23 07:11:07 UTC (rev 71) +++ trunk/mailagent/MANIFEST 2011-07-06 17:03:08 UTC (rev 72) @@ -122,6 +122,7 @@ agent/pl/cmdserv.pl Implements generic mail server agent/pl/compress.pl Folder compression library agent/pl/context.pl Mailagent context file handling +agent/pl/ctime.pl Legacy perl4 library to implement ctime() agent/pl/dbr.pl Internal database management agent/pl/distribs.pl Perl library to scan the distribs file agent/pl/dynload.pl Dynamically loads perl code into mailagent Modified: trunk/mailagent/agent/magent.sh =================================================================== --- trunk/mailagent/agent/magent.sh 2011-05-23 07:11:07 UTC (rev 71) +++ trunk/mailagent/agent/magent.sh 2011-07-06 17:03:08 UTC (rev 72) @@ -474,7 +474,6 @@ # Constants definitions sub init_constants { - require 'ctime.pl'; # Values for flock(), usually in <sys/file.h> $LOCK_SH = 1; # Request a shared lock on file $LOCK_EX = 2; # Request an exclusive lock @@ -765,6 +764,7 @@ } !NO!SUBS! +$grep -v '^;#' pl/ctime.pl >>magent $grep -v '^;#' pl/jobnum.pl >>magent $grep -v '^;#' pl/read_conf.pl >>magent $grep -v '^;#' pl/acs_rqst.pl >>magent Modified: trunk/mailagent/agent/pl/callout.pl =================================================================== --- trunk/mailagent/agent/pl/callout.pl 2011-05-23 07:11:07 UTC (rev 71) +++ trunk/mailagent/agent/pl/callout.pl 2011-07-06 17:03:08 UTC (rev 72) @@ -214,7 +214,6 @@ return; } - require 'ctime.pl'; print CALLOUT "# Mailagent callout queue, last updated " . &'ctime(time); local(@type, @action, @file); Modified: trunk/mailagent/agent/pl/context.pl =================================================================== --- trunk/mailagent/agent/pl/context.pl 2011-05-23 07:11:07 UTC (rev 71) +++ trunk/mailagent/agent/pl/context.pl 2011-07-06 17:03:08 UTC (rev 72) @@ -76,7 +76,6 @@ # Save a new context file, if it has changed since we read it. sub save { return unless $context_changed; # Do not save if no change - require 'ctime.pl'; local($existed) = -f $cf'context; &'acs_rqst($cf'context) if $existed; # Lock existing file unless (open(CONTEXT, ">$cf'context")) { Added: trunk/mailagent/agent/pl/ctime.pl =================================================================== --- trunk/mailagent/agent/pl/ctime.pl (rev 0) +++ trunk/mailagent/agent/pl/ctime.pl 2011-07-06 17:03:08 UTC (rev 72) @@ -0,0 +1,71 @@ +;# $Id$ +;# +;# Comes from perl 5.10 -- inclusion in mailagent is: +;# +;# Copyright (c) 2011, Raphael Manfredi +;# +;# You may redistribute only under the terms of the Artistic License, +;# as specified in the README file that comes with the distribution. +;# You may reuse parts of this distribution only within the terms of +;# that same Artistic License; a copy of which may be found at the root +;# of the source tree for mailagent 3.0. +;# +;# ctime.pl is a simple Perl emulation for the well known ctime(3C) function. +# +# This library is no longer being maintained, and is included for backward +# compatibility with Perl 4 programs which may require it. +# +# In particular, this should not be used as an example of modern Perl +# programming techniques. +# +# Suggested alternative: the POSIX ctime function +;# +;# Waldemar Kebsch, Federal Republic of Germany, November 1988 +;# kebsch.pad@nixpbe.UUCP +;# Modified March 1990, Feb 1991 to properly handle timezones +;# $RCSfile: ctime.pl,v $$Revision$$Date$ +;# Marion Hakanson (hak...@cs...) +;# Oregon Graduate Institute of Science and Technology +;# +;# usage: +;# +;# #include <ctime.pl> # see the -P and -I option in perl.man +;# $Date = &ctime(time); + +CONFIG: { + package ctime; + + @DoW = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); + @MoY = ('Jan','Feb','Mar','Apr','May','Jun', + 'Jul','Aug','Sep','Oct','Nov','Dec'); +} + +sub ctime { + package ctime; + + local($time) = @_; + local($[) = 0; + local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst); + + # Determine what time zone is in effect. + # Use GMT if TZ is defined as null, local time if TZ undefined. + # There's no portable way to find the system default timezone. + + $TZ = defined($ENV{'TZ'}) ? ( $ENV{'TZ'} ? $ENV{'TZ'} : 'GMT' ) : ''; + ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = + ($TZ eq 'GMT') ? gmtime($time) : localtime($time); + + # Hack to deal with 'PST8PDT' format of TZ + # Note that this can't deal with all the esoteric forms, but it + # does recognize the most common: [:]STDoff[DST[off][,rule]] + + if($TZ=~/^([^:\d+\-,]{3,})([+-]?\d{1,2}(:\d{1,2}){0,2})([^\d+\-,]{3,})?/){ + $TZ = $isdst ? $4 : $1; + } + $TZ .= ' ' unless $TZ eq ''; + + $year += 1900; + sprintf("%s %s %2d %2d:%02d:%02d %s%4d\n", + $DoW[$wday], $MoY[$mon], $mday, $hour, $min, $sec, $TZ, $year); +} + Property changes on: trunk/mailagent/agent/pl/ctime.pl ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/mailagent/agent/pl/stats.pl =================================================================== --- trunk/mailagent/agent/pl/stats.pl 2011-05-23 07:11:07 UTC (rev 71) +++ trunk/mailagent/agent/pl/stats.pl 2011-07-06 17:03:08 UTC (rev 72) @@ -419,7 +419,6 @@ # y: USELESS if -m, but kept for nice mnemonic # t: print only statistics for top-level rules (most recent rule file) sub main'report_stats { - require 'ctime.pl'; local($option) = @_; # Options from command line local($opt_u) = $option =~ /u/; # Only used rules local($opt_m) = $option =~ /m/; # Merge all statistics at the end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2011-05-23 07:11:15
|
Revision: 71 http://mailagent.svn.sourceforge.net/mailagent/?rev=71&view=rev Author: rmanfredi Date: 2011-05-23 07:11:07 +0000 (Mon, 23 May 2011) Log Message: ----------- Made the default compressor be "gzip" now when building an initial setup. Modified Paths: -------------- trunk/mailagent/agent/files/mailagent.cf trunk/mailagent/revision.h Modified: trunk/mailagent/agent/files/mailagent.cf =================================================================== --- trunk/mailagent/agent/files/mailagent.cf 2011-05-20 19:44:55 UTC (rev 70) +++ trunk/mailagent/agent/files/mailagent.cf 2011-05-23 07:11:07 UTC (rev 71) @@ -168,7 +168,7 @@ # Folder compression #compress : ~/.compress # Folder compression list compspecs: $spool/compressors # Compression progs config file -comptag : compress # Default compression tag +comptag : gzip # Default compression tag # Optional parameters (for experts...) #newcmd : $spool/newcmd # Definition of new filtering commands Modified: trunk/mailagent/revision.h =================================================================== --- trunk/mailagent/revision.h 2011-05-20 19:44:55 UTC (rev 70) +++ trunk/mailagent/revision.h 2011-05-23 07:11:07 UTC (rev 71) @@ -4,4 +4,4 @@ * Generated by ./bin/svn-revision. */ -#define REVISION 68 +#define REVISION 69 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2011-05-20 19:45:01
|
Revision: 70 http://mailagent.svn.sourceforge.net/mailagent/?rev=70&view=rev Author: rmanfredi Date: 2011-05-20 19:44:55 +0000 (Fri, 20 May 2011) Log Message: ----------- Changed default compression program to "gzip" since the latter is almost present everywhere nowadays whereas "compress" has faded out. Modified Paths: -------------- trunk/mailagent/agent/man/mailagent.SH trunk/mailagent/agent/pl/read_conf.pl trunk/mailagent/agent/test/misc/compress.t Modified: trunk/mailagent/agent/man/mailagent.SH =================================================================== --- trunk/mailagent/agent/man/mailagent.SH 2011-05-18 12:28:03 UTC (rev 69) +++ trunk/mailagent/agent/man/mailagent.SH 2011-05-20 19:44:55 UTC (rev 70) @@ -414,7 +414,7 @@ .TP .I comptag The default compression tag when creating new folders. -If not specified, the default is 'compress'. +If not specified, the default is 'gzip'. .TP .I comserver Name of the file containing authorized SERVER commands and their definition. Modified: trunk/mailagent/agent/pl/read_conf.pl =================================================================== --- trunk/mailagent/agent/pl/read_conf.pl 2011-05-18 12:28:03 UTC (rev 69) +++ trunk/mailagent/agent/pl/read_conf.pl 2011-05-20 19:44:55 UTC (rev 70) @@ -153,7 +153,7 @@ $umask = 077 unless defined $umask; $email = $user unless defined $email; $compspec = "$spool/compressors" unless defined $compspec; - $comptag = 'compress' unless defined $comptag; + $comptag = 'gzip' unless defined $comptag; $locksafe = 'OFF' unless defined $locksafe; $execsafe = 'OFF' unless defined $execsafe; Modified: trunk/mailagent/agent/test/misc/compress.t =================================================================== --- trunk/mailagent/agent/test/misc/compress.t 2011-05-18 12:28:03 UTC (rev 69) +++ trunk/mailagent/agent/test/misc/compress.t 2011-05-20 19:44:55 UTC (rev 70) @@ -20,14 +20,14 @@ do '../pl/misc.pl'; sub cleanup { - unlink "$user", "$user.Z", 'always', 'always.Z', 'another', '.compress'; + unlink "$user", "$user.gz", 'always', 'always.gz', 'another', '.compress'; } &cleanup; # Look whether compress is available. If not, do not perform this test. -unlink 'mail.Z'; -`compress mail`; -`uncompress mail` if $? == 0 && -f mail.Z; +unlink 'mail.gz'; +`gzip mail`; +`gunzip mail` if $? == 0 && -f mail.gz; if ($? != 0) { # No compress available in path, sorry print "-1\n"; # Do not perform any tests exit 0; @@ -47,24 +47,24 @@ `$cmd`; $? == 0 || print "4\n"; -f "$user" && print "5\n"; # Should be compressed --f "$user.Z" || print "6\n"; +-f "$user.gz" || print "6\n"; -f 'always' && print "7\n"; # Should also be compressed --f 'always.Z' || print "8\n"; +-f 'always.gz' || print "8\n"; -f 'another' || print "9\n"; # This one is not compressed --f 'another.Z' && print "10\n"; -$msize = -s "$user.Z"; +-f 'another.gz' && print "10\n"; +$msize = -s "$user.gz"; -`cp $user.Z $user >/dev/null 2>&1`; +`cp $user.gz $user >/dev/null 2>&1`; `$cmd`; $? == 0 || print "11\n"; -f "$user" || print "12\n"; # Should be not be recompressed --f "$user.Z" || print "13\n"; # Should still be there +-f "$user.gz" || print "13\n"; # Should still be there -f 'always' && print "14\n"; # Should also be compressed --f 'always.Z' || print "15\n"; +-f 'always.gz' || print "15\n"; -f 'another' || print "16\n"; # This one is not compressed --f 'another.Z' && print "17\n"; +-f 'another.gz' && print "17\n"; (-s $user != $msize) || print "18\n"; # Mail saved there -(-s "$user.Z" == $msize) || print "19\n"; # This one left undisturbed +(-s "$user.gz" == $msize) || print "19\n"; # This one left undisturbed unlink 'mail'; &cleanup; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2011-05-18 12:28:09
|
Revision: 69 http://mailagent.svn.sourceforge.net/mailagent/?rev=69&view=rev Author: rmanfredi Date: 2011-05-18 12:28:03 +0000 (Wed, 18 May 2011) Log Message: ----------- Applied patch from Yoshiaki Kasahara to shut up Perl 5.12 warnings. Modified Paths: -------------- trunk/mailagent/agent/pl/callout.pl trunk/mailagent/agent/pl/cmdserv.pl trunk/mailagent/agent/pl/listqueue.pl trunk/mailagent/agent/pl/mh.pl trunk/mailagent/agent/pl/rulenv.pl trunk/mailagent/revision.h Modified: trunk/mailagent/agent/pl/callout.pl =================================================================== --- trunk/mailagent/agent/pl/callout.pl 2010-11-07 12:27:01 UTC (rev 68) +++ trunk/mailagent/agent/pl/callout.pl 2011-05-18 12:28:03 UTC (rev 69) @@ -90,7 +90,7 @@ last; } close CALLOUT; - return unless defined %Callout; # Nothing loaded, empty file... + return unless %Callout; # Nothing loaded, empty file... local($next_callout) = (sort keys %Callout)[0]; if ($next_callout != $first_callout) { @@ -111,7 +111,7 @@ local($time, $action, $type, $no_input) = @_; &'add_log("queueing callout on $time ($action)") if $'loglvl > 15; $callout_changed++; - &load unless defined %Callout; + &load unless %Callout; local($qname) = '-'; # File not queued by default if ($type ne $SHELL && !$no_input) { # 'agent' or 'cmd' callouts have input by default, unless $no_input @@ -140,7 +140,7 @@ local($file) = @_; local($directory, $base) = $file =~ m|(.*)/(.*)|; $file = $directory eq $cf'queue ? $base : $file; - &load unless defined %Callout; + &load unless %Callout; local($time, $files); foreach $time (keys %Callfile) { $files = $Callfile{$time}; @@ -155,7 +155,7 @@ sub run { &'add_log("running callout queue") if $'loglvl > 15; $callout_changed++; - &load unless defined %Callout; + &load unless %Callout; local(@type, @action, @file); local($type, $action, $file); do { Modified: trunk/mailagent/agent/pl/cmdserv.pl =================================================================== --- trunk/mailagent/agent/pl/cmdserv.pl 2010-11-07 12:27:01 UTC (rev 68) +++ trunk/mailagent/agent/pl/cmdserv.pl 2011-05-18 12:28:03 UTC (rev 69) @@ -890,7 +890,7 @@ &cmdenv'set_cmd(join(' ', @command)); # Set command environment local($failed) = &dispatch; # Execute command - if (defined %powers) { + if (%powers) { $cmdenv'powers = $powers; %cmdenv'powers = %powers; print MAILER "Restored powers ($powers).\n"; Modified: trunk/mailagent/agent/pl/listqueue.pl =================================================================== --- trunk/mailagent/agent/pl/listqueue.pl 2010-11-07 12:27:01 UTC (rev 68) +++ trunk/mailagent/agent/pl/listqueue.pl 2011-05-18 12:28:03 UTC (rev 69) @@ -79,7 +79,7 @@ $: = " ,"; # Break recipients on white space or colon format STDOUT = @<<<<<<<<<@>>>>>>>@@<<<<<<<<<< @<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -$file $size $star $queued $status $sender +$file, $size,$star,$queued, $status, $sender ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< $recipient ~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Modified: trunk/mailagent/agent/pl/mh.pl =================================================================== --- trunk/mailagent/agent/pl/mh.pl 2010-11-07 12:27:01 UTC (rev 68) +++ trunk/mailagent/agent/pl/mh.pl 2011-05-18 12:28:03 UTC (rev 69) @@ -123,7 +123,7 @@ # Read MH profile, fill in %Profile entries. sub profile { - return if defined %Profile; + return if %Profile; # Make sure there is at least a valid Path entry, in case they made a # mistake and asked for MH folder saving without a valid .mh_profile... local($dflt) = defined($'XENV{'maildir'}) ? $'XENV{'maildir'} : 'Mail'; Modified: trunk/mailagent/agent/pl/rulenv.pl =================================================================== --- trunk/mailagent/agent/pl/rulenv.pl 2010-11-07 12:27:01 UTC (rev 68) +++ trunk/mailagent/agent/pl/rulenv.pl 2011-05-18 12:28:03 UTC (rev 69) @@ -61,7 +61,7 @@ # Set-up initial environment for rules. # This routine is called once for every mail parsed. sub setup { - &init unless defined %Spec; + &init unless %Spec; eval $SETUP if $SETUP ne ''; &'add_log("ERROR env'setup: $@") if $@; undef %Var; @@ -106,7 +106,7 @@ # If an action is required by the resetting of a variable, it is performed # following the directive from the %Spec table. sub restore { - return unless defined %Var; + return unless %Var; local($code) = ''; # Code built to restore original variable values foreach $var (keys %Var) { $code .= "\$$var = \$Var{'$var'};\n"; Modified: trunk/mailagent/revision.h =================================================================== --- trunk/mailagent/revision.h 2010-11-07 12:27:01 UTC (rev 68) +++ trunk/mailagent/revision.h 2011-05-18 12:28:03 UTC (rev 69) @@ -4,4 +4,4 @@ * Generated by ./bin/svn-revision. */ -#define REVISION 64 +#define REVISION 68 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2010-11-07 12:27:07
|
Revision: 68 http://mailagent.svn.sourceforge.net/mailagent/?rev=68&view=rev Author: rmanfredi Date: 2010-11-07 12:27:01 +0000 (Sun, 07 Nov 2010) Log Message: ----------- POST: INN2 does not like Injection-* headers. Modified Paths: -------------- trunk/mailagent/agent/pl/actions.pl Modified: trunk/mailagent/agent/pl/actions.pl =================================================================== --- trunk/mailagent/agent/pl/actions.pl 2010-09-16 11:43:06 UTC (rev 67) +++ trunk/mailagent/agent/pl/actions.pl 2010-11-07 12:27:01 UTC (rev 68) @@ -894,6 +894,7 @@ /^Accept-?[\w-]*:/i || # INN2 does not like this field /^Auth-?[\w-]*:/i || # INN2 does not like this field /^X-[\w-]+:/i || # INN2 does not like these fields + /^Injection-[\w-]+:/i || # INN2 does not like these fields /^Errors-To:/i # Error report redirection ) { $last_was_header = 1; # Mark we discarded the line This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2010-09-16 11:43:14
|
Revision: 67 http://mailagent.svn.sourceforge.net/mailagent/?rev=67&view=rev Author: rmanfredi Date: 2010-09-16 11:43:06 +0000 (Thu, 16 Sep 2010) Log Message: ----------- Ignore spurious trailing ";" at the end of the Content-Transfer-Encoding line when processing body. Modified Paths: -------------- trunk/mailagent/agent/pl/parse.pl Modified: trunk/mailagent/agent/pl/parse.pl =================================================================== --- trunk/mailagent/agent/pl/parse.pl 2010-09-16 11:41:15 UTC (rev 66) +++ trunk/mailagent/agent/pl/parse.pl 2010-09-16 11:43:06 UTC (rev 67) @@ -324,6 +324,7 @@ return; } my %enc = map { $_ => 1 } qw(7bit 8bit binary base64 quoted-printable); + $encoding =~ s/\s*;$//; # Strip (wrong) spurious trailing separator if (length $encoding) { &'add_log("WARNING unknown content transfer encoding \"$encoding\"") if $'loglvl > 5 && !$enc{$encoding}; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2010-09-16 11:41:25
|
Revision: 66 http://mailagent.svn.sourceforge.net/mailagent/?rev=66&view=rev Author: rmanfredi Date: 2010-09-16 11:41:15 +0000 (Thu, 16 Sep 2010) Log Message: ----------- Restrict matching pattern to avoid reporting false errors. Modified Paths: -------------- trunk/mailagent/agent/files/chkagent.sh Modified: trunk/mailagent/agent/files/chkagent.sh =================================================================== --- trunk/mailagent/agent/files/chkagent.sh 2009-09-02 17:33:05 UTC (rev 65) +++ trunk/mailagent/agent/files/chkagent.sh 2010-09-16 11:41:15 UTC (rev 66) @@ -55,7 +55,7 @@ if test -f "$logfile"; then grep "$today" $logfile > $todaylog - egrep ": ($lookat)" $todaylog > $output + egrep "]: ($lookat)" $todaylog > $output if test -s "$output"; then echo "*** Errors from logfile ($logfile):" > $report echo " " >> $report This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2009-09-02 17:33:16
|
Revision: 65 http://mailagent.svn.sourceforge.net/mailagent/?rev=65&view=rev Author: rmanfredi Date: 2009-09-02 17:33:05 +0000 (Wed, 02 Sep 2009) Log Message: ----------- Updated. Modified Paths: -------------- trunk/mailagent/revision.h Modified: trunk/mailagent/revision.h =================================================================== --- trunk/mailagent/revision.h 2009-09-02 15:42:07 UTC (rev 64) +++ trunk/mailagent/revision.h 2009-09-02 17:33:05 UTC (rev 65) @@ -4,4 +4,4 @@ * Generated by ./bin/svn-revision. */ -#define REVISION 56 +#define REVISION 64 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2009-09-02 15:42:17
|
Revision: 64 http://mailagent.svn.sourceforge.net/mailagent/?rev=64&view=rev Author: rmanfredi Date: 2009-09-02 15:42:07 +0000 (Wed, 02 Sep 2009) Log Message: ----------- Do not propagate Followup-To headers via POST, unless the value is "poster". Indeed, INN2 will reject the article if the newsgroup listed there is invalid. Modified Paths: -------------- trunk/mailagent/agent/pl/actions.pl Modified: trunk/mailagent/agent/pl/actions.pl =================================================================== --- trunk/mailagent/agent/pl/actions.pl 2009-09-02 15:40:54 UTC (rev 63) +++ trunk/mailagent/agent/pl/actions.pl 2009-09-02 15:42:07 UTC (rev 64) @@ -849,6 +849,15 @@ } print NEWS "Message-ID: $msgid\n"; + # If there is a Followup-To line, ignore it, unless it says "poster". + my $followup = $Header{'Followup-To'}; + if ($followup =~ /\bposter\b/) { + print NEWS "Followup-To: poster\n"; + } elsif ($followup ne '') { + &add_log("WARNING stripped Followup-To: $followup") + if $loglvl > 5; + } + # Protect Sender: lines in the original message and clean-up header local($last_was_header); # Set to true when header is skipped @@ -866,6 +875,7 @@ /^From:/i || # This one was cleaned up above /^Subject:/i || # This one handled above /^Message-Id:/i || # idem + /^Followup-To:/i || # idem /^Date:/i || # idem /^In-Reply-To:/i || /^References:/i || # One will be faked if missing This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2009-09-02 15:41:12
|
Revision: 63 http://mailagent.svn.sourceforge.net/mailagent/?rev=63&view=rev Author: rmanfredi Date: 2009-09-02 15:40:54 +0000 (Wed, 02 Sep 2009) Log Message: ----------- Be more picky about message IDs used for news: ensure there is but one "@". Modified Paths: -------------- trunk/mailagent/agent/pl/header.pl Modified: trunk/mailagent/agent/pl/header.pl =================================================================== --- trunk/mailagent/agent/pl/header.pl 2009-09-02 15:35:24 UTC (rev 62) +++ trunk/mailagent/agent/pl/header.pl 2009-09-02 15:40:54 UTC (rev 63) @@ -181,11 +181,35 @@ $fixup++ if s/[(){}]//g; # No () nor {} in names and ID $fixup++ if s/\.+>/>/g; # No trailing dot(s) $fixup++ if s/\.\.+/./g; # No consecutive dots + s/<([^>]*?)>/'<' . &header'msgid_fix($1, \$fixup) . '>'/ge; s/>\01</> </g; # Restore spaces between IDs $$mref = $_ if $fixup; return $fixup; } +# Perload OFF + +# Fixup one message ID by ensuring it has but one single "@" in it. +# Cannot be dataloaded since it is referenced from a regular expression +sub msgid_fix { + my ($x, $fixupref) = @_; + # Ensure at least one "@" + unless ($x =~ /@/) { + $$fixupref++; + return $x . "\@faked-by-mailagent.local"; + } + # Ensure only one "@" + if ($x =~ tr/@/@/ > 1) { + my ($leading, $trailing) = ($x =~ /(.*)@(.*)/); + $leading =~ s/@/./g; + $$fixupref++; + return $leading . '@' . $trailing; + } + return $x; +} + +# Perload ON + # Parse date from header and return its timestamp (seconds since the Epoch) sub parsedate { my ($str) = @_; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2009-09-02 15:35:44
|
Revision: 62 http://mailagent.svn.sourceforge.net/mailagent/?rev=62&view=rev Author: rmanfredi Date: 2009-09-02 15:35:24 +0000 (Wed, 02 Sep 2009) Log Message: ----------- English typo fixes. Modified Paths: -------------- trunk/mailagent/agent/man/mailagent.SH Modified: trunk/mailagent/agent/man/mailagent.SH =================================================================== --- trunk/mailagent/agent/man/mailagent.SH 2009-09-02 12:22:36 UTC (rev 61) +++ trunk/mailagent/agent/man/mailagent.SH 2009-09-02 15:35:24 UTC (rev 62) @@ -2429,7 +2429,7 @@ If you use 0, this is understood as a success, any other value meaning failure (i.e. the PERL command will return a failure status). Using the perl \fIexit\fR function directly would kill \fImailagent\fR and would probably incur some -mail looses. +mail losses. .PP The scripts used should remain simple. In particular, you should avoid the use of the \fIpackage\fR directive or define functions with a package name other @@ -3635,7 +3635,7 @@ Once you have extended the filtering command set, you may use those commands inside the rule file as if they were built-in. You may even choose to redefine the standard commands if they do not suit you (however, if you wish to do -that, you should know exactly what you are doing, or you may start loosing +that, you should know exactly what you are doing, or you may start losing some mail or get an unexpected behavior -- this also voids your warranty :-). .PP The ability to provide external commands without actually modifying the main This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2009-09-02 12:36:05
|
Revision: 61 http://mailagent.svn.sourceforge.net/mailagent/?rev=61&view=rev Author: rmanfredi Date: 2009-09-02 12:22:36 +0000 (Wed, 02 Sep 2009) Log Message: ----------- Be even stricter with X- headers in POST: only let a few selected ones through. Modified Paths: -------------- trunk/mailagent/agent/pl/actions.pl Modified: trunk/mailagent/agent/pl/actions.pl =================================================================== --- trunk/mailagent/agent/pl/actions.pl 2009-09-01 16:52:35 UTC (rev 60) +++ trunk/mailagent/agent/pl/actions.pl 2009-09-02 12:22:36 UTC (rev 61) @@ -861,9 +861,6 @@ ); foreach (split(/\n/, $Header{'Head'})) { - s/^Sender:/Prev-Sender:/i; - s/^(To|Cc):/X-$1:/i; # Keep distribution info - s/^(Resent-\w+):/X-$1:/i; next if /^From\s/; # First From line... if ( /^From:/i || # This one was cleaned up above @@ -875,28 +872,26 @@ /^Apparently-To:/i || /^Distribution:/i || # No mix-up, please /^Control:/i || - /^X-Server-[\w-]+:/i || /^Xref:/i || /^NNTP-Posting-.*:/i || # Cleanup for NNTP server /^Originator:/i || # Probably from news->mail gateway - /^X-Loop:/i || # INN does not like this field - /^X-Trace:/i || # idem /^Newsgroups:/i || # Reply from news reader /^Return-Receipt-To:/i || # Sendmail's acknowledgment /^Received:/i || # We want to remove this MTA trace /^Delivered-To:/i || # idem /^Precedence:/i || - /^X-Complaints-To:/i || # INN2 does not like this field - /^X-Mailing-List:/i || # INN2 does not like this field - /^X-Message-Flag:/i || # INN2 does not like this field - /^X-Mail-Handler:/i || # INN2 does not like this field - /^X-Virus-Status:/i || # INN2 does not like this field /^DKIM-Signature:/i || # INN2 does not like this field + /^Accept-?[\w-]*:/i || # INN2 does not like this field + /^Auth-?[\w-]*:/i || # INN2 does not like this field + /^X-[\w-]+:/i || # INN2 does not like these fields /^Errors-To:/i # Error report redirection ) { $last_was_header = 1; # Mark we discarded the line next; # Line is skipped } + s/^Sender:/Prev-Sender:/i; + s/^(To|Cc):/X-$1:/i; # Keep distribution info + s/^(Resent-\w+):/X-$1:/i; # Skip any RFC-822 header that is not purely made up of [\w-]+ # as it is not possible it can be meaningful to the news system. if (/^([!-9;-~\w-]+):/) { @@ -921,6 +916,8 @@ } next if /^\s/ && $last_was_header; # Skip removed header continuations $last_was_header = 0; # We decided to keep header line + s/^([\w-]+):\s+/$1: /; # INN2 is picky: wants one space + # Ensure that we always put a single space after the field name # (before possibly emitting a newline for the continuation) if (s/^([\w-]+):(\S)/$1: $2/ || s/^([\w-]+):$/$1: /) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2009-09-01 16:52:41
|
Revision: 60 http://mailagent.svn.sourceforge.net/mailagent/?rev=60&view=rev Author: rmanfredi Date: 2009-09-01 16:52:35 +0000 (Tue, 01 Sep 2009) Log Message: ----------- Have POST strip more headers from the message, since INN2 will reject the message anyway if they are present. Modified Paths: -------------- trunk/mailagent/agent/pl/actions.pl Modified: trunk/mailagent/agent/pl/actions.pl =================================================================== --- trunk/mailagent/agent/pl/actions.pl 2008-08-19 08:48:44 UTC (rev 59) +++ trunk/mailagent/agent/pl/actions.pl 2009-09-01 16:52:35 UTC (rev 60) @@ -887,6 +887,11 @@ /^Delivered-To:/i || # idem /^Precedence:/i || /^X-Complaints-To:/i || # INN2 does not like this field + /^X-Mailing-List:/i || # INN2 does not like this field + /^X-Message-Flag:/i || # INN2 does not like this field + /^X-Mail-Handler:/i || # INN2 does not like this field + /^X-Virus-Status:/i || # INN2 does not like this field + /^DKIM-Signature:/i || # INN2 does not like this field /^Errors-To:/i # Error report redirection ) { $last_was_header = 1; # Mark we discarded the line This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2008-08-19 08:48:46
|
Revision: 59 http://mailagent.svn.sourceforge.net/mailagent/?rev=59&view=rev Author: rmanfredi Date: 2008-08-19 08:48:44 +0000 (Tue, 19 Aug 2008) Log Message: ----------- Had forgotten to list the remote dependency on termios.pl. Modified Paths: -------------- trunk/mailagent/agent/Jmakefile trunk/mailagent/agent/Makefile.SH Modified: trunk/mailagent/agent/Jmakefile =================================================================== --- trunk/mailagent/agent/Jmakefile 2008-08-19 08:44:07 UTC (rev 58) +++ trunk/mailagent/agent/Jmakefile 2008-08-19 08:48:44 UTC (rev 59) @@ -50,12 +50,12 @@ * different architectures). */ ->BINDIR InstallScript(mailagent,$(BINDIR)) SetSubdirs(pl filter files man test examples) DependDirs(pl filter) RemoteDependency(pl/utmp,utmp.pl) +RemoteDependency(pl/termios,termios.pl) BINSH = \ |expand f!$(BIN)! @@ -63,10 +63,6 @@ -expand magent.sh ->SED ->RM ->MKDEP - depend:: ($(SED) '/^# DO NOT DELETE/q' Makefile && \ grep '^\$$grep' $(BINSH) | \ Modified: trunk/mailagent/agent/Makefile.SH =================================================================== --- trunk/mailagent/agent/Makefile.SH 2008-08-19 08:44:07 UTC (rev 58) +++ trunk/mailagent/agent/Makefile.SH 2008-08-19 08:48:44 UTC (rev 59) @@ -1,5 +1,5 @@ -: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.0 PL70] -: $X-Id: Jmake.tmpl,v 3.0.1.3 1997/02/28 14:56:16 ram Exp ram $ +: Makefile.SH generated from Jmake.tmpl and Jmakefile [jmake 3.5-25] +: $X-Id: Jmake.tmpl 8 2006-08-25 22:27:18Z rmanfredi $ case $CONFIG in '') @@ -22,6 +22,7 @@ echo "Extracting ${DIR}Makefile (with variable substitutions)" INSTALL=`echo $install | sed -e 's,\./i,\$(TOP)/i,'` +INSTALLDIR=`echo $installdir | sed -e 's,\./i,\$(TOP)/i,'` DATE=`date` $spitshell >Makefile <<!GROK!THIS! @@ -34,16 +35,16 @@ CURRENT = $CURRENT DIR = $DIR INSTALL = $INSTALL +INSTALLDIR = $INSTALLDIR ######################################################################## # Parameters set by Configure -- edit config.sh if changes are needed BINDIR = $installbin CTAGS = ctags +JCPPFLAGS = $cppflags L = $manext MANSRC = $installmansrc -MAKE = make -MKDEP = $mkdep \$(DPFLAGS) -- MV = $mv RM = $rm -f SCRIPTDIR = $installscript @@ -59,22 +60,15 @@ $spitshell >>Makefile <<'!NO!SUBS!' ######################################################################## # Jmake rules for building libraries, programs, scripts, and data files -# $X-Id: Jmake.rules,v 3.0.1.6 1997/02/28 14:56:01 ram Exp ram $ +# $X-Id: Jmake.rules 18 2006-12-27 10:35:09Z rmanfredi $ ######################################################################## -# Force 'make depend' to be performed first -- do not edit - -.FORCE_DEPEND:: - -all:: .FORCE_DEPEND - -######################################################################## # Start of Jmakefile -# $X-Id: Jmakefile,v 3.0.1.3 1994/10/31 11:12:59 ram Exp ram $ +# $X-Id: Jmakefile,v 3.0.1.4 1999/07/12 13:40:32 ram Exp ram $ # # Copyright (c) 1990-2006, Raphael Manfredi -# +# # You may redistribute only under the terms of the Artistic License, # as specified in the README file that comes with the distribution. # You may reuse parts of this distribution only within the terms of @@ -82,6 +76,9 @@ # of the source tree for mailagent 3.0. # # $X-Log: Jmakefile,v $ +# Revision 3.0.1.4 1999/07/12 13:40:32 ram +# patch66: will now install examples as well +# # Revision 3.0.1.3 1994/10/31 11:12:59 ram # patch23: file magent.sh now replaces magent.SH to avoid auto-extraction # @@ -121,16 +118,20 @@ /bin/sh edusers.SH -install:: $(SCRIPTS) $(LSCRIPTS) - @for file in $(SCRIPTS) $(LSCRIPTS); do \ - case '${MFLAGS}' in *[i]*) set +e;; esac; \ - (set -x; $(INSTALL) -c -m 555 $$file $(SCRIPTDIR)); \ +local_install:: $(SCRIPTS) $(LSCRIPTS) + @case '${MFLAGS}' in *[i]*) set +e;; esac; \ + (set -x; test -d $(INSTALL_PREFIX)$(SCRIPTDIR) || \ + $(INSTALLDIR) $(INSTALL_PREFIX)$(SCRIPTDIR)); \ + for file in $(SCRIPTS) $(LSCRIPTS); do \ + (set -x; \ + $(INSTALL) -c -m 555 $$file $(INSTALL_PREFIX)$(SCRIPTDIR)) || \ + exit 1; \ done -deinstall:: +local_deinstall:: @for file in $(SCRIPTS) $(LSCRIPTS); do \ - case '${MFLAGS}' in *[i]*) set +e;; esac; \ - (set -x; $(RM) $(SCRIPTDIR)/$$file); \ + case '${MFLAGS}' in *[i]*) set +e;; esac; \ + (set -x; $(RM) $(INSTALL_PREFIX)$(SCRIPTDIR)/$$file); \ done @@ -151,18 +152,21 @@ perl $(TOP)/bin/perload -o magent > $@ chmod +rx $@ -install:: mailagent - $(INSTALL) -c -m 555 mailagent $(BINDIR) +local_install:: mailagent + @case '${MFLAGS}' in *[i]*) set +e;; esac; \ + (set -x; test -d $(INSTALL_PREFIX)$(BINDIR) || \ + $(INSTALLDIR) $(INSTALL_PREFIX)$(BINDIR)); \ + $(INSTALL) -c -m 555 mailagent $(INSTALL_PREFIX)$(BINDIR) -deinstall:: - $(RM) $(BINDIR)/mailagent +local_deinstall:: + $(RM) $(INSTALL_PREFIX)$(BINDIR)/mailagent depend:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in pl filter ;\ do \ - (cd $$i ; echo "Depending" "in $(DIR)$$i..."; \ - $(MAKE) $(MFLAGS) depend); \ + (cd $$i ; echo "Depending" "in $(DIR)$$i..."; \ + $(MAKE) $(MFLAGS) depend) || exit 1; \ done .FORCE: @@ -172,6 +176,11 @@ cd pl/utmp; $(MAKE) utmp.pl @echo "Continuing in $(CURRENT)..." +pl/termios/termios.pl: .FORCE + @echo "Checking "termios.pl" in "pl/termios"..." + cd pl/termios; $(MAKE) termios.pl + @echo "Continuing in $(CURRENT)..." + BINSH = \ mailpatch.SH \ mailhelp.SH \ @@ -193,29 +202,51 @@ ######################################################################## # Common rules for all Makefiles -- do not edit -emptyrule:: +all:: clean: sub_clean local_clean realclean: sub_realclean local_realclean clobber: sub_clobber local_clobber local_clean:: - $(RM) core *~ *.o + if test -f core; then $(RM) core; fi + $(RM) *~ *.o local_realclean:: local_clean local_clobber:: local_realclean $(RM) Makefile config.sh +install:: local_install sub_install +install.man:: maybe_install.man sub_install.man +deinstall:: sub_deinstall local_deinstall +deinstall.man:: sub_deinstall.man maybe_deinstall.man + +install.man-yes: local_install.man +install.man-no: +deinstall.man-yes: local_deinstall.man +deinstall.man-no: + +!NO!SUBS! +case "$installmansrc" in +'') man=no;; +*) man=yes;; +esac +$spitshell >>Makefile <<!GROK!THIS! +maybe_install.man: install.man-$man +maybe_deinstall.man: deinstall.man-$man +!GROK!THIS! +$spitshell >>Makefile <<'!NO!SUBS!' + Makefile.SH: Jmakefile -@if test -f $(TOP)/.package; then \ - if test -f Makefile.SH; then \ - echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ - $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ - fi; \ - echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \ - $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \ - else touch $@; exit 0; fi + if test -f Makefile.SH; then \ + echo " $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~"; \ + $(RM) Makefile.SH~; $(MV) Makefile.SH Makefile.SH~; \ + fi; \ + echo " $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT)" ; \ + $(JMAKE) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT) ; \ + else touch $@; fi Makefile: Makefile.SH /bin/sh Makefile.SH @@ -234,21 +265,23 @@ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ - (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \ - $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)); \ + (cd $$i ; echo $(VERB) "in $(DIR)$$i..."; \ + $(MAKE) $(MFLAGS) $(FLAGS) $(TARGET)) || exit 1; \ done -install:: +sub_install:: @$(MAKE) subdirs TARGET=install VERB="Installing" FLAGS= -deinstall:: +sub_deinstall:: @$(MAKE) subdirs TARGET=deinstall VERB="Deinstalling" FLAGS= + @echo "Back to $(CURRENT) for "deinstall... -install.man:: +sub_install.man:: @$(MAKE) subdirs TARGET=install.man VERB="Installing man pages" FLAGS= -deinstall.man:: +sub_deinstall.man:: @$(MAKE) subdirs TARGET=deinstall.man VERB="Deinstalling man pages" FLAGS= + @echo "Back to $(CURRENT) for "deinstall.man... sub_clean:: @$(MAKE) subdirs TARGET=clean VERB="Cleaning" FLAGS= @@ -266,49 +299,51 @@ @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS) ;\ do \ - (cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \ - $(MAKE) $(MFLAGS) tag); \ + (cd $$i ; echo "Tagging" "in $(DIR)$$i..."; \ + $(MAKE) $(MFLAGS) tag) || exit 1; \ done Makefiles:: @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS);\ do \ - echo "Making "Makefiles" in $(DIR)$$i..."; \ - (cd $$i || exit 1; \ - if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \ - $(MAKE) $(MFLAGS) Makefiles) \ + echo "Making "Makefiles" in $(DIR)$$i..."; \ + (cd $$i || exit 1; \ + if test ! -f Makefile; then /bin/sh Makefile.SH; fi; \ + $(MAKE) $(MFLAGS) Makefiles) || exit 1;\ done Makefiles.SH:: Makefile.SH @case '${MFLAGS}' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS);\ do \ - case "$(DIR)$$i/" in \ - */*/*/*/) newtop=../../../..;; \ - */*/*/) newtop=../../..;; \ - */*/) newtop=../..;; \ - */) newtop=..;; \ - esac; \ - case "$(TOP)" in \ - /*) newtop="$(TOP)" ;; \ - esac; \ - echo "Making Makefiles.SH in $(DIR)$$i..."; \ - (cd $$i || exit 1; $(MAKE) $(MFLAGS) -f ../Makefile \ - Makefile TOP=$$newtop CURRENT=$(DIR)$$i;\ - $(MAKE) $(MFLAGS) Makefiles.SH) \ + case "$(DIR)$$i/" in \ + */*/*/*/) newtop=../../../..;; \ + */*/*/) newtop=../../..;; \ + */*/) newtop=../..;; \ + */) newtop=..;; \ + esac; \ + case "$(TOP)" in \ + /*) newtop="$(TOP)" ;; \ + esac; \ + echo "Making Makefiles.SH in $(DIR)$$i..."; \ + (cd $$i || exit 1; \ + if test -f Jmakefile; then \ + $(MAKE) $(MFLAGS) -f ../Makefile \ + Makefile TOP=$$newtop CURRENT=$(DIR)$$i && \ + $(MAKE) $(MFLAGS) Makefiles.SH; \ + fi; \ + ) || exit 1; \ done all:: @$(MAKE) subdirs TARGET=all VERB="Making all" FLAGS= -######################################################################## -# Dependencies generated by make depend -# DO NOT DELETE THIS LINE -- make depend relies on it +local_install:: +local_deinstall:: +local_install.man:: +local_deinstall.man:: -# Put nothing here or make depend will gobble it up -.FORCE_DEPEND:: - @echo "You must run 'make depend' in $(TOP) first."; exit 1 !NO!SUBS! chmod 644 Makefile $eunicefix Makefile This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <rma...@us...> - 2008-08-19 08:44:10
|
Revision: 58 http://mailagent.svn.sourceforge.net/mailagent/?rev=58&view=rev Author: rmanfredi Date: 2008-08-19 08:44:07 +0000 (Tue, 19 Aug 2008) Log Message: ----------- Applied patch from Barry Friedman to let filter compile on FreeBSD: must not include <malloc.h> when <stdlib.h> is available. Modified Paths: -------------- trunk/mailagent/agent/filter/environ.c trunk/mailagent/agent/filter/hash.c trunk/mailagent/agent/filter/io.c trunk/mailagent/agent/filter/logfile.c trunk/mailagent/agent/filter/misc.c Modified: trunk/mailagent/agent/filter/environ.c =================================================================== --- trunk/mailagent/agent/filter/environ.c 2008-07-02 21:59:34 UTC (rev 57) +++ trunk/mailagent/agent/filter/environ.c 2008-08-19 08:44:07 UTC (rev 58) @@ -46,11 +46,15 @@ #else #include <strings.h> #endif +#ifdef I_STDLIB +#include <stdlib.h> +#else #ifdef I_MALLOC #include <malloc.h> #else extern char *malloc(); /* Memory allocation */ #endif +#endif /* I_STDLIB */ #include "confmagic.h" #define ENV_VARS 200 /* An average number of environment vars */ Modified: trunk/mailagent/agent/filter/hash.c =================================================================== --- trunk/mailagent/agent/filter/hash.c 2008-07-02 21:59:34 UTC (rev 57) +++ trunk/mailagent/agent/filter/hash.c 2008-08-19 08:44:07 UTC (rev 58) @@ -30,9 +30,15 @@ #include "config.h" #include "portable.h" +#ifdef I_STDLIB +#include <stdlib.h> +#else #ifdef I_MALLOC #include <malloc.h> +#else +extern char *malloc(); /* Memory allocation */ #endif +#endif /* I_STDLIB */ #ifdef I_STRING #include <string.h> Modified: trunk/mailagent/agent/filter/io.c =================================================================== --- trunk/mailagent/agent/filter/io.c 2008-07-02 21:59:34 UTC (rev 57) +++ trunk/mailagent/agent/filter/io.c 2008-08-19 08:44:07 UTC (rev 58) @@ -105,11 +105,15 @@ #include <unistd.h> /* R_OK and friends */ #endif +#ifdef I_STDLIB +#include <stdlib.h> +#else #ifdef I_MALLOC #include <malloc.h> #else -extern char *malloc(); +extern char *malloc(); /* Memory allocation */ #endif +#endif /* I_STDLIB */ #ifdef I_SYS_WAIT #include <sys/wait.h> Modified: trunk/mailagent/agent/filter/logfile.c =================================================================== --- trunk/mailagent/agent/filter/logfile.c 2008-07-02 21:59:34 UTC (rev 57) +++ trunk/mailagent/agent/filter/logfile.c 2008-08-19 08:44:07 UTC (rev 58) @@ -48,9 +48,15 @@ #include <errno.h> #include <sys/types.h> +#ifdef I_STDLIB +#include <stdlib.h> +#else #ifdef I_MALLOC #include <malloc.h> +#else +extern char *malloc(); /* Memory allocation */ #endif +#endif /* I_STDLIB */ #ifdef I_TIME # include <time.h> Modified: trunk/mailagent/agent/filter/misc.c =================================================================== --- trunk/mailagent/agent/filter/misc.c 2008-07-02 21:59:34 UTC (rev 57) +++ trunk/mailagent/agent/filter/misc.c 2008-08-19 08:44:07 UTC (rev 58) @@ -41,11 +41,15 @@ #include <stdio.h> +#ifdef I_STDLIB +#include <stdlib.h> +#else #ifdef I_MALLOC #include <malloc.h> #else -extern char *malloc(); +extern char *malloc(); /* Memory allocation */ #endif +#endif /* I_STDLIB */ #ifdef I_STRING #include <string.h> @@ -53,10 +57,6 @@ #include <strings.h> #endif -#ifdef I_STDLIB -#include <stdlib.h> -#endif - #include <ctype.h> #include "sysexits.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |