Answers.Body: <p>Here is one approach - modify /civicrm/CRM/Utils/Mail/EmailProcessor.php</p>
  
  <p>so it has multiple iterations specified (in example below = 40) then run via </p>
  
  <p>drush cvapi Job.fetch_bounces</p>
  
  <p>around line 178</p>
  
  <p><code>// process fifty at a time, CRM-4002
      $iterations = 0;
      while ($iterations &lt; 40 &amp;&amp; $mails = $store-&gt;fetchNext(MAIL_BATCH_SIZE)) {
        $iterations++;
        print("\nBeginning iteration $iterations ");
        foreach ($mails as $key =&gt; $mail) {
          print(".");</code></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-25T19:19:26.503Z
Answers.LastActivityDate: 2018-10-25T19:19:26.503Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>The scenario is that bounces weren't being fetched and there is now a major backlog, and that running 50 every cron is too slow to make real progress.</p>
  
Tags: <civimail><bounce>
Title: How can I increase the rate at which the 'fetch bounce' job works
ThreadText: # How can I increase the rate at which the 'fetch bounce' job works
  
  (Asked by: username_0 on 2018-10-25)
  
  The scenario is that bounces weren't being fetched and there is now a major backlog, and that running 50 every cron is too slow to make real progress.
  
  **Tags:** civimail, bounce
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-10-25. Score: 1 | Accepted answer
  
  Here is one approach - modify /civicrm/CRM/Utils/Mail/EmailProcessor.php
  
  so it has multiple iterations specified (in example below = 40) then run via
  
  drush cvapi Job.fetch\_bounces
  
  around line 178
  
  `// process fifty at a time, CRM-4002
  $iterations = 0;
  while ($iterations < 40 && $mails = $store->fetchNext(MAIL_BATCH_SIZE)) {
  $iterations++;
  print("\nBeginning iteration $iterations ");
  foreach ($mails as $key => $mail) {
  print(".");`
  
  
  ---
  
  