root/alternc/tags/0.9.6/src/mail_del

Revision 1618, 474 bytes (checked in by benjamin, 3 years ago)

ajout des perl suid scripts (desole, j'avais oublie...)

  • Property svn:executable set to *
Line 
1 #!/usr/bin/perl
2
3 use strict;
4
5 my ($mailname) = @ARGV;
6
7 if (!$mailname) {
8     print "Usage: mail_del <mailname>\n";
9     print " Destroy pop account <mailname>\n";
10     exit(1);
11 }
12
13 $ENV{PATH} = "";
14 delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
15
16 if (!($mailname =~ /^([a-z0-9_\+\.-]+\_[a-z0-9\.-]+)$/)) {
17     die "Email is incorrect.";
18 }
19 $mailname=$1;
20
21 $< = $>;
22 $( = $);
23
24 system("/bin/rm -rf '".quotemeta("/var/alternc/mail/".substr($mailname,0,1)."/".$mailname)."'");
25
26 0;
27
Note: See TracBrowser for help on using the browser.