[exim] Exim as gateway server, how to filter using .forward …

Top Page
Delete this message
Reply to this message
Author: Lars Bjerring
Date:  
To: exim-users
Subject: [exim] Exim as gateway server, how to filter using .forward ?
Hi I need som help with the .forward file.

I have setup exim4 and spamassassin on a debian box. Mail is spam
checked and forwarded to an exchange server.

Spam check is working and mails are forwarded to the exchange. But Spam
mails are also forwarded to the user. I would like the mail to be send
to spambox@??? if header is "X-Spam-Flag:YES". But where do I
place the .forward file when there are no user mail boxes on the linux
server ?


I set this in "/etc/exim4/conf.d/router/200_exim4-config_primary" to
forward to the exchange
send_to_gateway:
driver = manualroute
transport = remote_smtp
route_list = * mail.mydomain.com


I have added "allow_filter = true" to
"/etc/exim4/conf.d/router/600_exim4-config_userforward"


I have this in the .forward fil:
# Exim filter 
if $h_X-Spam-Status: CONTAINS "Yes"
     or
  $h_X-Spam-Flag: CONTAINS "Yes"
then
  deliver spambox@???
endif



I hope someone can help me out here !!

/Lars