| Anonymous | Login | Signup for a new account | 21-11-09 09:56 GMT |
| Main | My View | View Issues | Change Log | Roadmap | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Print ] | |||||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
| 0008499 | [phplist] Bounce Management | feature | N/A | 10-11-06 20:54 | 01-10-08 14:22 | |||||||
| Reporter | orock | View Status | public | |||||||||
| Assigned To | ||||||||||||
| Priority | normal | Resolution | open | |||||||||
| Status | new | Product Version | 2.10.3 | |||||||||
| Summary | 0008499: additional bounce rule -- resendanddeletebounce | |||||||||||
| Description |
we were experiencing occasional bounces triggered by our own hosting server (around 2-5%). the bounce regex we wanted to trap was /.*--SENDER_QUOTA_REJECTION--/ and when found we wanted to delete the bounce, decrement user/message bounce count, and requeue the user on to the message list (delete userid/messageid entry from usermessage table). since this functionality was not available we added to the bounceruleactions list an action called resendanddeletebounce in lib.php and a new rule action to process in the USE_ADVANCED_BOUNCEHANDLING section of processbounces.php. we've been running it for a couple of days now and all is going well. changes follow. diffs in additional info. processbounces.php and lib.php included. ----> to lib.php added resendanddeletebounce $GLOBALS['bounceruleactions'] = array( 'deleteuser' => $GLOBALS['I18N']->get('delete user'), 'unconfirmuser' => $GLOBALS['I18N']->get('unconfirm user'), 'blacklistuser' => $GLOBALS['I18N']->get('blacklist user'), 'deleteuserandbounce' => $GLOBALS['I18N']->get('delete user and bounce'), 'unconfirmuseranddeletebounce' => $GLOBALS['I18N']->get('unconfirm user and delete bounce'), 'blacklistuseranddeletebounce' => $GLOBALS['I18N']->get('blacklist user and delete bounce'), 'deletebounce' => $GLOBALS['I18N']->get('delete bounce'), 'resendanddeletebounce' => $GLOBALS['I18N']->get('resend and delete bounce'), ); ----> to processbounces.php added the resendanddeletebounce case case 'resendanddeletebounce': logEvent('User '.$userdata['email'].' requeued by bounce rule '.PageLink2('bouncerule&id='.$rule['id'],$rule['id'])); $advanced_report .= 'User '.$userdata['email'].' requeued by bounce rule '.$rule['id']."\n"; deleteBounce($row['bounce']); ### decrement bounce counts Sql_Query(sprintf('update %s set bouncecount = bouncecount - 1 where id = %d', $GLOBALS['tables']['message'], $row['message'])); Sql_Query(sprintf('update %s set bouncecount = bouncecount - 1 where id = %d', $GLOBALS['tables']['user'], $userdata['id'])); ### remove sent record Sql_Query(sprintf('delete from %s where messageid = %d and userid = %d', $GLOBALS['tables']['usermessage'], $row['message'], $userdata['id'])); break; |
|||||||||||
| Additional Information |
*** lib_orig.php 2006-10-06 18:44:52.000000000 -0700 --- lib.php 2006-11-10 07:23:11.000000000 -0800 *************** *** 86,91 **** --- 86,94 ---- $usephpmailer = 1; } + ### + ### OPR: 11.09.06 - added resendanddeletebounce + ### $GLOBALS['bounceruleactions'] = array( 'deleteuser' => $GLOBALS['I18N']->get('delete user'), 'unconfirmuser' => $GLOBALS['I18N']->get('unconfirm user'), *************** *** 94,99 **** --- 97,103 ---- 'unconfirmuseranddeletebounce' => $GLOBALS['I18N']->get('unconfirm user and delete bounce'), 'blacklistuseranddeletebounce' => $GLOBALS['I18N']->get('blacklist user and delete bounce'), 'deletebounce' => $GLOBALS['I18N']->get('delete bounce'), + 'resendanddeletebounce' => $GLOBALS['I18N']->get('resend and delete bounce'), ); # check whether Pear HTTP/Request is available *** processbounces_orig.php 2006-10-03 12:11:08.000000000 -0700 --- processbounces.php 2006-11-10 07:24:56.000000000 -0800 *************** *** 438,443 **** --- 438,479 ---- case 'deletebounce': deleteBounce($row['bounce']); break; + + ### + ### OPR: 11.09.06 -- added + ### + case 'resendanddeletebounce': + + logEvent('User '.$userdata['email'].' requeued by bounce rule '.PageLink2('bouncerule&id='.$rule['id'],$rule['id'])); + $advanced_report .= 'User '.$userdata['email'].' requeued by bounce rule '.$rule['id']."\n"; + + deleteBounce($row['bounce']); + + ### decrement bounce counts + + Sql_Query(sprintf('update %s + set bouncecount = bouncecount - 1 + where id = %d', + $GLOBALS['tables']['message'], + $row['message'])); + Sql_Query(sprintf('update %s + set bouncecount = bouncecount - 1 + where id = %d', + $GLOBALS['tables']['user'], + $userdata['id'])); + + ### remove sent record + + Sql_Query(sprintf('delete from %s + where messageid = %d and userid = %d', + $GLOBALS['tables']['usermessage'], + $row['message'], + $userdata['id'])); + + break; + ### + ### + ### } Sql_Query(sprintf('update %s set count = count + 1 where id = %d', $GLOBALS['tables']['bounceregex'],$rule['id'])); |
|||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files |
|
|||||||||||
|
|
||||||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0020882) michiel (administrator) 10-11-06 21:04 |
that's brilliant. Nice to hear you're using the advanced bounce handling. can you report more on how well it works? I've had very little feedback on it. |
|
(0020883) orock (reporter) 10-11-06 21:30 |
thanks. when we read about the advanced bounce handling we immediately wanted to do something like this because these were effectively false bounces. as we analyze and in turn catch more bounces i'll keep you posted but i'm not sure we'll be doing much more with them in the near future. |
|
(0020884) michiel (administrator) 10-11-06 23:00 |
when I wrote it, I thought it would be nice to have some method to share rules, so it would be less work for everyone. It might still be nice to think of a way to do that. |
|
(0020886) orock (reporter) 10-11-06 23:07 |
adding rules would be nice but would probably require some sort of scripting or macro generating front end... which would also be nice. or do you mean adding rules as they currently exist in the front end? sharing could be like a spamcop type approach which would be ironic. i forgot to mention that the process i described in this issue requires that the job be requeued to pick up the added back names. i might add something to make the job rescan the list before finishing so that pass will pick up subscribers and resends which happened between the start and end. |
|
(0020889) michiel (administrator) 10-11-06 23:37 |
no, what I meant was, once you've come up with a list of regular expressions and actions, it would be nice to be able to export them so other people can import them and vice versa. Or even, automatically submit them to some central repository, from which you can update your own list of rules as well. Some kind of "FreeDB.org" kind of thing. |
|
(0050238) CS2 (reporter) 01-10-08 14:22 |
I wasn't aware of this mod and created a similar one to handle soft bounces. Mine includes a 'soft bounce threshold' and automatically re-queues the message (but does not automatically process the queue). My mod can be viewed in this forum thread: http://forums.phplist.com/viewtopic.php?p=54296#54296 [^] By the way, I like the idea of being able to import and export bounce rules. |
| Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |