Merge branch 'main' into avm99963-monorail

Merged commit 4137ed7879acadbf891e8c471108acb874dae886.

GitOrigin-RevId: b6100ffc5b1da355a35f37b13fcaaf746ee8b307
diff --git a/features/inboundemail.py b/features/inboundemail.py
index 8ae095e..6326dde 100644
--- a/features/inboundemail.py
+++ b/features/inboundemail.py
@@ -320,8 +320,14 @@
     # but we are adding permanent logging so we don't have to keep adding
     # expriring logpoints.
     if '@intel' in email_addr:  # both intel.com and intel-partner.
-      logging.info(
-          'bounce message: %s', bounce_message.notification.get('text'))
+      logging.info('bounce notification: %r', bounce_message.notification)
+      logging.info('bounce message original: %r', bounce_message.original)
+      # The original message's headers are the closest we get to the
+      # servers involved in the failed communication.
+      original_message = bounce_message.original_raw_message.original
+      if original_message is not None:
+        logging.info(
+            'bounce message original headers: %r', original_message.items())
 
     app_config = webapp2.WSGIApplication.app.config
     services = app_config['services']