OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Bennett Todd (betrahul.net)
Date: Thu Mar 15 2001 - 18:40:44 CST

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    2001-02-01-11:36:11 Ralf Hildebrandt:
    > See the archives. Theoretically it's possible using the content_filter
    > mechanism, and a lot of nifty coding.
    >
    > Easily? No.

    With my SMTP proxy framework, it'd mostly be easy; the remaining
    issue would be addressing MIME encoding. The harder you want to try
    to do it elegantly, the harder it'll get, and the slower it'll run.

    It might actually work well enough for practical use if you simply
    append the lines, making sure a blank line separates the preceeding
    body from your added text if it doesn't already end with one, and
    adding a blank line after; I think most MIME decoders are tolerant
    of miscellaneous text after the final boundary, and perhaps some may
    even display it. For single-part text/plain messages that'll work
    fine.

    The next simplest thing might be a partial MIME analysis; decide
    that you'll only touch single-part text/plain, single-part
    anything-else, and multipart/mixed. For the first, just append your
    text; for the second, turn it into a multipart/mixed with the
    original body as the first part and your attachment as a second in a
    text/plain, and for the third, add another text/plain part using the
    existing boundary.

    In principle you could handle anything, and gracefully, by using
    nesting, and for the other types creating a new multipart/mixed
    top-level, whose first part has the entire original mime structure
    within it, and the second part is your attachment; but I've heard
    rumours that some widely-used MUAs might not handle nested MIME so
    well.

    -Bennett

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.4 (GNU/Linux)
    Comment: For info see http://www.gnupg.org

    iD8DBQE6sWEMHZWg9mCTffwRAkNKAJ4r7gV8+IFLUEYyAPTH0W/iu87V9gCdH5Zh
    94VJP94pfBpRXAKpB+pGxgo=
    =2gli
    -----END PGP SIGNATURE-----

    -
    To unsubscribe, send mail to majordomopostfix.org with content
    (not subject): unsubscribe postfix-users