Special Headers In Forwarded Mail

From MsgServerDocWiki

Jump to: navigation, search

Is there a way to put special headers in mail that is being forwarded?

What sort of "forwarding"? There are a number of different things that get referred to (loosely) as "forwarding". And the rules for them--and therefore what can or cannot be done when doing them--are different.

  • Users reading messages in their user agent manually "forward" a message. This sometimes breaks down even further into true "forwarding" (whether as an attachment, or inline, whether "forwarding" just the contents of the message body, or "forwarding" the entire message as an encapsulated MIME message part), versus what is in fact a "resend" operation (or "bouncing", as the Pine user agent calls it). In this case what headers can or cannot be added is highly dependent on the agent performing the forwarding action. Some user agents allow extensive header manipulation while others provide almost no facilities of this sort.
  • MTA level forwarding of a particular user address to another particular user (or users), such as with a mailDeliveryOption: forward and mailForwardingAddress:<whomever>. Pure MTA forwarding of this sort doesn't have the ability to add or alter headers.
  • Mailing list expansion--where a message was addressed to a list. The act of list expansion is also sometimes, loosely, called "forwarding". Group expansion--similar to list expansion, but where the envelope From:address is not overriden (the critical difference between true mailing lists versus groups). The MTA has the ability to add or delete headers as part of mailing list expansion. If the list is defined in LDAP the mgrpAddHeader attribute can be used to specify one or more header fields to add. Similarly, the mgrpRemoveHeader attribute can be used to specify header fields to remove.
  • A Sieve "redirect" action. Version prior to 6.3 do not have the ability to manipulate headers in this case. 6.3 and later adds partial support for the Sieve editheader extension and this means that Sieve actions like addheader or deleteheader will, if performed prior to a redirect, affect the redirected message.
  • "Forwarding" being done by some additional, external program: this would include things hooked in as "program delivery" (that is, via the pipe channel). Like the first case on this list, this is not true forwarding since the message undergoes final delivery as part of being handed off to the external agent. Any message subsequently reintroduced into the transport infrastructure is effectively a new message and should be handled as such. Obviously such mechanisms can modify the message in arbitrary ways, including but not limited to header alterations.
  • UNIX mailbox style .forward file forwarding, when an original recipient had a UNIX mailbox. This is semantically similar to forwarding with a mailDeliveryOption LDAP attribute.
Personal tools