Commit f71773e7 authored by Claudemir Todo Bom's avatar Claudemir Todo Bom

* fix DETERMINISTIC on aliases functions / fix movemaildir.sh

parent ae07ebb0
Pipeline #260 passed with stage
in 2 minutes and 33 seconds
......@@ -473,6 +473,7 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `unalias`(`p_address` VARCHAR(255) CHARSET utf8) RETURNS varchar(255) CHARSET utf8
DETERMINISTIC
BEGIN
DECLARE a_address VARCHAR(255);
DECLARE p_localpart VARCHAR(255);
......@@ -525,6 +526,7 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `__unalias`(`p_address` VARCHAR(255) CHARSET utf8) RETURNS varchar(255) CHARSET utf8
DETERMINISTIC
BEGIN
DECLARE a_address VARCHAR(255);
DECLARE p_localpart VARCHAR(255);
......
......@@ -37,11 +37,14 @@ echo "select address,maildir from users" | mysql -N -u ${WW_ISP_USER} -p${WW_ISP
if ! [ -e "${MAILDIR}" ] ; then
echo "origem nao existe: ${MAILDIR} (${USER})" 1>&2
if ! [ -e "${DEST}" ] ; then
[ ${DRYRUN} ] || echo "UPDATE users SET maildir='${DEST}/' where address='${USER}';"
echo UPDATED
continue
if [ -e "${DEST}" ] ; then
echo "mas o destino já existe: ${DEST}" 1>&2
[ ${DRYRUN} ] || mv "${DEST}" /var/spool/maildir/backup/
[ ${DRYRUN} ] && echo BACKEDUP
fi
[ ${DRYRUN} ] || echo "UPDATE users SET maildir='${DEST}/' where address='${USER}';"
[ ${DRYRUN} ] && echo UPDATED
continue
fi
if [ -e "${ORIG}" ] ; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment