Miguel Da Silva - Centro de Matemática escribió:
I wrote down the following regular expression, would it work properly?!

if /^[> ]*From:(.*)(cmat\.edu\.uy)/
if /^[> ]*Message-ID/
!/^[> ]*Message-ID:(.*)(cmat\.edu\.uy)/
    REJECT Message-ID and From incorrect
endif
endif

My idea is reject mail whose From header seems to have an e-mail from my domain, but according to the Message-ID header this message could not be sent from my server.

I'm using body_checks because these "headers" come as part of bounce messages we're receiving (backscatter).

Thank you.

Answering to myself...

if /pattern/flags

endif   Match the input string against the patterns between
        if and endif, if and only if the same input  string
        also matches /pattern/. The if..endif can nest.
        
Taken from header_checks(5) manual page. So, I will not find an input string with From and Message-ID header at the same time. :(

Greetings.
--
Miguel Da Silva
Administrador Junior de Sistemas Unix
Centro de Matemática - http://www.cmat.edu.uy
Facultad de Ciencias - http://www.fcien.edu.uy
Universidad de la República - http://www.rau.edu.uy

Reply via email to