ec_valid_mime

March 26, 2020 Contributors

Name

ec_valid_mime — determine if the message is valid MIME

Synopsis

ec_valid_mime

Description

As a part of a conditional test, ec_valid_mime evaluates true if Momentum’s internal MIME parser did not find any MIME errors (improper headers or encapsulation). Note that Momentum’s MIME parser follows the RFC mantra, "be lenient on what you accept." We are lenient when parsing MIME headers to attempt to find the MIME parts that certain MUAs (like Outlook) would find to aid virus detection and other processes based on content analysis.

if not ec_valid_mime {
  ec_header_add "X-MIME-Analysis" "Broken";
}