What Does this Cron Script Do?

5 posts / 0 new
Last post
#1 Thu, 09/23/2010 - 15:31
mdtiberi

What Does this Cron Script Do?

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 : $!";

Thu, 09/23/2010 - 15:42
andreychek

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

Thu, 09/23/2010 - 16:05
mdtiberi

/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

Thu, 09/23/2010 - 16:19
andreychek

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

Thu, 09/23/2010 - 16:20
mdtiberi

Thank you

Topic locked