Yahoo Groups archive

Milter-greylist

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

Message

spamd checks hang when message contains

2010-06-21 by Enrico Scholz

Hi,

I see from time to time messages like

| milter-greylist: SPAMD/1.0 79 Timeout: (300 second timeout while trying to CHECK) 

in my logfiles.  After analyzing the related network traffic, all these
messages have in common that they contain an ASCII \0 in their bodies.
This character is allowed by RFC 822 (but not in 2822 + 5322).

In milter-greylist code, there is written

|     "CHECK SPAMC/1.2\r\nContent-length: %d\r\n\r\n",
|       (unsigned int)(priv->priv_msgcount + strlen(rcvhdr)));
| ...
|     spamd_write(sock, b->b_lines, strlen(b->b_lines))

--> spamd expects a content length which includes the ASCII \0, but
there are copied only ASCIIZ strings and 'spamd' does not get enough
data hence.

A trivial fix might be 'shutdown(sock, SHUT_WR)' but there are required
more invasive changes (make b_lines a buffer instead of ASCIIZ strings)
to do it right.


Enrico

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.