View Full Version : exim question, copying ip to message body.
young
07-11-2005, 09:25 AM
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.
nobaloney
07-13-2005, 07:24 PM
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
bclancey
07-16-2005, 06:41 AM
The message header and subject line can be changed through exim. For instance:
In exim.conf
# 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
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.
nobaloney
07-16-2005, 04:15 PM
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
bclancey
07-19-2005, 01:22 PM
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.
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.