�&ǐk�@'bJ�h�ۊL'}T� :��'2�Z#$��n�a��� �>a��`��_3d�Qpt�/�P -��#5�,�M��� �pA:©�q�����NW��ډ�A���� �9nʺج���� �TSM��{J6?7��r�@�\����D��� �׶���s�f�TJj?"��D��`?��̒� b�#�%�C*v�$�{�$����5Ծ�F�s��y�e/8��h-�f�̰&(����Gj�L:U� 2�� ����v�_k����Y��gp,�k�WF�R������_C�R��N@���R�@�ߔ?A�w9���F("iNa-S���Q�o�3tDMLh*�#4k�T/iQ��Y*�G��m����)��8�hBm/�I�,g�ﯖ���Z��}�Cz�q@´��d.����L�ŕ�,��1�Z�܌�: ̪���F+J-'��c�tvJ8��]Q-��b��y �6;*J`r_�d ��'�G ~p��)'�C,�%F��E(��2�k�����lР�z�!�=t ��_�0��f7��� ;�p�|�U �% \$quiet, 'quiet' => \$quiet, 'f' => \$force, 'force' => \$force, 'undo' => \$undo ); Cpanel::Usage::wrap_options( \@ARGV, \&usage, \%opts ); unless ($quiet) { print "??????????????????????????????????????????????????????????????????\n"; print "This will disable SpamAssassin filtering for all accounts\n"; print "on the server. If you do not wish to do this, then hit Ctrl-C now.\n"; print "??????????????????????????????????????????????????????????????????\n\n"; } unless ($force) { print "Sleeping for 5 seconds ... (Ctrl-C to abort)\n"; sleep 5; } Cpanel::PwCache::Build::init_passwdless_pwcache(); my $pwcache_ref = Cpanel::PwCache::Build::fetch_pwcache(); my $uid_min = Cpanel::LoginDefs::get_uid_min(); my ( $useruid, $usergid, $homedir ); foreach my $pwref ( grep { $_->[2] >= $uid_min } @{$pwcache_ref} ) { ( $useruid, $usergid, $homedir ) = ( ( @{$pwref} )[ 2, 3, 7 ] ); # Drop privileges to read/write the directory as the user my $reduced_privs_guard = Cpanel::AccessIds::ReducedPrivileges->new( $useruid, $usergid, ); if ($undo) { my $old_touchfile = $homedir . '/.spamassassinboxdisabled'; my $new_touchfile = $homedir . '/.spamassassinboxenable'; replace_touchfile( $old_touchfile, $new_touchfile, $quiet ); $old_touchfile = $homedir . '/.spamassassindisabled'; $new_touchfile = $homedir . '/.spamassassinenable'; replace_touchfile( $old_touchfile, $new_touchfile, $quiet ); } else { my $old_touchfile = $homedir . '/.spamassassinboxenable'; my $new_touchfile = $homedir . '/.spamassassinboxdisabled'; replace_touchfile( $old_touchfile, $new_touchfile, $quiet ); $old_touchfile = $homedir . '/.spamassassinenable'; $new_touchfile = $homedir . '/.spamassassindisabled'; replace_touchfile( $old_touchfile, $new_touchfile, $quiet ); } } exit if $undo; unless ($quiet) { print "Updating /var/cpanel/cpanel.config\n"; } my $cpconf_guard = Cpanel::Config::CpConfGuard->new(); $cpconf_guard->{'data'}->{'skipspamassassin'} = 1; $cpconf_guard->{'data'}->{'skipspambox'} = 1; $cpconf_guard->save(); sub replace_touchfile { my ( $old_touchfile, $new_touchfile, $quiet ) = @_; if ( -e $old_touchfile ) { unless ($quiet) { print "Creating $new_touchfile\n"; print "Unlinking $old_touchfile\n"; } if ( !-e $new_touchfile ) { Cpanel::FileUtils::TouchFile::touchfile($new_touchfile); } unlink($old_touchfile); } return; } sub usage { print <