Re: [exim] Having a heck of a time with check_local_user

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Tony Finch
Date:  
À: Jason Lixfeld
CC: exim-users
Sujet: Re: [exim] Having a heck of a time with check_local_user
On Mon, 3 Jul 2006, Jason Lixfeld wrote:

> --------> virtual_user router <--------
> local_part=jlixfeld.example.ca domain=mail.example.ca
> checking for local user
> virtual_user router skipped: jlixfeld.example.ca is not a local user
> no more routers


I'm not sure what the problem is. It might be that the Exim user doesn't
have enough privilege to do the LDAP NSS stuff. What are the permissions
on /etc/nss_ldap.conf? (or whatever the filename is)

You could try recompiling Exim with this patch, which might get slighly
more useful error reporting out of check_local_user in debugging mode.
Given the history of the code, I expect Philip has some war stories to
tell about bad error reporting from getpwnam(). I don't know how widely
the current POSIX behaviour is followed; if we can rely on it then it's
probably worth improving the error handling here.

--- route.c     7 Feb 2006 11:19:00 -0000       1.8
+++ route.c     3 Jul 2006 17:46:39 -0000
@@ -1104,10 +1104,14 @@


   else for (;;)
     {
+    errno = 0;
     if ((lastpw = getpwnam(CS s)) != NULL) break;
     if (++i > finduser_retries) break;
     sleep(1);
     }
+  DEBUG(D_uid)
+    if (lastpw == NULL && errno != 0)
+      debug_printf("getpwnam(%s) failed: %s\n", s, strerror(errno));


   if (lastpw != NULL)
     {


Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}