summaryrefslogtreecommitdiff
path: root/www/tcl-cgi/patches/patch-aa
blob: 7099e9dbdf07c15fecb33387b3fb5abddb5f6d5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$NetBSD: patch-aa,v 1.5 2004/09/11 02:47:33 minskim Exp $

--- cgi.tcl.in.orig	2000-06-14 15:16:13.000000000 -0500
+++ cgi.tcl.in
@@ -2040,8 +2040,8 @@ proc cgi_mail_end {} {
 
     flush $_cgi(mailfid)
 
-    if {[file executable /usr/lib/sendmail]} {
-	exec /usr/lib/sendmail -t -odb < $_cgi(mailfile)
+    if {[file executable /usr/sbin/sendmail]} {
+	exec /usr/sbin/sendmail -t -odb < $_cgi(mailfile)
 	# Explanation:
 	# -t   means: pick up recipient from body
 	# -odb means: deliver in background
@@ -2056,6 +2056,9 @@ proc cgi_mail_end {} {
 	set s [socket $_cgi(mail_relay) 25]
 	gets $s answer
 	if {[lindex $answer 0] != 220} {error $answer} 
+	puts $s "EHLO $host";flush $s
+	gets $s answer
+	if {[lindex $answer 0] != 250} {error $answer}  
 	puts $s "MAIL FROM:<$_cgi(email)>";flush $s
 	gets $s answer
 	if {[lindex $answer 0] != 250} {error $answer}