configuring sendmail for relaying mail form data

John DeStefano john.destefano at
Tue Oct 19 09:12:22 PDT 2004

I'm trying to use a PHP form mail script
( to process data submitted
by a Web mail form.

The installation test completed successfully, and I moved the PHP file
into my Web site.  Now, when I click the submit button, I'm brought to
the 'success' page, but an email is never received. This was also the
case during the initial test, but I was brought to the default success

The mail queue is holding these messages with the fillowing error:

Deferred: 450 <www@<host>.<domain>.com>: Sender address rejected:
Domain not found

The FreeBSD guide's Troubleshooting section points to the Sendmail FAQ
for more information.  The Sendmail FAQ on this topic contains a cycle
of links, but I get the idea that I need to configure sendmail to
route messages via my ISP's SMTP gateway, and that I need to define a
"smart host".

The most relevent FAQ entries I could find were:

So I added the following to /etc/mail/

I also created /etc/mail/relay-domains and inserted every possible
variation of domains I could think of.

I then restarted sendmail ('cd /etc/mail && make restart') and tried
the form again, but mailq showed the same 450 error.

I added the following to /etc/mail/
define('SMART_HOST', `')dnl

After a restart, mailq gave the same error.

Any thoughts on how to resolve this, or what I'm doing wrong?


More information about the freebsd-questions mailing list