summaryrefslogtreecommitdiffstats
path: root/mail/smtpd/files
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2002-03-30 14:43:32 +0000
committerdinoex <dinoex@FreeBSD.org>2002-03-30 14:43:32 +0000
commitf134449553636a4aa6adf5666608dd74d8fb1cc5 (patch)
tree52410c560bd5aed805b6685aa871fd83911eecc0 /mail/smtpd/files
parent00ab2e677c3890a0e13a02eb9ece0f33438adffe (diff)
downloadFreeBSD-ports-f134449553636a4aa6adf5666608dd74d8fb1cc5.zip
FreeBSD-ports-f134449553636a4aa6adf5666608dd74d8fb1cc5.tar.gz
Patch to solve problem:
since version 8.12.1 (8.12.0 ?) sendmail complains if a program piping data to it doesn't have stdin, stdout and stderr opened; smtpfwdd doesn't open stdout and stderr when forwarding a mail to sendmail, therefore an anoying system messages is generated for each incoming mail: Dec 30 00:05:44 alchemy sendmail[96078]: SYSERR(uucp): File descriptors missing on startup: stdout, stderr: Bad file descriptor Maintainer Timeout. PR: 33314 Submitted by: marius@alchemy.franken.de
Diffstat (limited to 'mail/smtpd/files')
-rw-r--r--mail/smtpd/files/patch-ab22
1 files changed, 21 insertions, 1 deletions
diff --git a/mail/smtpd/files/patch-ab b/mail/smtpd/files/patch-ab
index a59be0b..3dec54b 100644
--- a/mail/smtpd/files/patch-ab
+++ b/mail/smtpd/files/patch-ab
@@ -1,5 +1,5 @@
--- smtpfwdd.c.org Wed Jun 17 21:21:10 1998
-+++ smtpfwdd.c Wed Jun 17 21:21:22 1998
++++ smtpfwdd.c Sun Dec 30 00:09:19 2001
@@ -43,12 +43,12 @@
"Copyright 1996 - Obtuse Systems Corporation - All rights reserved.";
char *obtuse_rcsid = "$Id: smtpfwdd.c,v 1.35 1997/12/12 04:07:49 beck Exp $";
@@ -14,3 +14,23 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/stat.h>
+@@ -636,6 +636,19 @@
+ exit(EX_OSERR);
+ }
+
++ /*
++ * Open /dev/null as stdout and as stderr so sendmail 8.12.1 (and
++ * above ?) won't complain about missing file descriptors.
++ */
++ if (open ("/dev/null", O_WRONLY | O_APPEND) < 0) {
++ syslog(LOG_ERR, "Couldn't open /dev/null as stdout (%m)");
++ exit (EX_OSERR);
++ }
++ if (open ("/dev/null", O_RDWR | O_APPEND) < 0) {
++ syslog(LOG_ERR, "Couldn't open /dev/null as stderr (%m)");
++ exit (EX_OSERR);
++ }
++
+ fclose(f);
+ closelog();
+ if (lseek(0, body, SEEK_SET) < 0) {
OpenPOWER on IntegriCloud