GIF89a=( �' 7IAXKgNgYvYx\%wh&h}t�h%�s%x�}9�R��&�0%� (�.��5�SD��&�a)�x5��;ͣ*ȡ&ղ)ׯ7׵<ѻ4�3�H֧KͯT��Y�aq��q��F� !� ' !� NETSCAPE2.0 , =( ��pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g���E�������R���E����B�� ��ȸ��D���"�Ů� �H��L��D٫D�B�����D���T���H �G��A R�ڐ |�� ٭&��E8�S�kG�A�px�a��� R2XB��E8I���6X�:vT)�~��q�賥��"F~%x� � 4#Z�0O|-4Bs�X:= Q� Sal��yXJ`GȦ|s h��K3l7�B|�$'7Jީܪ0!��D�n=�P� ����0`�R�lj����v>���5 �.69�ϸd�����nlv�9��f{���Pbx �l5}�p� ��� �3a���I�O����!ܾ���i��9��#��)p�a ޽ �{�)vm��%D~ 6f��s}Œ�D�W E�`!� �&L8x� �ܝ{)x`X/>�}m��R�*|`D�=�_ ^�5 !_&'a�O�7�c��`DCx`�¥�9�Y�F���`?��"� �n@`�} lď��@4>�d S �v�xN��"@~d��=�g�s~G��� ���ud &p8Q�)ƫlXD����A~H�ySun�j���k*D�LH�] ��C"J��Xb~ʪwSt}6K,��q�S:9ت:���l�@�`�� �.۬�t9�S�[:��=`9N����{¿�A !R�:���6��x�0�_ �;������^���#����!����U���;0L1�����p% A��U̬ݵ��%�S��!���~`�G���� ���=4�np�3���������u�u�ٮ|%2�I��r�#0��J``8�@S@5� ���^`8E�]�.�S���7 � �0�j S�D� z���i�S�����!���l��w9*�D�I�nEX��� &A�Go�Qf��F��;���}�J����F5��Q|���X��T��y���]� o ��C=��:���PB@ D׽S�(>�C�x}`��xJЬ�۠��p+eE0`�}`A �/NE�� �9@��� H�7�!%B0`�l*��!8 2�%� �:�1�0E��ux%nP1�!�C)�P81l�ɸF#Ƭ{����B0>�� �b�`��O3��()yRpb��E.ZD8�H@% �Rx+%���c� ���f��b�d�`F�"8�XH"��-�|1�6iI, 2�$+](A*j� QT�o0.�U�`�R�}`�SN����yae�����b��o~ S)�y�@��3 �tT�0�&�+~L�f"�-|�~��>!�v��~�\Q1)}@�}h#aP72�"�$ !� " , =( &7IAXG]KgNgYvYxR"k\%w]'}h}t�h%�g+�s%r.m3ax3�x�}9��&��+�!7�0%� (�.�SD��&��;�"&ײ)׻4��6�K� �@pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g �� E �� �������E �´��C���ǶR��D��"Ʒ�ʱH��M��GڬD�B����D��T����G���C�C� l&�~:'�tU�6ɹ#��)�'�.6�&��Ȼ K(8p0N�?!�2"��NIJX>R��OM '��2�*x�>#n� �@<[:�I�f ��T���Cdb��[�}E�5MBo��@�`@��tW-3 �x�B���jI�&E�9[T&$��ﯧ&"s��ȳ����dc�UUρ#���ldj?����`\}���u|3'�R]�6 �S#�!�FKL�*N E���`$�:e�YD�q�.�촁�s \-�jA 9�����-��M[�x(�s��x�|���p��}k�T�DpE@W� ��]k`1� ���Yb ��0l��*n0��"~zBd�~u�7�0Bl��0-�x~|U�U0 �h�*HS�|��e"#"?vp�i`e6^�+q��`m8 #V�� ��VS|`��"m"сSn|@:U���~`pb�G�ED����2F�I�? >�x� R� ��%~jx��<�a�9ij�2�D��&: Z`�]w���:�6��B�7eFJ|�ҧ�,���FǮcS�ʶ+B�,�ܺN���>PAD�HD��~���n��}�#�� Q��S���2�X�{�k�lQ�2�����w�|2� h9��G�,m���3��6-��E�L��I�³*K���q�`DwV�QXS��peS��� qܧTS����R�u �<�a�*At�lmE� � ��N[P1�ۦ��$��@`��Dpy�yXvCAy�B`}D� 0QwG#� �a[^�� $���Ǧ{L�"[��K�g�;�S~��GX.�goT.��ư��x���?1z��x~:�g�|�L� ��S`��0S]P�^p F<""�?!,�!N4&P� ����:T�@h�9%t��:�-~�I<`�9p I&.)^ 40D#p@�j4�ج:�01��rܼF2oW�#Z ;$Q q  �K��Nl#29 !F@�Bh�ᏬL!XF�LHKh�.�hE&J�G��<"WN!�����Y@� >R~19J"�2,/ &.GXB%�R�9B6�W]���W�I�$��9�RE8Y� ��"�A5�Q.axB�&ة�J�! �t)K%tS-�JF b�NMxL��)�R��"���6O!TH�H� 0 !� ) , =( &AXKgNgYvYxR"k\%wh&h}h%�g+�s%r.x3�x�}9��&��+�R,�!7�0%� (�.��5��&�a)��;�"&ף*Ȳ)ׯ7׻4�3��6�H֧KͻH�T��Y��q��h� ��pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g �� E$����� � ����$E$��"��D� � ������R��C��� E ��H�M��G�D� �B��ϾD��a��`1r��Ӑ�� �o~�zU!L�C'�yW�UGt����ll�0���uG�)A�s[��x� �xO%��X2�  P�n:R/��aHae+�Dm?# ǣ6�8�J�x�Di�M���j���5oQ7�- <! *�l��R2r/a!l)d� A"�E���� &� ;��c �%����b��pe~C"B���H�eF2��`8qb�t_`ur`e� w�u3��Pv�h""�`�Íx�LĹ��3� �~ֺ�:���MDfJ� �۵�W�%�S�X �؁)�@��:E��w�u�Sxb8y\m�zS��Zb�E�L��w!y(>�"w�=�|��s�d �C�W)H�cC$�L �7r.�\{)@�`@ �X�$PD `aaG:���O�72E�amn]�"Rc�x�R� &dR8`g��i�xLR!�P &d����T���i�|�_ � Qi�#�`g:��:noM� :V �)p����W&a=�e�k� j���1߲s�x�W�jal|0��B0�, \j۴:6���C ��W��|��9���zĸV {�;��n��V�m�I��.��PN� ����C��+��By�ѾHŸ:��� 7�Y�FTk�SaoaY$D�S���29R�kt� ��f� ��:��Sp�3�I��DZ� �9���g��u�*3)O��[_hv ,���Et x�BH� �[��64M@�S�M7d�l�ܶ5-��U܍��z�R3Ԭ3~ ��P��5�g: ���kN�&0�j4���#{��3S�2�K�'ợl���2K{� {۶?~m𸧠�I�nE�='����^���_�=��~�#O���'���o..�Y�n��CSO��a��K��o,���b�����{�C�� "�{�K ��w��Ozdը�:$ ���v�] A#� ���a�z)Rx׿ƥ�d``�w-�y�f�K!����|��P��=�`�(f��'Pa ��BJa%��f�%`�}F����6>��`G"�}�=�!o`�^FP�ةQ�C���`(�}\�ݮ ��$<��n@dĠE#��U�I�!� #l��9`k���'Rr��Z�NB�MF �[�+9���-�wj���8�r� ,V�h"�|�S=�G_��"E� 0i*%̲��da0mVk�):;&6p>�jK ��# �D�:�c?:R Ӭf��I-�"�<�="��7�3S��c2RW ,�8(T"P0F¡Jh�" ; 403WebShell
403Webshell
Server IP : 81.88.48.95  /  Your IP : 10.2.217.94, 216.73.216.227
Web Server : Apache
System : Linux opus12 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u3 x86_64
User : nobody ( 99)
PHP Version : 5.3.3-7+squeeze3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/sendmail/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/sendmail/update_conf
#!/usr/bin/perl -w
#------------------------------------------------------------------------
#
# $Sendmail: update_conf,v 8.14.3 2010-09-21 11:05:34 cowboy Exp $
#
# Parse and update /etc/mail/sendmail.conf and reflect its values in
# /etc/cron.d/sendmail and /etc/inetd.conf.
#
# Copyright (c) 2001-2009 Richard Nelson.  All Rights Reserved.
#
#------------------------------------------------------------------------
#
use strict;			# be kosher
use Cwd;			# provide cwd()
use Env;			# A few environmental references
use integer;		# Peformance
use Sys::Hostname;	# make sure we have a valid hostname
use Getopt::Long;	# parameter handling
use FileHandle;		# I/O

# Local libraries - for Debian Sendmail Perl helper functions
# BEGIN { $main::my_path = substr($0,$[,rindex($0,'/')) };
use lib ('.', substr($0,$[,rindex($0,'/')), "/usr/share/sendmail");
require Parse_conf;
require Parse_mc;

$main::program_name = $0; #'update_conf';
$main::program_version = '8.14.3';
$main::program_date = '2010-09-21 11:05:34 cowboy';
$main::debug = 0;

my $interp_pgm = "$^X";
my $interp_vrm = $];
$interp_vrm = ("$^V" | '000') if (defined $^V);
my $current_time = scalar localtime;
my $user = getlogin || (getpwuid($<))[0] || "Unknown!!";
my $hostname = hostname();
my $directory = getcwd();

my $Conffile = "/etc/mail/sendmail.conf";
my $output_file = '';
my $ofh = new FileHandle;
my $debug = 0;

#
#------------------------------------------------------------------------------
# Global variables
#------------------------------------------------------------------------------

#
#------------------------------------------------------------------------------
# Finally, some code (almost)
#------------------------------------------------------------------------------

#
# Argument handling...
$main::opt_help='';
$main::opt_output_file='';
$main::opt_input_file='';
$main::opt_debug='';
$main::opt_test='';
$main::opt_static='';
my @options = qw(
	help|h
	output-file|output_file|o:s
	input-file|input_file|i:s
	debug!
	test!
	static!
	);
my $result = GetOptions(@options);
if ( ! $result ) {
	die "Terminating due to parameter error";
	};
if ( $main::opt_help ) {
	warn "$main::program_name $main::program_version $main::program_date\n";
	warn "$0 \n";
	warn "	 -help\n" if $main::opt_help;
	warn "	 -debug\n" if $main::opt_debug;
	warn "	 -test\n" if $main::opt_debug;
	warn "	 -static\n" if $main::opt_static;
	warn "	 -o $main::opt_output_file\n" if $main::opt_output_file;
	warn "	 -i $main::opt_input_file\n"  if $main::opt_input_file;
	exit 0;
	};

if ( $main::opt_test ) {
	&sm2cron_time("");
	&sm2cron_time("6s");
	&sm2cron_time("5m");
	&sm2cron_time("4h");
	&sm2cron_time("3d");
	&sm2cron_time("2w");
	&sm2cron_time("2w3d4h5m6s");
	&sm2cron_time("89s");
	&sm2cron_time("90m");
	&sm2cron_time("150m");
	&sm2cron_time("125");
	&sm2cron_time("31d");
	&sm2cron_time("35d");
	&sm2cron_time("5w");
	&sm2cron_time("9w");
	exit 0;
	};

$output_file = $main::opt_output_file if ($main::opt_output_file);
my $input_file = $main::opt_input_file || $Conffile;
# $main::debug is used in Parse_mc !
$main::debug = $main::opt_debug || $main::debug;

# Read /etc/mail/sendmail.conf (if extant)
&Parse_conf::read_config($Conffile);

# [Re]write /etc/mail/sendmail.config
&Parse_conf::write_config($Conffile);

my ($ok, $value) = &Parse_conf::get_value('HANDS_OFF');
if ($value ne '0') {
	unlink "/etc/cron.d/sendmail";
	exit;
	};

# Reflect settings in /etc/cron.d/sendmail
&write_crontab;
if ( $output_file eq '' ) {
	chown '0', '0', "/etc/cron.d/sendmail";
	chmod 0644, "/etc/cron.d/sendmail";
	};

# Reflect settings in /etc/inetd.conf
&update_inetd;

# Create/Delete files
&update_files;

exit (0);

#
#------------------------------------------------------------------------
# Check for nullclient mode in /etc/mail/sendmail.mc
#------------------------------------------------------------------------
sub check_nullclient {
	my $nullclient = 0;
	my $in_file = "/etc/mail/sendmail.mc";
	if ( -r $in_file ) {
		my $ifh;
		unless ( open($ifh, "<$in_file") ) {
			warn("Could not open $in_file($!), ignoring it.\n");
			};

		line: while (<$ifh>) {
			next line if /^$/;	   # skip empty lines
			next line if /^#/;	   # skip comments
			next line if /^dnl /;  # skip comments
			chomp;				   # drop tailing \n

			if (/^\s*FEATURE\(\s*`?nullclient/) {
				$nullclient = 1;
				last line;
				};
			};
		};
	return $nullclient;
	};

#
#------------------------------------------------------------------------
# Compute time setting for Crontab entry (simplistic)
# NOTE:  It does the basics pretty darned well...  *BUT*
#        It fails, miserably, on things that would multiple lines:
#            90 minutes:  does it at 30 minutes (90-60)
#        Or are just edge conditions:
#            25 hours: treated as 24 hours
#            35 days:  does it the 7rd of every month (35-28)
#------------------------------------------------------------------------
sub sm2cron_time {
	my $month  = 0;
	my $week   = 0;
	my $day    = 0;
	my $hour   = 0;
	my $minute = 0;
	my $second = 0;
	my $tmp    = 0;
	my $t	   = '';
	my $cron   = '';

	my ($sm)	= @_;
	my $seconds = 0;
	my $elapsed = 0;
	my $randstart = '00';
	if ($sm eq '') {
		if ( $main::opt_test ) {
			print "mm   hh  dom  mon dow = sm2cron_time($sm);\n";
			};
		return ($cron, $seconds);
		};

	# Convert sendmail time
	#	1w2d3h4m5s
	# to cron time
	#	m h dom mon dow
	$t = $sm;
	if ( $t =~ /^\d+$/ ) {
		$minute  = $sm; }
	else {
		($week   = $sm) =~ s/.*?(\d+)w.*/$1/ if ( $t =~ /w/ );
		($day    = $sm) =~ s/.*?(\d+)d.*/$1/ if ( $t =~ /d/ );
		($hour   = $sm) =~ s/.*?(\d+)h.*/$1/ if ( $t =~ /h/ );
		($minute = $sm) =~ s/.*?(\d+)m.*/$1/ if ( $t =~ /m/ );
		($second = $sm) =~ s/.*?(\d+)s.*/$1/ if ( $t =~ /s/ );
		}
	# Rationalize the time
	$seconds = ($week   * 7 * 24 * 60 * 60)
	         + ($day    * 24 * 60 * 60)
	         + ($hour   * 60 * 60)
	         + ($minute * 60)
	         + $second;
	$elapsed = $seconds;
	$month   = $seconds / (4 * 7 * 24 * 60 * 60);
	$seconds = $seconds % (4 * 7 * 24 * 60 * 60);
	$week    = $seconds / (7 * 24 * 60 * 60);
	$seconds = $seconds % (7 * 24 * 60 * 60);
	$day     = $seconds / (24 * 60 * 60);
	$seconds = $seconds % (24 * 60 * 60);
	$hour    = $seconds / (60 * 60);
	$seconds = $seconds % (60 * 60);
	$minute  = $seconds / (60);
	$seconds = $seconds % (60);
	$second  = $seconds;

	# Cron doesn't do seconds, round to minutes or ignore
	$minute = $minute + 1 if ($second > 30);

	# Minute of hour (0-59)
	$minute = sprintf("%02d", $minute);
	$randstart = sprintf("%02d", int(rand(60))) if (!$main::opt_static);
	if (0 < $hour + $day + $week + $month) {
		if (1 >= $minute) {
			$cron = "$randstart  "; }
		else {
			$cron = "$minute  "; }
		}
	elsif (1 >= $minute) {
		$cron = "*   ";
		}
	else {
		$cron = "*/$minute";
		};

	# Hour of day (0-23)
	$hour = sprintf("%02d", $hour);
	$randstart = sprintf("%02d", int(rand(24))) if (!$main::opt_static);
	if (0 < $day + $week + $month) {
		if (1 >= $hour) {
			$cron = "$cron $randstart  "; }
		else {
			$cron = "$cron $hour  "; }
		}
	elsif (1 >= $hour) {
		$cron = "$cron *   ";
		}
	else {
		$cron = "$cron */$hour";
		};

	# Day of month (1-31)
	$day = $day + (7 * $week);
	$day   = sprintf("%02d", $day);
	$randstart = 1 + sprintf("%02d", int(rand(31))) if (!$main::opt_static);
	if (0 < $month) {
		if (1 >= $day) {
			$cron = "$cron $randstart  "; }
		else {
			$cron = "$cron $day  "; }
		}
	elsif (1 >= $day) {
		$cron = "$cron *   ";
		}
	else {
		$cron = "$cron */$day";
		};

	# Month in year (1-12)
	$month = sprintf("%02d", $month);
	$randstart = 1 + sprintf("%02d", int(rand(12))) if (!$main::opt_static);
	if (1 >= $month) {
		$cron = "$cron *   ";
		}
	else {
		$cron = "$cron */$month";
		};

	$cron = "$cron *";				# Day of week (0-7)

	if ( $main::opt_test ) {
		print "$cron = sm2cron_time($sm);\n";
		};
	return ($cron, $elapsed);	
	};

#
#------------------------------------------------------------------------
# Write updated cron file
#------------------------------------------------------------------------
sub write_crontab {
	my $var;
	my $interval = '';
	my $cronint  = '';
	my $test	 = "test -x /etc/init.d/sendmail";
	my $command  = '';
	my $ok		 = '';
	my $mailto	 = '';
	my $mmode	 = '';
	my $qmode	 = '';
	my $msp_line = '';
	my $mta_line = '';
	my $age_line = '';

	($ok, $mailto) = &Parse_conf::get_value('CRON_MAILTO');
	if ( ! $ok ) {
		return;
		};

	my $out_file = $output_file || "/etc/cron.d/sendmail";
	print STDOUT "Writing $out_file.\n";
	$out_file = '&STDOUT' if ($out_file eq '-');
	unless ( open($ofh, ">$out_file") ) {
		warn("Could not open $out_file($!), using STDOUT\n");
		open($ofh, ">&STDOUT");
		};
	$out_file = '-' if ($out_file eq '&STDOUT');

	print $ofh <<"EOT";
####################################################################
##### This file is automagically generated -- edit at your own risk
#####
##### file: ${out_file}
##### generated via: (${interp_pgm} ${interp_vrm})
#####		${main::program_name}
#####		version: ${main::program_version} ${main::program_date}
##### by: ${user}\@${hostname}
##### on: ${current_time}
##### in: ${directory}
##### input files:
EOT
	foreach my $file ( split(' ', $input_file) ) {
		print $ofh <<"EOT";
#####	${file}
EOT
		};
	print $ofh <<"EOT";
#####
####################################################################
#------------------------------------------------------------------------------
#
# $out_file
#
# Copyright (c) 2001-2009 Richard Nelson.  All Rights Reserved.
# Version:	  ${main::program_version}
# Time-stamp: <${main::program_date}>
#
# Sendmail crontab - Call sendmail at various times to do the following:
#	1) Age queues - move undelivered mail to a slower queue
#	2) Retry any mail queued by the message submission process
#	3) run the queues (deliver mail) if a standalone daemon is not desired
#
# Each processes is independant and guided by /etc/mail/sendmail.conf and
# {sendmail,submit}.mc files.
#
# There isn't anything here that should need touching.
#
# Any requisite queue/misc parameters must be set in /etc/mail/sendmail.conf
# and reflected herein via /usr/sbin/sendmailconfig (or more directly via
# ${main::program_name}).
#
#------------------------------------------------------------------------------
#
# use default path, shell, home
#SHELL=/bin/sh
#PATH=
#HOME=
# send mail to this user, as `mail/smmsp` isn't real.
MAILTO=$mailto
#
# format of entries:
# m h dom mon dow	user	command
#
#------------------------------------------------------------------------------
# Every so often, give sendmail a chance to run the MSP queues.
#
EOT
	($ok, $interval) = &Parse_conf::get_value('MSP_INTERVAL');
	($cronint, $ok) = &sm2cron_time($interval);
	$command  = "$test && /usr/share/sendmail/sendmail cron-msp";
	($ok, $mmode) = &Parse_conf::get_value('MSP_MODE');
	($ok, $qmode) = &Parse_conf::get_value('QUEUE_MODE');
	if ($mmode eq 'Cron'
		and ($interval ne '')
		#or ($mmode eq 'None' and $qmode eq 'Cron')
		) {
		$msp_line =
			"$cronint\t\tsmmsp\t$command";
		}
	else {
		$msp_line =
			"#$cronint\t\tsmmsp\t$command";
		};
	print $ofh "$msp_line\n";

	print $ofh <<"EOT";
#
#------------------------------------------------------------------------------
# Every so often, give sendmail a chance to run the MTA queues.
# Will also run MSP queues if enabled
#
EOT
	($ok, $interval) = &Parse_conf::get_value('QUEUE_INTERVAL');
	($cronint, $ok) = &sm2cron_time($interval);
	$command  = "$test && /usr/share/sendmail/sendmail cron-mta";
	if ($qmode eq 'Cron'
		and ($interval ne '')
		) {
		$mta_line =
			"$cronint\t\troot\t$command";
		}
	else {
		$mta_line =
			"#$cronint\t\troot\t$command";
		};
	print $ofh "$mta_line\n";

	print $ofh <<"EOT";
#
#------------------------------------------------------------------------------
# Every so often, give sendmail a chance to age the queues.
#
EOT
	($ok, $var) = &Parse_conf::get_value('AGE_DATA');
	my $tmpval = eval $var;
	if ($@) {
		warn $@;
		}
	else {
		$var = $tmpval;
		};
	if (not ref $var) {
		print $ofh "# No queue aging\n";
		}
	elsif (@{$var} == 0) {
		print $ofh "# No queue aging\n";
		}
	else {
		foreach my $entry (@{$var}) {
			($interval, $ok) = &sm2cron_time(@$entry[0]);
			my $criteria = @$entry[1] || join('','-s ',$ok);
			my $to		 = @$entry[2];
			my $from	 = @$entry[3];
			$command	 = "$test && /usr/share/sendmail/qtool.pl";
			$from		 = "/var/spool/mqueue/$from"
				if ($from !~ /^\//);
			$to			 = "/var/spool/mqueue/$to"
				if ($to !~ /^\//);
			$age_line	 =
				"$interval\t\troot\t$command $criteria $to $from";
			print $ofh "$age_line >/dev/null\n";
			};
		};
	print $ofh <<"EOT";
#
EOT

	close($ofh);
	};

#
#------------------------------------------------------------------------
# Update /etc/inetd.conf file
#------------------------------------------------------------------------
sub update_inetd {

	# Don't try to write if we're debugging
	if ($output_file ne '') {
		return;
		};

	my ($ok, $mode) = &Parse_conf::get_value('DAEMON_MODE');
	if ( $ok and -x '/usr/sbin/update-inetd' ) {
		if ( $mode eq 'Inetd' ) {
			system 'update-inetd --group MAIL --enable smtp,smtps,submission'
			}
		else {
			system 'update-inetd --group MAIL --disable smtp,smtps,submission'
			};
		};

	};

#
#------------------------------------------------------------------------
# Update mail statistics information (create/delete files)
#------------------------------------------------------------------------
sub update_files {

	# Don't try to write if we're debugging
	if ($output_file ne '') {
		return;
		};

	my ($class, $flags, $files, $options);
	my ($ok, $stats);
	my $file;

	#
	# Read the mc/m4 files
	&Parse_mc::read_dbs('', '');

	# Obtain entry for HOST_STATUS_DIRECTORY
	($class, $flags, $files, $options) =
		&Parse_mc::entry_dbs('confHOST_STATUS_DIRECTORY');
	$file = @{$files}[0];
	($ok, $stats) = &Parse_conf::get_value('DAEMON_HOSTSTATS');
	if ( $ok and $file ne '-' ) {
		if ( $stats and ! -d $file) {
			print STDOUT "Enabling HOST statistics file($file).\n";
			system "mkdir ${file}";
			my $gid = getgrnam('smmsp');
			chown '0', $gid, $file;
			chmod 02755, $file;
			}
		elsif ( ! $stats and -d $file ) {
			print STDOUT "Disabling HOST statistics file($file).\n";
			system "rm -rf ${file}";
			};
		};

	# Obtain entry for STATUS_FILE
	($class, $flags, $files, $options) =
		&Parse_mc::entry_dbs('STATUS_FILE');
	$file = @{$files}[0];
	($ok, $stats) = &Parse_conf::get_value('DAEMON_MAILSTATS');
	if ( $ok and $file ne '-' ) {
		if ( $stats and ! -e $file) {
			print STDOUT "Enabling MTA statistics file($file).\n";
			open  'STATS', ">$file";
			close 'STATS';
			my $gid = getgrnam('smmsp');
			chown '0', $gid, $file;
			chmod 0640, $file;
			}
		elsif ( ! $stats and -e $file ) {
			print STDOUT "Disabling MTA statistics file($file).\n";
			unlink $file;
			};
		};

	# Obtain entry for MSP_STATUS_FILE
	($class, $flags, $files, $options) =
		&Parse_mc::entry_dbs('MSP_STATUS_FILE');
	$file = @{$files}[0];
	($ok, $stats) = &Parse_conf::get_value('MSP_MAILSTATS');
	if ( $ok and $file ne '-') {
		if ( $stats and ! -e $file ) {
			print STDOUT "Enabling MSP statistics file($file).\n";
			open  'STATS', ">$file";
			close 'STATS';
			my $gid = getgrnam('smmsp');
			chown '0', $gid, $file;
			chmod 0660, $file;
			}
		elsif ( ! $stats and -e $file ) {
			print STDOUT "Disabling MSP statistics file($file).\n";
			unlink $file;
			};
		};

	};


Youez - 2016 - github.com/yon3zu
LinuXploit