Forum OpenACS Q&A: send mail error

Collapse
Posted by George Adamides on
WHen I try to add users I get the following error message when it is trying to send mail notification¨

Expected a 250 status line, got:
501 5.0.0 Invalid domain name

Can someone explain to me what is going on and how to fix it, please?

Collapse
2: Re: send mail error (response to 1)
Posted by Jeff Davis on
you should check the Hostname parameter in your config.tcl file (it should just be a domain name or IP w/o port number) and if that is not it then change the line in the /usr/local/aolserver/modules/tcl/sendmail.tcl file (or wherever your version lives) from:
_ns_smtp_send $wfp "HELO AOLserver [ns_info hostname]" $timeout
to
_ns_smtp_send $wfp "HELO [ns_info hostname]"
and see if that fixes it.
Collapse
3: Re: send mail error (response to 1)
Posted by George Adamides on
Thank for the reply.
I did what you suggested but it didn;t work out.

WHen I ping to the hostname address of my system it pings to 127.0.0.1 and not to the ip address of the system. Is it supposed to be like that?

Collapse
4: Re: send mail error (response to 3)
Posted by Christof Spitz on
George,

although I am not at all an expert, my installation is as follows (and it works now with sendmail:)

set the hostname in /etc/hosts, eg.:
127.0.0.1 localhost
192.168.1.1 myhostname

set the hostname in nsdconfig.tcl:
# set hostname              [ns_info hostname]
set hostname              "mywebsite.dyndns.com" [1]

As fas as I remember, I didnt change the sendmail.tcl

And of course, you have to be sure the sendmail daemon is running...

([1] In my installation, the host is part of an intranet LAN, but is also accessed from the "outside" internet via a router by portforwarding and a dyndns provider. (This makes it quite cheap to have a public website using a dsl flatrate). In this case, the hostname in the nsdconfig.tcl is set to the public hostname given by the dyndns ("mywebsite.dyndns.com"), otherwise mails sent from the system would have the "internal" hostname as sender, which makes no sense to the public. Of course, all this stuff may not apply if you only use your openacs installation in either intranet or internet.)

Collapse
5: Re: send mail error (response to 1)
Posted by George Adamides on
hi again
well i did all that but it still won't work and now i get a message:
can't read "hostname": no such variable