[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Deliver to script, working...
> I modified mailbox.c to do a fdopen(...,"w") instead of
> fdopen(...,"a").
>
> Strange...
You mean this ?
----------------------------------------------------------------
diff -c mailbox.c~ mailbox.c
*** mailbox.c~ Thu Feb 23 08:01:18 1995
--- mailbox.c Thu Feb 23 08:00:55 1995
***************
*** 991,997 ****
char *fromuser;
int lastch;
! if ((fp = fdopen(fdmail, "a+")) == NULL) {
notaryreport(NULL,NULL,NULL);
DIAGNOSTIC(rp, EX_TEMPFAIL, "cannot fdopen(%d)", fdmail);
return NULL;
--- 991,997 ----
char *fromuser;
int lastch;
! if ((fp = fdopen(fdmail, "w+")) == NULL) {
notaryreport(NULL,NULL,NULL);
DIAGNOSTIC(rp, EX_TEMPFAIL, "cannot fdopen(%d)", fdmail);
return NULL;
----------------------------------------------------------------
Sure a strange thing ... Apparently the fdopen() on BSD looks at the
file being a real file onto which the "a"(ppend) attribute makes sense.
Other systems appear to ignore possible error in the case.
I don't think this "a+" -> "w+" change will do any harm.
> The scheduler delivered the mail without errors with this change.
> My script has a "cat - > /tmp/out" to test to make it sure it was
> getting the message on stdin ok.
>
> Tom
/Matti Aarnio