Stripping Headers

Is there a simple way to strip out headers from incoming emails,
or have them not visible in the tickets?

thanks.

-j

If the shoe fits, get another one just like it.

Is there a simple way to strip out headers from incoming emails,
or have them not visible in the tickets?

For the web form of in outgoing mail?

In rt/lib/rt/ui/web/manipulate.pm there’s a line deep in the
“print_history_tables” subroutine:

"&rt::ui::web::print_transaction( 'all', 'received', ... )"

If you change ‘all’ to ‘none’ headers are not displayed in the web
forms (or you can change it to something like ‘to|from|subject’ to
just display the selected headers).

If you are talking about headers that are in the outgoing mail
generated by RT, in rt/lib/rt/ui/mail/manipulate.pm the last line of
the “munge_content” subroutine is

$content = $body . "\n\n--- Headers Follow ---\n\n" . $headers;

If you change that line to:

$content = $body;

the headers are stripped from the mail messages.

Some caveats:

o This is all in RT 1.0.2.

o I am not an official (or even semi-official) developer for RT, so
don’t have any experience with what the side effects of such changes
might be.

o Stripping the headers may not always be a good idea (even if it
works) if there is possibility of confusion as to where a message
came from before RT works with it.

— Eric

Never saw an answer to this question and I am facing the same issue. Did
anyone send an answer off-list? If so, could you send me some suggestions
also?

I sent this a while ago:

Is there a simple way to strip out headers from incoming emails,
or have them not visible in the tickets?

For the web form of in outgoing mail?

In rt/lib/rt/ui/web/manipulate.pm there’s a line deep in the
“print_history_tables” subroutine:

"&rt::ui::web::print_transaction( 'all', 'received', ... )"

If you change ‘all’ to ‘none’ headers are not displayed in the web
forms (or you can change it to something like ‘to|from|subject’ to
just display the selected headers).

If you are talking about headers that are in the outgoing mail
generated by RT, in rt/lib/rt/ui/mail/manipulate.pm the last line of
the “munge_content” subroutine is

$content = $body . "\n\n--- Headers Follow ---\n\n" . $headers;

If you change that line to:

$content = $body;

the headers are stripped from the mail messages.

Some caveats:

o This is all in RT 1.0.2.

o I am not an official (or even semi-official) developer for RT, so
don’t have any experience with what the side effects of such changes
might be.

o Stripping the headers may not always be a good idea (even if it
works) if there is possibility of confusion as to where a message
came from before RT works with it.

— Eric
Eric Goodman | “The opinions expressed by Eric do not
Workstation Support Group | represent the opinions of anyone who
UC Santa Cruz | matters.”
ericg@cats.ucsc.edu | — (modified from) “Cartoon Planet”