[Exim] pipe() blockage with queryprogram router

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: John Vaughan
Data:  
Para: exim-users
Assunto: [Exim] pipe() blockage with queryprogram router
I need a plumber:

I'm attempting to use exim 4.20 to replace a nasty hack of sendmail and
netscape messaging server. However, I don't have the mental energy to deal
with converting netscape's ldap group formats into something sensible
(things like dynamic groups are a big problem).

So, to make groups work, I wrote a little perl script which will do the
hard recursive ldap lookup work and talk to exim via a queryprogram
router.

It works just fine for small lists, but when I started getting into my
bigger lists, there were issues. Bear in mind that this script returns a
line in the format:

REDIRECT foo@???,bar@???,baz@???...

and the returned line for the largest mailing list I can find is a shade
over 8Kbytes long...

1) The read buffer for the pipe is way too small (defined at line 191 in
src/routers/queryprogram.c) and once I bumped that up, it worked better
(ie, didn't cut off after about the 10th user).

2) This is the one that's got me stuck:
When I test my biggest list (returning an 8k+ line down the pipe) using
exim -bt <foo> on RedHat 9 (completely patched up to date), exim just
hangs. If I do the same thing on a similarly setup exim on a solaris 8
box, it works fine. The only difference (apart from the OS) is that the
linux box uses openldap and the solaris box uses Netscape's ldap sdk, but
I'm really hoping that doesn't affect the pipe.

Anyway, on the linux box, the two processes appear to be deadlocked
somehow.
strace on the running exim process shows this:

wait4(727,

and strace on the sending script shows:

write(1, "address1@???,address2@agen"..., 4096


and we just hang there indefinitely. As I said, it works just fine on
solaris 8.

I'd really like to sort this out on linux because I'd prefer to use linux
on the mail relays (which is what this'll be). I really don't know enough
to determine if it's a linux problem, a redhat problem or an exim
problem, and I've not seen any other similar problem described anywhere...



--
John Vaughan                            | 20 Exchange Place
Director of Network Infrastructure    | New York, NY 10005
AGENCY.COM                              | 212-358-5407
Current Mission: Continue the war on spam, and concoct a new mail server