[EXIM] filter questions

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Mark Shacklette
Fecha:  
A: exim-users
Asunto: [EXIM] filter questions
Hi:

I have three separate questions.

QUESTION 1:

I am getting some spam where the "from" and "to" are identical, as in the
following:

From:        ney47@??? (Stickems)
To:          ney47@???
Subject:     GET 3 BILL CLINTON BUMPER STICKERS FOR ONLY $5.00
Date:        Fri, 3 Apr 1998 08:48:12 -0800


I want to create a filter that kills these spams, by tracking whether the
"from" is included in the "to" or vice versa. I'm getting more and more of
these in.

The relevant full header in my /var/spool/mail/jmshack file is:

>From ney47@??? Fri Apr 03 11:28:16 1998

Return-path: <ney47@???>
Envelope-to: jmshack@???
Delivery-date: Fri, 3 Apr 1998 11:28:16 -0600
Received: from ...
Date: Fri, 3 Apr 1998 08:48:12 -0800
To: ney47@???
From: ney47@??? (Stickems)
Comments: Authenticated sender is <ney47@???>
Subject: GET 3 BILL CLINTON BUMPER STICKERS FOR ONLY $5.00
Message-Id: <199804032128YAA13937@???>
Status: RO
X-Status:
X-UID: 614

I've written this filter command:

if $sender_address_local_part contains $local_part or $local_part
contains $sender_address_local_part
then
seen finish
endif

Is this close? If not, could someone please let me know which variables to use
to accomplish this? Thanks

QUESTION 2:

I cannot seem to get logging to work in my .forward file. I've got this at the
start of my .forward file:

# Exim filter
logfile ~/filter.log
if error_message then finish endif
if $message_headers contains "mshack"
then
log "logging test message"
endif

This trips always. However, I get an error message when I try and run:

exim -v -bf /home/jmshack/.forward <test.message

which is:

Sender from "From" line: owner-ml@???
Testing Exim filter file /home/jmshack/.forward
Logfile /tmp/filter.log
Condition is false: error_message
Condition is true: $message_headers contains mshack
Logwrite "logging test message\n"
At the end of filtering "delivered" is false

and no logging takes place at all. Debugging my .forward filter would be
easier if I knew what was happening by being able to log. I can't log
anything, and no mail will be delivered with the logging stuff in the .forward
file.

Any suggestions would be appreciated.

QUESTION 3:

Is there any place where I could get "sample" .forward filters? I have read
the filter documentation, and while there are some good examples in there, I
would appreciate being able to see more extensive examples of what can be done
with a .forward filter. I'm new to this, so its not intuitive. If there is a
place to go, I'd like to know about it. If not, if anyone wishes to "forward
their .forward" file to me (barring any security concerns, of course), I'd
appreciate seeing what others have done, ESPECIALLY in the domain of spam
control, which is why I'm running exim.

THANKS VERY MUCH FOR ANY SUGGESTIONS/ASSISTANCE.

Mark



****************************************************************
J. Mark Shacklette
Committee on Social Thought        
University of Chicago
mshack@???
jmshackl@???
****************************************************************



--
*** Exim information can be found at http://www.exim.org/ ***