Delete bounced subscribers

Use this forum for all questions related to bounce management of OpenEMM

Moderator: moderator

carcus88
Posts: 7
Joined: Tue Nov 14, 2006 1:18 am
Contact:

Delete bounced subscribers

Post by carcus88 »

I want to be able to delete subscribers that have bounced back. Is this possible? There is also a bounced option in the import but this does not seem to function as the recipeients never get marked as bounced. Should this be adding rows to the bounce_tbl table? If not how are the recorded?
ud
Posts: 154
Joined: Thu Aug 17, 2006 9:56 am
Location: Munich, Germany
Contact:

Post by ud »

Bounces are collected during the sending process by parsing the sendmail log file (using slrtscn.py) and on returned mail (using the bav family). This collection is processed by update.py which marks hardbounces directly in the database as bounced. All bounces are written to bounce_tbl and softbounces are interpreted by softbounce.sh, when called on a regular basis, e.g. daily.

-- ud
carcus88
Posts: 7
Joined: Tue Nov 14, 2006 1:18 am
Contact:

Post by carcus88 »

I figured out a way in the database to do this, maybe someone can verify if this is good or not. Here is the SQL I used to delete all bounced subscribers whether it was a hard or soft bounce I think

delete from customer_1_tbl where customer_id in ( select customer_id from customer_1_binding_tbl where user_status = 2);

delete from bounce_tbl where customer_id in ( select customer_id from customer_1_binding_tbl where user_status = 2);

delete from mailtrack_tbl where customer_id in ( select customer_id from customer_1_binding_tbl where user_status = 2);

delete from customer_1_binding_tbl where user_status = 2;
ud
Posts: 154
Joined: Thu Aug 17, 2006 9:56 am
Location: Munich, Germany
Contact:

Post by ud »

In theory this is correct, the proper way would be: Copy all bounced customer-ids from the binding table to a temporary table and use this as the reference.

Then delete the entries from the binding table and from the customer table (using the content of the temporary table.)

But be aware, if a bounced address has worked before and you delete the address, then the statistic won't reflect these receipients even if they got mails in the past.

And with this method you just delete the hardbounces, if you really want to delete records with softbounces, too, you should remove every record which has an entry in the bounce_tbl. But this is not recommented! Better use the softbounce.sh script and if a softbounce is converted to a hardbounce you can remove it with the method above.

Finally I see no real reason to remove bounced addresses from the database at all.

-- ud
Post Reply