Needs review
Project:
Organic groups list manager
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
13 Jun 2007 at 08:04 UTC
Updated:
13 Jun 2007 at 08:04 UTC
When an email is received that matches the domain but none of the available list aliases, it gets stuck in og2list_inbound_content table, ignored and neither processed nor cleared in any way. This is obviously wrong, at the very least these invalid emails should be removed.
The fix is trivial and includes a few changes in og2list_cron. First replace the first query to fetch all incoming rows without a join:
$result = db_query_range('SELECT c.* FROM {og2list_incoming_content} c ORDER BY c.mid ASC', 0, variable_get('og2list_incoming_number', 10));
Second part is to take 3 post-processing delete statements out of count($mail->og_nids) condition:
db_query('DELETE FROM {og2list_incoming_content} WHERE mid = %d', $mail->mid);
db_query('DELETE FROM {og2list_incoming_groups} WHERE mid = %d', $mail->mid);
db_query('DELETE FROM {og2list_attachment} WHERE mid = %d', $mail->mid);
I have this working in production with no problem.