MimeComplianceCategories Enumeration

An enumeration of the kinds of harm that a MIME compliance violation may cause.

Definition

Namespace: MimeKit
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
[FlagsAttribute]
public enum MimeComplianceCategories

Remarks

Where MimeComplianceSeverity rates how much harm a violation is likely to cause, the category describes what kind of harm it is. The two are independent: a violation may be harmless to one consumer and serious to another depending on what that consumer is trying to do.

A violation may belong to more than one category, so this is a bit field. For example, ObsoleteBase64Comment is both DataLoss (the comment text is absorbed as base64 data, silently corrupting everything that follows it) and Security (a decoder that skips the comment and one that does not will derive different content from the same bytes).

Categories are intended for filtering. A program that lints outgoing mail cares about Interoperability, a mail gateway cares about Security, and an archiver cares about DataLoss. Each can select the issues relevant to it without having to enumerate individual violations.

Every category describes a kind of harm. There is deliberately no category for harmless deviations, because MimeReader only reports deviations that are worth reporting, and "safe to ignore" is already expressed by Minor.

  Note

These ratings reflect practical experience with mail software found in the wild rather than anything stated by the specifications themselves.

Example

C#
                    foreach (var issue in logger.Issues) {
    if ((issue.Categories & MimeComplianceCategories.Security) != 0)
        Console.WriteLine ("Possible evasion attempt: {0}", issue);
}
                  

Members

None 0 No category.
Interoperability 1 Other software may reject, mangle, or render the message differently.
DataLoss 2 Content may be silently lost or corrupted when the message is decoded.
Security 4 The construct can be used to make two pieces of software disagree.

See Also

Reference