Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Feb 2006 15:47:52 +0100
From:      "Franz Klammer" <klammer@webonaut.com>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/93291: [PATCH] sysutils/monitord - notification mails send errors with postfix
Message-ID:  <1139842072.2770@acer.webonaut.com>
Resent-Message-ID: <200602131450.k1DEo92A085962@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1139842072.2770>