Forum OpenACS Q&A: ns_sendmail error

Collapse
Posted by David Bell on
Hi,
  Im getting the following error when the notifications package trys to send an email.

Error: ns_sendmail failed: Expected a 250 status line; got:
501 5.0.0 Invalid domain name

in my config file i have

ns_param  MailHost          localhost

and when i telnet to port 25 on localhost i can send a mail fine using smtp commmands.

Does anyone have any ideas what is causing this error?

thanks

David

Collapse
2: Re: ns_sendmail error (response to 1)
Posted by David Bell on
I have found a way to fix the above problem.

I went into my aolserver/modules/tcl/sendmail.tcl file and noticed that when ns_sendmail talked to sendmail it was sending the following command

Helo AOlServer [ns_info hostname]

this isnt allowed by sendmail as it doesnt accept the space in the domain name. I changed this to

Helo [ns_info hostname]

and all works fine.

Should this be changed in the dist of AOLServer?
I am not sure if the SMTP protocol allows a space in the domain, but maybe it should be changed so that it always works with sendmail.

David

Collapse
3: Re: ns_sendmail error (response to 2)
Posted by Jamie Rasmussen on
I fixed that problem about four months ago in the AOLserver CVS on SourceForge:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/aolserver/aolserver/tcl/sendmail.tcl

The SF version also includes a patch from Bart Teeuwisse - we should ask Mat to update the OpenACS version of AOLserver if he hasn't already.