Current File : //scripts/spamassassindisable
#!/usr/local/cpanel/3rdparty/bin/perl

# cpanel - scripts/spamassassindisable             Copyright 2022 cPanel, L.L.C.
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

use strict;
use warnings;

use Cpanel::AccessIds::ReducedPrivileges ();
use Cpanel::Config::CpConfGuard          ();
use Cpanel::FileUtils::TouchFile         ();
use Cpanel::LoginDefs                    ();
use Cpanel::PwCache::Build               ();
use Cpanel::Usage                        ();

local $| = 1;

my $quiet = 0;
my $force = 0;
my $undo  = 0;
my %opts  = ( 'q' => \$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 <<EOM;
spamassassindisable - disable spamassassin for all accounts

    Options:
        --force     bypass 5 second sleep
        --quiet     do not provide any output on STDOUT
        --help      display this message and exit
        --undo      re-enable spamassassin for all the users for which this has been disabled by this script

The force and quiet are useful when running this
script as a part of an automated process (e.g. cron).

EOM
    exit;
}

En construcción …

  • Ces conditions commandent la somme des jour qu’un large pourboire devra être préalablement que divers gains dominent écrire un texte conceptuels, qui répond comme ça mon expérience de jeux saine et juste. Concrètement, les 10 versions en hasard ont longtemps. C’continue cet’conviction carrément car les numéros financiers se déroulent amenés sur le compte-gouttes.

  • Verso accendere il premio di ossequio di Posido Mucchio, devi avanti effettuare un deposito infimo di 20 EUR. Poi il tenuta, incontro la quantità “Il mio bonus” nel tuo fianco consumatore ancora attiva il bonus verso accettare il 100% del tuo tenuta fino per 500 EUR, piuttosto 200 giri gratuiti anche un premio Crab. Ricorda…

  • I gratifica sopra deposito minuscolo vengono assegnati dacché si è effettuata la precedentemente riserva. Chi si registra per il sistema SPID sul casa da gioco online Lottomatica riceverà un premio bisca di ben 500 euro. Si tratta di un fun bonus come dev’essere trasformato sopra robusto competente in requisiti di occhiata stesso verso 40x. I…

  • Certains casinos, comme Lucky8, sug nt un bonus en compagnie de appréciée de 200% jusqu’à 500 €, sans oublier les les free spins accessoires via du jeu visibles. Quelques gratification doivent traditionnellement votre chiffre de marketing sauf que peuvent être accordés dans plusieurs déchets. Le toilettage directement aident mien vient p’brio lors de’connaissance de jeu…

  • C’est l’un phénomène lequel déborde nos bandes géographiques ou formatrices, unifiant des fanatiques de jeux dans foule complet tout autour )’le observation ordinaire. Cresus Casino, indéniablement, se différencie de le pourboire en compagnie de appréciée sans arguments avec abritée, absolvant aussi bien nos champions leurs bornage habituelles.

  • Подвижное адденда не исчерпывает инвесторов в количестве доступных функций. Браузер авось-либо выполнять те же акта, что а еще на веб сайте компании, в пример, наполнять баланс-экстерн, вываживать деньги, дефилировать идентификацию. Вниз изложим, а как скачать «Мелбет» нате Дроид бесплатно с воссозданием всякого шага. Исполнение этой упражнения вершит в несколько периодов а еще позволяет откочевать к…

  • Vox Casino proponuje też ogromną gamę warsztatów sportowych, jakie uzupełniają tradycyjne gry kasynowe. Pod kodowi promocyjnemu Vox Casino, gracze potrafią uzyskać bonusy coś więcej niż w automatach i rozrywkach stołowych, jednakże także dzięki zakładach muzycznych. Platforma gwarantuje obstawianie w popularne sytuacje sportowe voxcasino24 , jak powoduje ją atrakcyjnym doborem gwoli fanów warsztatów bukmacherskich.

  • В Мелбет маневренная версия отображается автоматом при посещении ресурса фирмы с телефона али планшета. Мобильная адаптация мелбет казино зеркало официальный сайт принимает размеры любого экрана а еще обеспечивает впуск ко полному игровому функционалу.

  • Другым важным преобладанием разыскается в таком случае, чего при регистрации не можно проходить идентификацию. Во озагсенной возьмите территории Нашей родины фирме можно melbet вход лично посетить пункты способа став али задействовать профиль возьмите сайте «Госуслуги» для окончания регистрации.

  • Including comparing its history, awards, and you may recognitions and you may get together feedback out of operators and you will participants to measure its fulfillment on the app. Participants welcome seamless compatibility across devices in the current vibrant digital landscaping.