Milter smfi_setbacklog()

Tune the size of the listen() queue V8.13 and later

The Unix C-library listen(3) function takes two arguments: the socket on which to listen; and the backlog (maximum length) of the queue of pending connections:

listen(socket, backlog);

The smfi_setbacklog() routine is used to define a new value for backlog and is called like this:

ret = smfi_setbacklog(backlog);

This call will fail and return (in ret) MI_FAILURE only if backlog is less than or equal to zero. The default value for backlog, if you don’t change it, is 20. Note that smfi_setbacklog() should be called only once before the Milter library begins to listen. If called again thereafter, the request will be ignored and will not return an error.

Note that some kernels may have built-in defaults of their own for backlog, so calling smfi_setbacklog() may have no effect at all.

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.