These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for What Does this Cron Script Do? on the new forum.
I have noticed that the following script executes every hour on just two of my users. What does it do, is it necessary and how did it come to be?
Thanks
#!/usr/bin/perl
open(CONF, "/etc/usermin/miniserv.conf");
while() {
$root = $1 if (/^root=(.*)/);
}
close(CONF);
$ENV{'PERLLIB'} = "$root";
$ENV{'WEBMIN_CONFIG'} = "/etc/usermin";
$ENV{'WEBMIN_VAR'} = "/var/usermin";
chdir("$root/mailbox");
exec("$root/mailbox/auto.pl", @ARGV) || die "Failed to run $root/mailbox/auto.pl : $!";
What is the name and path of that script? Is it being executed from Cron? Or is it possible that it's being executed in response to receiving an email?
-Eric
/home/domain/homes/user/.usermin/mailbox/auto.pl
This is the error I get:
Error: Failed to open IMAP mailbox :
Error
-----
Failed to open IMAP mailbox :
-----
It is being executed from Cron
Looking through the auto.pl script that comes with Usermin, it looks like that script is used if the user sets up a scheduled deletion policy for their mailboxes.
For example, if a user wanted to make it so that their trash folder deleted all email older than a week, they could do that.
It's possible that a deletion policy was setup for a folder that no longer exists. You could certainly safely remove that entry from cron if you like.
-Eric
Thank you