aghstrategies / com.aghstrategies.airmail

Unified CiviCRM bounce event handler for SMTP services
Other
8 stars 13 forks source link

Unknown bounce category 'Ignore' #38

Open bugfolder opened 9 months ago

bugfolder commented 9 months ago

I am getting bounces with an unknown bounce category. The error message in my log (coming from the CiviCRM AirMail extension) is (with some trimming):

Unrecognised Elastic Email webhook event received: Received undocumented category 'Ignore' Event data: {"reset":"1","secretcode":"***","transaction":"***","to":"***","from":"***","date":"***","status":"Error","channel":"SMTP API","account":"***","category":"Ignore","postback":"***","subject":"***","messageid":"***","q":"civicrm\/airmail\/webhook"}

So the bounce category is 'Ignore'. But this isn't a listed category on https://elasticemail.com/developers/api-documentation/web-api-v2#classes_BouncedCategorySummary

I see in Elastic.php that it is in the $mapElasticCategoryToCiviBounceType array as

      'Ignore'                => NULL, // ? huh? Exists in documentation without definition

I've queried ElasticEmail via their support chat as to what the definition of this category should be.

bugfolder commented 9 months ago

After some back-and-forth with ElasticEmail about the undocumented 'Ignore' category, here's what they said:

Thanks for the message ID, if we check the bounce message it shows: The server response was: 452-4.2.2 The recipient's inbox is out of storage space. So their inbox is simply over quota.

I asked about the missing documentation of the 'Ignore' category, and they said:

as Antoinette mentioned regarding the reasons for bouncing - these are usually explained on our dashboard. As per the documentation update, the APIv2 documentation is no longer developed as it has been replaced by our Rest API v4. Of course - v2 doesn't lose its functionalities, but our Tech Team no longer focus on improving it.

So I guess they will leave it undocumented.

However, I went and checked 5 of the bouncebacks that returned that category, and they were all over-quota errors. So perhaps it would be better to treat such bouncebacks as a CiviCRM "over quota" type (type = 8), rather than as NULL.

Would you agree? If so, I can submit a PR.