Re: [EXIM] filter question

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Mark Shacklette
CC: exim-users
Sujet: Re: [EXIM] filter question
On Sun, 29 Mar 1998, Mark Shacklette wrote:

> Could someone sanity-check this .forward entry for correctness?
>
> # Exim filter
> logfile $home/filter.log
>
> if $reply_address contains "Alphabyte"
> then
>         mail to someone@??? subject "REJECTION" text "All future mailings
> will bounce.  Please remove us from your list(s)." return message
>         seen finish
> endif


Looks OK to me. You can always syntax check by using "exim -bf".

> Specifically, I don't know how to log to my log file the fact that I received
> another email and bounced it. I tried to log to filter.log, but I got errors,
> and no mail was delivered at all. So I'd need a log line as well. I'm not
> sure if the mail to is correct either.


Did you try

log "this is the line I want to log"

? If you put that *after* the "mail" command you will have hit a problem
with filters that I somehow failed to notice. There is both a "log"
command, *and* a "log" option of the "mail" command. Consequently,
positioning a "log" command after a "mail" command causes confusion. In
the next release of Exim (to be released in a few minutes time) I
renamed the "log" command as "logwrite" to get round this (though the
old name remains for compatibility).

So, in the current version of Exim, you need to put the log line as
suggested above *before* the "mail" command, or use the "log" option of
the mail command (which predates the general logging facilities).


-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



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