Forum OpenACS Q&A: ns_sendmail error: 501 sender domain must exist

This is probably a configuration problem.

I'm trying to set up a site under AOLserver3, it's vaguely ACS-derived
(the site in which I did the very first bboard port).  I'm moving it
from an old P200 to a nice new dual P450 box, and in the process going
from AOLserver2 to 3.

Everything's working great, I've switched to .tcl init files, blah
blah.  But ... every attempt to ns_sendmail fails with the error
message in the title.

Strange thing is ... the message is actually sent!  That's what's
bizarre.  Obviously, I have mailhost configured correctly or else the
message wouldn't ever get to me.  I have domain defined to my ISP in
/etc/resolv.conf.

Any ideas?

Since I answer so many questions, by asking one I guess I'm just
"giving back to the community", eh?

Can you post the full headers of the email as well as the actual ns_sendmail command line, as well as the output from [ns_info hostname]?  😊
This happened to me when I switched our domain from "linux.usu.edu" to "fslc.usu.edu" (still have linux.usu.edu as alias). The thing is that when the computer services folks here at USU changed the DNS entries, they did not add "linux.usu.edu" as alias as I had requested.

All my AOLserver files had linux.usu.edu back then and I started getting these errors. I edited the AOLserver files to reflect fslc.usu.edu and it disappeared. Later the DNS entries for "linux.usu.edu" were added as well.

Do you have the "MailHost=" param right in your config file ? I am not 100% sure how ns_sendmail works. Doesn't it call your MTA ? If so, check if your MTA is well.

Hope this helps.

Collapse
4: how ns_sendmail works (response to 1)
Posted by Michael A. Cleverly on
Roberto, ns_sendmail works by opening an IP connection to port 25 of the host you specify as the mailhost setting in the config file (.ini/.tcl). It then engages in SMTP dialouge with the specified MTA. The source really isn't all that long, and if you haven't looked before, it's worth a quick read. You can find it under [ns_info home]/modules/tcl/sendmail.tcl
Collapse
Posted by Don Baccus on
No, Michael, you CAN'T see my init files!  No!  No!  No!

It was, of course, such a stupid configuration error that I figured it  out as I was walking back from having my afternoon coffee at one  of my local hangouts.

Collapse
6: how about qmail? (response to 1)
Posted by Terry G. Lorber 2nd on
This might be more of a MTA question...but what the heck. I just switched from sendmail to qmail. Since ns_sendmail is only talking to the MTA listening on port 25 (and not running a sendmail binary), does that mean I don't need to do anything else to keep ns_sendmail happy? I've linked all the sendmail directories as described in the qmail INSTALL pages.

Thanks.