class Mail::Message

def delivery_status_report?

Returns true if the message is a multipart/report; report-type=delivery-status;
def delivery_status_report?
  multipart_report? && content_type_parameters['report-type'] =~ /^delivery-status$/i
end