# get autoresponders id which also works to confirm autoresponder exists
dbquery="SELECT vm_autoresponders.id FROM vm_autoresponders, vm_mboxes, vm_domains WHERE vm_autoresponders.mbox_id=vm_mboxes.id AND vm_mboxes.mbox='$mbox' AND vm_mboxes.domain_id=vm_domains.id AND vm_domains.domain='$domain';"
vm_autoresponders_id=`$dbcmd$dbcmdopts"$dbquery"`
if[ -z "$vm_autoresponders_id"];then
echo"ERROR: Autoresponder for $email does not exist."
exit1
elif["$vm_autoresponders_id" -gt '0'];then
dbquery="DELETE FROM vm_autoresponders WHERE vm_autoresponders.id='$vm_autoresponders_id';"
eval$dbcmd$dbcmdopts\"$dbquery\"
echo"SUCCESS: Autoresponder for $email removed from system."