Forum OpenACS Q&A: Re: ns_sendmail failed: Expected a 250 status line; got:

On my production server runs RedHat and courier mail, using a ESMTP protocol. I extended the sendmail.tcl script to  accept the different termination dialog (eiter 221 or 250).

These are the patches:

39,47d38
< #
< # This script has been extendend by cjeva (One Reality Ltd) for working with
< # an ESMTP server, which has some strange beahaviour  ending the service.
< # For this purpose some debugging info has been added and the optional check
< # for two valid return codes.
< # 2003-06-25 cjeva
< # 2003-11-27 cjeva AOL 4.0
< #
<
53d43
<    ns_log debug "ns_sendmail: send=$string"
66,68c56
<
<      # check code in list of allowed ones:
<      if { [lsearch -exact $check $code] == -1 } {
---
<blockquote>      if {![string match $check $code]} {
</blockquote>
189c177
<      _ns_smtp_recv $rfp {221 250} $timeout
---
<blockquote>      _ns_smtp_recv $rfp 221 $timeout
</blockquote>