Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] urlcheck bug ?

2008-04-04 by Oliver Fromme

Benoit Branciard wrote:
 > We're running recent 4.0+ milter-greylist (2008-03-19 snapshot), and 
 > make extensive use of "urlcheck" feature for custom tests.
 > 
 > Currently our URL server is an Apache 2.2 which serves small CGI script.
 > 
 > All is fine as long as our CGI scripts only returns the one-line 
 > response "milterGreylistStatus: Ok" if they pass, and nothing if they 
 > fail (after a "Content-type: text/plain\n\n" MIME header).
 > 
 > But if we try to return multi-line responses, like :
 > 
 > milterGreylistStatus: Ok
 > milterGreylistMsg: You are not allowed to connect
 > 
 > strange things occur. The first line (the answer itself) is generally 
 > honoured, but subsequent lines are ignored and generate errors in the 
 > log like :

The HTTP protocol follows the telnet standard which
requires that lines are separated by CR+LF sequences,
i.e. "\r\n".

Many programs also accept LF only, but you shouldn't
rely on it.  It seems like milter-greylist is strict.

Best regards
Oliver

PS:  I wish more programmers kept the well-known
sentence from RFC 1122 in mind:  "Be liberal in what
you accept, and conservative in what you send."
That means that your script should output "\r\n"
(conservative), and milter-greylist should also
accept "\n" only (liberal).

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Gesch\ufffdftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M\ufffdn-
chen, HRB 125758,  Gesch\ufffdftsf\ufffdhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"I learned Java 3 years before Python.  It was my language of
choice.  It took me two weekends with Python before I was more
productive with it than with Java." -- Anthony Roberts

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.