Loading ...
Sorry, an error occurred while loading the content.

237809Re: How to copy all incoming and outgoing messages

Expand Messages
  • Victor Duchovni
    May 2, 2008
      On Fri, May 02, 2008 at 01:04:16PM -0400, Wietse Venema wrote:

      > If we can agree on a usable MIME encapsulation, then it should be
      > possible to spawn off a message in the cleanup server, after the
      > Milter processing has happened, and before the (SMTP) client is
      > notified that the mail transaction is complete.

      This is a bit tricky, because the is not necessarily a "right" answer.

      - IMHO, The natural format for an archive message is a success DSN,
      with the original message attached in full (not just headers). Having
      the format defined by a standard is IMHO rather attractive.

      - Sendmail have for many years been supplying "copier" milter that
      is perhaps a defacto standard for such encapsulation. This is a
      multipart/mixed, with the envelope in the first part and the message
      in the second. The first part encodes the sender and recipients one
      per line as follows:

      Content-Type: text/plain
      Content-Transfer-Encoding: 7bit

      Attached is a copy of a message being sent by Sendmail Message Copier
      Sendmail Copier.
      via the proxy on <hostname.without.the.angle.brackets>.

      Original sender: sender@...
      Original recipient(s): rcpt1@...

      Original message is attached.


      It would be far more natural to drop the verbiage and prefix each
      address with a type:

      Sender: <address>
      Recipient: <address>

      The second part is the attached message.

      - Microsoft Exchange has an archive format called
      Exchange Envelope Journalling. This too is not ideal, but is
      broadly implemented.

      Any format we would choose would either be ugly (ad-hoc format from
      existing vendor products) or Postfix-specific (at least initially).

      The archive module for my 'tee' proxy punts the issue by using
      format templates for the envelope part.

      Content-Type: text/plain
      Content-Transfer-Encoding: 7bit

      `printf "$senderfmt", $sender`
      `printf "$1strcptfmt", $rcpt1`
      `printf "$nxtrcptfmt", $rcpt2`


      So I can generate the Sendmail compatible format without hard-coding

      This can generate any 2-part envelope/message encapsulation with some
      stuff above the envelope, then the sender address in some form, then
      the recipients with the 1st formatted differently if need be, a footer
      and a separately attached message.

      I also capture "ORCPT" values, but don't currently distinguish between
      these and real recipients, because I don't accept "ORCPT" from outside,
      rather ORCPT is the recipient just before my own virtual address
      expansion. So capture of ORCPT would need to be optional and probably
      deserves its own format template.

      `printf "$senderfmt", $sender`
      `printf "$1strcptfmt", $rcpt1`
      [`printf "$orcptfmt", $orcpt1`]
      `printf "$nxtrcptfmt", $rcpt2`
      [`printf "$orcptfmt", $orcpt2`]

      With so much rope, is this still a reasonable Postfix feature?


      Disclaimer: off-list followups get on-list replies or get ignored.
      Please do not ignore the "Reply-To" header.

      To unsubscribe from the postfix-users list, visit
      http://www.postfix.org/lists.html or click the link below:

      If my response solves your problem, the best way to thank me is to not
      send an "it worked, thanks" follow-up. If you must respond, please put
      "It worked, thanks" in the "Subject" so I can delete these quickly.
    • Show all 14 messages in this topic