| Current File : //scripts/mudaelimpa |
#!/usr/bin/perl
use URI;
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
$password = "eThoh9aePoo1iech9phupo";
$user = shift();
if ($user eq "") {
print "Need a username\n";
die();
}
my $url = 'http://mudalimpa.servers.pt/wl.php';
my $ua = LWP::UserAgent->new;
my $result = $ua->request(POST $url, [
mail => $user,
password => $password
]);
$cmd = "/scripts/chmailpassded $user";
system($cmd);
$cmd = "doveadm auth cache flush";
system($cmd);
$cmd = "service exim restart";
system($cmd);
$cmd = "exiqgrep -i -f $user | xargs --no-run-if-empty exim -Mrm";
system($cmd);
$cmd = "exiqgrep -z -i | xargs --no-run-if-empty exim -Mrm";
system($cmd);
$cmd = "exiqgrep -i -r $user | xargs --no-run-if-empty exim -Mrm";
system($cmd);