exim question, copying ip to message body.

young

Verified User
Joined
Oct 22, 2003
Messages
77
does anyone know how or find how we can copy the IP address (in Received line of the header) to the message body or message subject?

i've looked for other clients that can search the headers, but i'd rather stay with outlook express for now.
 
You can probably write a filter to do it. You can get some ideas studying the source code for SpamAssassin, which, among other things, rewrites headers and bodies.

However don't expect much help from the Exim community; the purpose of an email server it do delver email unchanged. A similar question was recently brought up in the exim-users list, and I believe Dr Hazel, who writes exim, explained that he wouldn't write code to change a message body.

Jeff
 
The message header and subject line can be changed through exim. For instance:

In exim.conf
Code:
# ACL that is used after the DATA command
check_message:
  warn message = X-New-Subject: [SPAMMER!!] $h_subject:
        condition= ${perl{CheckSpam}}

  accept

The above condtion calls a routine called CheckSpam in the exim.pl file in which you can put your own rules.

and in system_filter.exim

Code:
if "${if def:header_X-New-Subject: {there}}" is there
then
   headers remove subject
   headers add "Subject: $h_X-New-Subject:"
   headers remove X-New-Subject
endif

Searching on "warn message = X-New-Subject:" will generate solutions for SpamAssassin and other situations.
 
Last edited:
Good reply, bclancey. But I don't see how it answers the original question, which was about editing the body of an email from within exim.

Am I missing something? If so, please correct me.

Thanks.

Jeff
 
I thought my suggestion was helpful because:

"does anyone know how or find how we can copy the IP address (in Received line of the header) to the message body or message subject?"

At the moment, I cannot help alter the message body. But, I can help with the message subject.
 
Back
Top