SF.net SVN: postfixadmin:[703] trunk/VIRTUAL_VACATION/vacation.pl
Brought to you by:
christian_boltz,
gingerdog
From: <Gin...@us...> - 2009-08-12 06:24:02
|
Revision: 703 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=703&view=rev Author: GingerDog Date: 2009-08-12 06:23:51 +0000 (Wed, 12 Aug 2009) Log Message: ----------- VIRTUAL_VACATION/vacation.pl: fix sql query - see https://sourceforge.net/tracker/index.php?func=detail&aid=2835877&group_id=191583&atid=937964 Modified Paths: -------------- trunk/VIRTUAL_VACATION/vacation.pl Modified: trunk/VIRTUAL_VACATION/vacation.pl =================================================================== --- trunk/VIRTUAL_VACATION/vacation.pl 2009-08-10 13:40:32 UTC (rev 702) +++ trunk/VIRTUAL_VACATION/vacation.pl 2009-08-12 06:23:51 UTC (rev 703) @@ -327,9 +327,9 @@ $logger->debug("Found '\$email'\ has vacation active"); } else { $logger->debug("Looking for alias records that \'$email\' resolves to with vacation turned on"); - $query = qq{SELECT goto FROM alias WHERE address=? AND (goto LIKE ?,% OR goto LIKE %,? OR goto LIKE %,?,%)}; + $query = qq{SELECT goto FROM alias WHERE address=? AND (goto LIKE ? OR goto LIKE % OR goto LIKE ?)}; $stm = $dbh->prepare($query) or panic_prepare($query); - $stm->execute($email,$email,$email,$email) or panic_execute($query,"address='$email'"); + $stm->execute($email,"$email,%","%,$email","%,$email,%") or panic_execute($query,"address='$email'"); $rv = $stm->rows; # Recipient is an alias, check if mailbox has vacation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |