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: Kevin Stevens (groupspursued-with.net)
Date: Thu Nov 01 2007 - 10:51:55 CDT


On Nov 1, 2007, at 06:07, Victor Duchovni wrote:

> 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

mail_version = 2.4.3
mail_release_date = 20070531

Not sure what Tiger used, but obviously it was quite a bit older.

>
>
>> 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.

I thought of that, but what's confusing to me there is I thought the
local daemons were short-lived spinoffs from master anyway, so why
would it matter? Unless master does the lookup and passes it off to
local. But in that case, why is the mail accepted for delivery at all?

>
>
>> 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.

Egad. I'll have to work on that one.

Tx.

KeS