[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Auto Resonder - vacation.pl modification question
- Subject: [cobalt-users] Auto Resonder - vacation.pl modification question
- From: "Eddie @ Earthlink" <jonesew@xxxxxxxxxxxxx>
- Date: Wed Mar 29 04:26:11 2000
I want to offer a simple Auto Responder. The vacation option will work but
a second response to an email address can not happen until a week or -
604800 seconds have passed.
Looking at the script /usr/local/sbin/vacation.pl starting about line 50
appears to be the sub routine for controlling how often the response is
sent. The "IF" condition reads
if ($vacadb{$sendto} >= ($^T - 604800))
It seems to me the value of ($^T - 604800) could be reduce to a lower
number like ($^T - 360) and allow a response to be sent after 10 minutes.
Will this work?
Is there a better solution?
Thanks
eddie
Sub Routine for send vacation
my %vacadb;
tie(%vacadb,'DB_File',"$Vaca_dir/$user_from.db",O_RDWR|O_CREAT,0666)
|| die "Cannot open vacation database: $!\n";
if ($vacadb{$sendto} >= ($^T - 604800))
{
# They've been given a reply recently
untie %vacadb;
exit;
}
else
{
$vacadb{$sendto} = $^T;
untie %vacadb;
}