[Exim] Bug/Improvement in Readfile - Exim 4

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Marc Perkel
Data:  
Para: exim-users
Asunto: [Exim] Bug/Improvement in Readfile - Exim 4
I'm using this code in a filter and it works:

# Tests RECEIVED for Known Spammers
#

elif "$h_received:" matches "${readfile{/etc/exim/blockhosts}{|}}"

then
    headers add "X-Spam: [SPAM] - Blocked Host - $h_received:"
    headers add "X-Spam-Bounce-Flag: YES"
    headers add "X-Spam-LogFile: spamreceived"


but - it only works as long as i'm really careful not yo have any blank lines at
the end of the file or a newline at the end of the last line. If I have any
blank likes at the end then I am moatching again || and that matches everything.

Maybe readfile should be smarter about ignoring blank lines?