ports/93291: [PATCH] sysutils/monitord - notification mails send errors with postfix
Franz Klammer
klammer at webonaut.com
Mon Feb 13 14:50:41 UTC 2006
>Number: 93291
>Category: ports
>Synopsis: [PATCH] sysutils/monitord - notification mails send errors with postfix
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Feb 13 14:50:09 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Franz Klammer
>Release: FreeBSD 6.1-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD 6.1-PRERELEASE #2: Thu Feb 9 13:58:42 CET 2006
root at acer.webonaut.com:/usr/obj/usr/src/sys/ACER292
>Description:
at least with my configuration - postfix complain a "Illegal address syntax" and
didn't accept the notification-mails from monitord.
>How-To-Repeat:
>Fix:
--- patch-ac begins here ---
--- mail.c.orig Thu Aug 21 20:44:20 2003
+++ mail.c Thu Jan 26 16:56:23 2006
@@ -81,13 +81,13 @@
read (serversd, buf, _BUFSIZE);
// Set "MAIL FROM"
- sprintf(buf, "MAIL FROM: monitord-notification@%s\n", thisname);
+ sprintf(buf, "MAIL FROM: <monitord-notification@%s>\n", thisname);
write(serversd, buf, strlen(buf));
read (serversd, buf, _BUFSIZE);
// set "RCPT TO"
bzero (buf, _BUFSIZE );
- sprintf(buf, "RCPT TO: %s\n", address);
+ sprintf(buf, "RCPT TO: <%s>\n", address);
write(serversd, buf, strlen(buf));
read (serversd, buf, _BUFSIZE);
@@ -97,17 +97,17 @@
read (serversd, buf, _BUFSIZE);
// Set "FROM"
- sprintf(buf, "FROM: monitord-notification@%s\n", thisname);
+ sprintf(buf, "From: <monitord-notification@%s>\n", thisname);
write(serversd, buf, strlen(buf));
// set "TO"
bzero (buf, _BUFSIZE );
- sprintf(buf, "TO: %s\n", address);
+ sprintf(buf, "To: <%s>\n", address);
write(serversd, buf, strlen(buf));
// set "SUBJECT"
bzero (buf, _BUFSIZE );
- sprintf(buf, "SUBJECT: %s\n", subject);
+ sprintf(buf, "Subject: %s\n", subject);
write(serversd, buf, strlen(buf));
// send actual data
--- patch-ac ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list