OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Postfix local delivery stops after an hour.

From: Victor Duchovni (Victor.DuchovniMorganStanley.com)
Date: Thu Nov 01 2007 - 08:07:29 CDT


On Thu, Nov 01, 2007 at 01:29:53AM -0700, Kevin Stevens wrote:

> Hello there -
>
> I'm having an odd local mailbox delivery problem.
>
> I've recently upgraded my OS X installation from 10.4 (Tiger) to 10.5
> (Leopard). In the process, my postfix installation, which has been
> stable for many months, was updated. My master.cf and main.cf
> customizations (minor changes to enforce $mydomain, etc. and deliver
> to maildir) were manually edited into the new files, I didn't just
> copy over the old configs. Aliases and other hash tables were rebuilt
> with postmap.

What version of Postfix is shipped with Leopard?

        $ postconf mail_version mail_release_date

> I'll run postfix start to begin servicing inbound SMTP, and life is
> good. I'll get delivery notices like:
>
> Oct 30 18:42:37 babelfish postfix/local[2871]: AC70B768FA:
> to=<kespursued-with.net >, orig_to=<groupspursued-with.net>, relay=local,
> delay=3.2, delays=3.2/0/0/0, dsn=2.0.0, status=sent (delivered to maildir)
>
> After running for about an hour (hard to tell exactly), I'll suddenly
> see a bounce notice like this:
>
> Oct 30 19:46:42 babelfish postfix/local[2780]: AC02A768D9:
> to=<kespursued-with.net>, orig_to=<zixxerpursued-with.net>,
> relay=local, delay=0.56, delays=0.45/0.05/0/0.06, dsn=5.1.1,
> status=bounced (unknown user: "kes")

Sounds like a "netinfo" problem. Is there some sort of "netinfo" listener
that is recycled each hour? Perhaps the C-library getpwnam(3) fails for
long-running processes as a result.

> What other info can I provide? This has me completely baffled.

Download the Postfix (say 2.4.6) source code, and build it, but don't
install. Apply the following patch to src/global/mypwd.c, and in the
src/global directory:

        $ make mypwd
        $ ./mypwd kes postfix nobody

Let this run until it fails, or many hours later you get tired of waiting
for a miracle. It will print lookup results for the three users once
a minute. Report the results here.

Index: global/mypwd.c
--- global/mypwd.c 29 Mar 2007 06:20:08 -0000 1.1.1.1
+++ global/mypwd.c 1 Nov 2007 13:01:55 -0000
-211,6 +211,7
 
     mypwd = (struct mypasswd **) mymalloc((argc + 1) * sizeof(*mypwd));
 
+ for (;;) {
     for (i = 1; i < argc; i++) {
         if (ISDIGIT(argv[i][0]))
             mypwd[i] = mypwuid(atoi(argv[i]));
-225,6 +226,8
         msg_info("- %s link=%d used=%d used=%d", argv[i], mypwd[i]->refcount,
                  mypwcache_name->used, mypwcache_uid->used);
         mypwfree(mypwd[i]);
     }
+ sleep(60);
+ }
 
     myfree((char *) mypwd);

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomopostfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.