On Thu, Apr 14, 2016 at 02:00:41PM +0200, Boudewijn Dijkstra wrote: > After some hours or days after starting smtpd I get: > > Apr 13 21:39:58 belisama spf[25177]: warn: filter-api:spf socketpair: Too > many open files > Apr 13 21:39:58 belisama delay[14001]: warn: session e6640a1435e43218: write > out of sequence > Apr 13 21:39:58 belisama last message repeated 95 times > > After a first such warning, the same happens on every incoming message. The > filter process then has several hundred sockets to its name. > > The same has also occurred with a filter chain of only filter-pause but this > didn't cause any > real problems.
Oh, a few questions arise here: 1. Does it happen with filter-pause not in a chain but in a normal single filer, as well? 2. Does your filter spf also hit the number of open files limit if you remove the filter-pause from the chain, just running your own filter? 3. To which filter-process you see the open sockets, exactly filter-pause or filter-spf? 4. Do you think that filter-pause is the culprit or triggering filter responsible for the hanging sessions? 5. Can you turn on tracing the filters and smtp session to see, where it stuck exactly? > However, with my filter-spf in the chain this results in > messages being accepted with an empty data portion, which is highly > undesirable. > > On an error, socketpair() sets errno, so as a work-around I think I should > reject with 451 if errno is found to be nonzero inside a filter callback. > Should this work? Yes, you should check every library or syscall for it's return value (and maybe errno) and handle the error, e.g. temporarily reject with 4xx error code. See the existing filters for examples. -- You received this mail because you are subscribed to [email protected] To unsubscribe, send a mail to: [email protected]
