When using domain throttling, apply delay only when email was sent#968
Conversation
|
When DOMAIN_AUTO_THROTTLE is enabled, running_throttle_delay is adjusted when needed. The main objective is to spread the sending of DOMAIN_BATCH_SIZE over the total period of DOMAIN_BATCH_PERIOD, instead of sending DOMAIN_BATCH_SIZE in the first few seconds. |
|
The PR diff is a bit hard to read and see the consequences of. Can we not just add "&& $succces" to and |
|
That would probably have the same effect. Maybe then move this whole chunk to be within this near line 1173, if it should be run only when the sending was successful and not when throttled or sending was unsuccessful.
|
|
Yes, that makes more sense. Do you want to update the PR to do that? |
|
Yes, I will revise the pull request. |
Move delay processing to be within the $success branch
|
Now added another commit that moves the delay processing. |
|
It's a bit hard to test this, but I think it looks fine, so approving. |
|
This pull request has been mentioned on phpList Discuss. There might be relevant details there: https://discuss.phplist.org/t/3-6-14-release-candidate-ready-for-testing/9109/1 |
|
This pull request has been mentioned on phpList Discuss. There might be relevant details there: https://discuss.phplist.org/t/phplist-3-6-14-released-security-release/9158/1 |
Description
When using domain throttling, if sending to an email address is rejected because the limit on its domain has been reached and an email was not sent, the delay of
MAILQUEUE_THROTTLEis still applied. This seems unnecessary and slows down the sending rate.The first commit is to apply
MAILQUEUE_THROTTLEandMAILQUEUE_AUTOTHROTTLEonly when the domain was not throttled.I don't fully understand the
$running_throttle_delayprocessing so have left that as it is.The second commit is to simplify the initialisation of the
$domainthrottlearray into one place, when a new domain is met or a new interval is started for an existing domain.Related Issue
Screenshots (if appropriate):