X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=bin%2Fcron%2Femails.check.php;fp=bin%2Fcron%2Femails.check.php;h=fb5fdd5540eec71fbde06a85038d9f2716679ed9;hb=24e8f53b72f100e8ce11b016d8defdb51f9ce9c2;hp=8bab8ab5f550218be65201f31bdab3204a5ecd10;hpb=784043daf155d1283f8c3fb56ddd8a30e91d8067;p=platal.git diff --git a/bin/cron/emails.check.php b/bin/cron/emails.check.php index 8bab8ab..fb5fdd5 100755 --- a/bin/cron/emails.check.php +++ b/bin/cron/emails.check.php @@ -129,5 +129,15 @@ if ($opt_verbose) { echo "\n"; } +/* + * Updates imap settings for users with no active redirection. Their emails + * must go to imap and bounce. + */ +XDB::execute("UPDATE email_redirect_account AS r + LEFT JOIN email_redirect_account AS a ON (r.uid = a.uid AND a.flags = 'active' AND a.type != 'imap') + SET r.action = 'imap_and_bounce' + WHERE r.type = 'imap' AND a.redirect IS NULL"); + + // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>