[Exim] Help with a system filter.........

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Jeramie Mesenbring
Datum:  
To: exim-users
Betreff: [Exim] Help with a system filter.........
Hello all,

Below is my system filter, I just want to see if anyone has any ideas on how
to make it more efficient and or corrections in my logic.

The premise is I have Spam-assassin working for me, and if a mail message is
tagged as Spam, send back the user a note to let them know, and how to get
the mail to me.

The problem with my current system filter is that I am using $h_From: and
lots of folks get mail from me because of "spoofed" headers, so I am trying
to fix that issues with this "new" un-tested filter.

Anyway, thanks in advance for your help.


#   Exim filter    <<== do not edit or remove this line!


if not first_delivery then
finish
endif

if $header_To: contains "real-"
then
# deliver ${sg{$header_To:}{real-}{}}
pipe "/usr/bin/exim -C /usr/local/exim/real.conf
${sg{$header_To:}{real-}{}}"
endif

  if $h_X-Spam-Flag: contains "YES"
   then
     if $return_path: matches $sender_address:
       then
        logfile /var/log/exim/spamlog.db
         logwrite "$tod_log From: $h_From: Subject: $h_Subject:
X-Spam-Status: $h_X-Spam-Status: Sender: $sender_address  SentTo: $h_To"
           if $return_path: is not ""
             then
              mail to $return_path
              subject "Re: Your last message to me was rejected."
              text "\n \n Your mail with Subject: $h_Subject: \n \n would
appear to be unsolicited mail. \n \n Your message was sent to: $h_To: \n \n
\
              If you intended to contact that person for legitmate reasons
then our apologies. \n \
              Please would you resend to the same address but add real- to
the e-mail address and it will bypass the filters. \n \
              For example, bobm@??? would become
real-bobm@???.\n \n Thank you. \n \n Postmaster \n________________"
          once /var/log/exim/spamcount
       once_repeat 4d
    endif
   seen finish
  endif
 endif