ZhangHuangbin wrote:That could be bug in v1.4.1, i will check it later. sorry.
Seems to be an error in the sql:
1.4.1:
COUNT(*) as total,
-- msgs.mail_id,
-- msgs.subject,
-- msgs.time_iso,
-- recip.email as recipient,
sender.email as mail
FROM msgs RIGHT JOIN msgrcpt ON (msgs.mail_id = msgrcpt.mail_id)
RIGHT JOIN maddr AS sender ON (msgs.sid = sender.id)
RIGHT JOIN maddr AS recip ON (msgrcpt.rid = recip.id)
WHERE
msgs.content IS NOT NULL
AND sender.domain IN (...snip....)
AND msgs.time_num < DATE_SUB(NOW(), INTERVAL 86400 SECOND)
GROUP BY mail
ORDER BY total DESC
LIMIT 10
Return 0 result
1.4.0
COUNT(*) as total,
-- msgs.mail_id,
-- msgs.subject,
-- msgs.time_iso,
-- recip.email as recipient,
sender.email as mail
FROM msgs RIGHT JOIN msgrcpt ON (msgs.mail_id = msgrcpt.mail_id)
RIGHT JOIN maddr AS sender ON (msgs.sid = sender.id)
RIGHT JOIN maddr AS recip ON (msgrcpt.rid = recip.id)
WHERE
msgs.content IS NOT NULL
AND sender.domain IN (...snip....)
AND UNIX_TIMESTAMP()-msgs.time_num < 86400
GROUP BY mail
ORDER BY total DESC
LIMIT 10
Return right things.
This becouse the table msg in amavisd database has time_num defined as INT(10) and not as TIMESTAMP
It's strange altought. With quarantine script it works like a sharm.
I'll try to debug it.
STFU