Answers.Body: <p>This has been implemented in <a href="https://github.com/systopia/de.systopia.mailingtools" rel="nofollow noreferrer">this</a> extension. Currently a bit static, but patterns for smtp (enhanced and simple) as well as some german away patterns can be easily added.</p>
  
  <p>Extension is alpha at the moment, so handle with care. Pattern files are JSON, and can be edited as well. The Extension does a bit more as well, check Readme.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-22T13:38:14.570Z
Answers.LastActivityDate: 2018-03-22T13:38:14.570Z
Answers.UserDisplayName: Phil_B
Body: <p>Currently Bounce Mails are fetched from the smtp store, and a list of regexes are applied to the mail to try and categorize the bounce. There are 10 categories, and an eleventh for when a mail couldn't be matched (syntax bounce).</p>
  <p>What I am missing are the defined SMTP status codes. Here is a list with an official list of codes from the RFC, as well as some lists I found convenient for translating the basic status code to the enhanced one:</p>
  <ul>
  <li><a href="https://www.rfc-editor.org/rfc/rfc5248#page-5" rel="nofollow noreferrer">https://www.rfc-editor.org/rfc/rfc5248#page-5</a></li>
  <li><a href="https://www.usps.org/info/smtp_status.html" rel="nofollow noreferrer">https://www.usps.org/info/smtp_status.html</a></li>
  <li><a href="https://www.usps.org/info/smtp_codes.html" rel="nofollow noreferrer">https://www.usps.org/info/smtp_codes.html</a></li>
  </ul>
  <p>In a test environment with 4000 bounce mails, 1290 couldn't be classified (syntax bounce), but out of those ~850 mails have some form of SMTP status code.</p>
  <p>Did anyone ran into some of those problems as well? And wouldn't it make sense to implement those codes as regexp and push them to core?</p>
  <p>If no one has done it yet, I would offer to implement the regex, but I don't want to re-implement something. I'm curious why/if nobody ran into the same problem!</p>
  
Tags: <civimail><smtp><bounce>
Title: Bounce pattern - SMTP Error Codes
ThreadText: # Bounce pattern - SMTP Error Codes
  
  (Asked by: username_0 on 2018-03-13)
  
  Currently Bounce Mails are fetched from the smtp store, and a list of regexes are applied to the mail to try and categorize the bounce. There are 10 categories, and an eleventh for when a mail couldn't be matched (syntax bounce).
  
  What I am missing are the defined SMTP status codes. Here is a list with an official list of codes from the RFC, as well as some lists I found convenient for translating the basic status code to the enhanced one:
  
  * <https://www.rfc-editor.org/rfc/rfc5248#page-5>
  * <https://www.usps.org/info/smtp_status.html>
  * <https://www.usps.org/info/smtp_codes.html>
  
  In a test environment with 4000 bounce mails, 1290 couldn't be classified (syntax bounce), but out of those ~850 mails have some form of SMTP status code.
  
  Did anyone ran into some of those problems as well? And wouldn't it make sense to implement those codes as regexp and push them to core?
  
  If no one has done it yet, I would offer to implement the regex, but I don't want to re-implement something. I'm curious why/if nobody ran into the same problem!
  
  **Tags:** civimail, smtp, bounce
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-03-22. Score: 1 | Accepted answer
  
  This has been implemented in [this](https://github.com/systopia/de.systopia.mailingtools) extension. Currently a bit static, but patterns for smtp (enhanced and simple) as well as some german away patterns can be easily added.
  
  Extension is alpha at the moment, so handle with care. Pattern files are JSON, and can be edited as well. The Extension does a bit more as well, check Readme.
  
  
  ---
  
  