sendmail 8.12.7 squawking after MS 4.11-1 upgrade
Jeremy Evans
JeremyE at BSA.CA.GOV
Thu Jan 23 19:49:23 GMT 2003
Unfortunately, after applying the patch, I'm still getting the error:
sendmail[30488]: File descriptors missing on startup: stderr; Bad file
descriptor
This is on an OpenBSD 3.2 box. I rebooted the machine beforehand, and still
got the error when I sent a message. Then I killed MailScanner and sent a
message, without getting an error (so it goes into mqueue.in without
problems). When I restarted MailScanner, I got the error shortly thereafter
(probably when it transfers the mail back to sendmail to send out). I
haven't had a problem with mail being modified or deleted (except when it is
supposed to, i.e. bad attachment filename), so the message is more of an
annoyance than anything else. Still, it would be nice to get rid of it.
Jeremy Evans
Information Systems Analyst
California State Auditor
916-445-0255 phone
916-322-7801 fax
-----Original Message-----
From: Julian Field [mailto:mailscanner at ECS.SOTON.AC.UK]
Sent: Thursday, January 23, 2003 11:21 AM
To: MAILSCANNER at JISCMAIL.AC.UK
Subject: Re: sendmail 8.12.7 squawking after MS 4.11-1 upgrade
Oops, you're right of course.
Must remember not to code with one hand while drinking wine with the other
:-)
Revised patch is below...
At 19:12 23/01/2003, you wrote:
>Shouldn't:
>
>+ $io0->fdopen(fileno(STDIN), "r"));
>+ $io1->fdopen(fileno(STDOUT),"w"));
>+ $io2->fdopen(fileno(STDERR),"w"));
>
>be:
>
>+ $io0->fdopen(fileno(STDIN), "r");
>+ $io1->fdopen(fileno(STDOUT),"w");
>+ $io2->fdopen(fileno(STDERR),"w");
>
>in the patch?
Revised patch is
--- /usr/sbin/MailScanner Sun Jan 19 12:39:20 2003
+++ MailScanner Thu Jan 23 19:56:35 2003
@@ -37,6 +37,7 @@
require 5.005;
use FileHandle;
+use IO::Handle;
use MailScanner::Config;
use MailScanner::CustomConfig;
use MailScanner::Lock;
@@ -261,6 +262,16 @@
# If we are debugging, then just run once.
#
sub WorkForHours {
+ # Re-open the stdin, stdout and stderr file descriptors for
+ # sendmail's benefit. Should stop it squawking!
+ my($io0, $io1, $io2);
+ $io0 = new IO::Handle;
+ $io1 = new IO::Handle;
+ $io2 = new IO::Handle;
+ $io0->fdopen(fileno(STDIN), "r");
+ $io1->fdopen(fileno(STDOUT),"w");
+ $io2->fdopen(fileno(STDERR),"w");
+
# Read the configuration file and start logging to syslog/stderr
StartLogging($ConfFile);
--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support
More information about the MailScanner
mailing list