!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.3.27 

uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 

uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364)  

Safe-mode: OFF (not secure)

/usr/share/doc/libmail-box-perl/examples/   drwxr-xr-x
Free 713.49 GB of 879.6 GB (81.12%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     smaller.pl (2.26 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |

# Demonstration on reducing the size of a folder.
#
# This code can be used and modified without restriction.
# Mark Overmeer, <[email protected]>, 12 jul 2003

use warnings;
use strict;
use lib ('../lib', 'lib');

use Mail::Box::Manager;
use Mail::Message;
use List::Util 'sum';

my $for_real = 0;   # set to 'true' to make changes
sub size($) { Mail::Message->shortSize($_[0]) }  # nice output of value

#
# Get the command line arguments.
#

die "Usage: $0 folder\n"
    unless @ARGV==1;

my $name   = shift @ARGV;
my $mgr    = Mail::Box::Manager->new;

my $folder = $mgr->open
  ( $name
  , access => ($for_real ? 'rw' : 'r')
  );

die "Cannot open folder $name" unless $folder;
print "** Dry run: no changes made to $name\n" unless $for_real;

my $msgs = $folder->messages;
my $size = $folder->size;
print "Folder contains $msgs messages at start, in total about ",
    size($size), " bytes\n";

foreach my $msg ($folder->messages)
{   $msg->head->removeResentGroups;
}

my $newsize = $folder->size;
print "After removal of resent groups, the folder is about ",
    size($newsize), " bytes\n";
my $resentsize = $size - $newsize;

foreach my $msg ($folder->messages)
{   $msg->head->removeListGroup;
}

my $newsize2 = $folder->size;
print "After removal of list groups, the folder is only ",
    size($newsize2), " bytes\n";
my $listsize = $newsize - $newsize2;

foreach my $msg ($folder->messages)
{   $msg->head->removeSpamGroups;
}
my $finalsize = $folder->size;
print "After removal of spam groups, the folder is only ",
    size($finalsize), " bytes\n";
my $spamsize = $newsize2 - $finalsize;

# Final statistics
sub percent($$)
{   my ($part, $size) = @_;
    sprintf "%4.1f%%  (%s)", ($part*100)/$size, size($part);
}

my $sizeheads = sum map {$_->head->size}
                       map {$_->parts}
                   $folder->messages;

print '  resent headers were   ', percent($resentsize,$size), "\n",
      '  list headers were     ', percent($listsize,$size), "\n",
      '  spam headers were     ', percent($spamsize,$size), "\n",
      '  remaining headers are ', percent($sizeheads, $size), "\n",
      '  size of bodies is     ', percent($finalsize-$sizeheads, $size), "\n";

# End
if($for_real) { $folder->close }
else          { $folder->close(write => 'NEVER') }

exit 0;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0149 ]--