[exim] subject rewrite with exim.conf

netlook

Well-Known Member
Mar 25, 2004
335
0
166
Hi

Is it possible to rewrite e-mail subject by some magican directives put in exim.conf?

I have to rewrite subject of every mail that is delivered to my server, is it possible???

Thank you.
 

deftech

Member
Jan 11, 2006
12
0
151
yes you can in the ACL's section with exiscan syntax.

many people use it to rewrite the subjects to show they are spam.
 

nadal

Registered
Sep 19, 2006
1
0
151
Italy
Hi, I have changed exim configuration this way:

comment the following lines in /etc/exim.conf (or from cpanel exim configurator):

deny message = Message rejected because $sender_fullhost \
is blacklisted at $dnslist_domain see $dnslist_text


and add this:

warn message = $dnslist_domain EMAIL-DI-SPAM $h_subject:

Check in your exim conf file wich file file contains the system filter (mine is /etc/antivirus.exim)

system_filter = ...

and then add this filter in it:

if
"${if def:header_X-ACL-Warn: {there}}" is "there"
and ("${lookup{${lc:$sender_address}}lsearch*@{/etc/rblwhitelist}{1}{fail}}" is "fail")
and foranyaddress ${lc:$recipients}("${lookup{${thisaddress}}lsearch*@{/etc/rblwhitelist}{1}{fail}}" is "fail")
then
headers remove Subject
headers add "Subject: $h_X-ACL-Warn:"
endif

Remember to check your path for "/etc/rblwhitelist" if it's different on your server exim restart will report an error in the log.

This should work!
 
Last edited: