I've got a base Debian Etch install to which I've added Apache 2, PHP
5 and MySQL 5. Now I would like to be able to use the mail() function
in PHP, but was getting errors about sendmail not being available so I
installed it. However, I do *not* want the overhead of running a mail
server (very RAM constrained Xen virtual machine) so I disabled the
sendmail service at all runlevels.

I assumed this would work and that mail() calls in PHP would then just
run sendmail which would deliver the mail and then stop. However, the
syslog is now filled with entries ending:

stat=Deferred: Connection refused by []

Why is the sendmail program trying to deliver everything to the
localhost? How can I make it perform direct delivery to the
recipient's mail server?

Many thanks,