Here's how an email message can be reformatted or altered in transit, between a sending MTA and a recipient's MUA.

First off, almost all MTAs and forwarding agents will prepend a Received: header noting the handover details (date of reception, hostname of receiving MTA, HELO name of sending agent, and IP address and possibly rDNS of sending agent).

Please be sure to note if the header is prepended, appended, or if header order and formatting is maintained for existing headers.

Mailing List Managers

Mailman, appends the headers List-Id, List-Owner, List-Post, List-Subscribe, List-Unsubscribe, List-Help, List-Archive, Precedence, Sender, Reply-To, by default. It can also add Errors-To, X-BeenThere and X-Mailman-Version.

ezmlm prepends the headers Reply-To:, Precedence:, Mailing-List: . Some ezmlm lists seem to rename the old Message-Id header to X-Message-Id and create a new one.

LYRIS list software will move Message-Id to X-Message-Id and create a new Message-Id. It's unclear what other headers are added or modifications are made.

Yahoo! Groups adds X-Originating-Ip, X-Yahoo-Profile, Mailing-List, Delivered-To, Precedence, List-Unsubscribe, X-Sender, X-Apparently-To and sometimes X-Egroups-From. Some headers are appended, some are prepended.

Many list manager can be configured to add some kind of tag in front of the Subject. Some might also mangle the Reply-To header.

Relays

MS Exchange will reformat From, To, Received, and Message-Id headers, and may remove headers and even entire MIME parts, depending on its configuration.

Sendmail may convert character sets during message reception (noted on 8.11.6). This results in appending a X-MIME-Autoconverted header noting the details:

Exim can be configured to prepend Envelope-to, Delivery-date and Delivery-time headers (only the first word is upper cased).

qmail prepends (before the Received header) a Delivered-To header on delivery.

fetchmail appends an X-UIDL header for POP3 accounts unless configured otherwise. It also tends to add it's own Received line just before the topmost Received header in the mail (eg. if qmail added a header sequence Delivered-To:...\nReceived:..., fetchmail will add it's own header in between).

Almost all MTAs will add Date and Message-Id headers if not already present, and will qualify unqualified addresses (no hostname) in the From, To and CC headers. The last SMTP relay usually prepends the Return-Path.

Mail Services

GMX appends the headers X-GMX-Antivirus and X-GMX-Antispam.

Filters

SpamAssassin adds the headers X-Spam-Status, X-Spam-Level, X-Spam-Checker-Version and (conditionally) X-Spam-Flag; SA 2.6x allows complex control over what headers can be added.

AMaViS adds the header X-Virus-Scanned.

Many user-defined filters add an X-Loop header to avoid mail looping.

MUAs

Evolution appends the header X-Evolution.

Eudora adds the following tags to HTML MIME parts: <x-html>, <x-stuff-for-pete>.

MH prepends the headers Replied, Forwarded, and some others.

MS Outlook will perform a massive variety of mangling; a message is pretty much impossible to deal with once Outlook has got its hands on it.

MailManglingInTheField (last edited 2009-09-20 23:16:41 by localhost)