Hi,
I am running sendmail 8.14.2 under Slackware 12.1. I want to configure sendmail so that I can send email from PHP scripts using the mail() function. I want this to be a send email only configuration. I have modified the cf file to specify my ISP as the SMART_HOST. If I enter:
sendmail -bv
myname@mts.net
I get the following response:
myname@mts.net... deliverable: mailer relay, host smtp.mts.net, user
myname@mts.net
PHP is configured to use /usr/bin/sendmail -t -i
When I try to send email using the mail() function of PHP I get the following:
Jun 16 13:01:11 myhost sendmail[3675]: n5GI1B4L003675: to=myname@mts.net, ctladdr=apache (80/80), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30160, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Why is localhost [127.0.0.1] the relay? Why would it be refusing a connection when I'm trying to send email out from localhost?
Here is the content of my sendmail.mc file which I used to generate my sendmail.cf file:
dnl# This is the default sendmail .mc file for Slackware. To generate
dnl# the sendmail.cf file from this (perhaps after making some changes),
dnl# use the m4 files in /usr/share/sendmail/cf like this:
dnl#
dnl# cp sendmail-slackware.mc /usr/share/sendmail/cf/config.mc
dnl# cd /usr/share/sendmail/cf
dnl# sh Build config.cf
dnl#
dnl# You may then install the resulting .cf file:
dnl# cp config.cf /etc/mail/sendmail.cf
dnl#
include(`../m4/cf.m4')
VERSIONID(`default setup for Slackware Linux')dnl
OSTYPE(`linux')dnl
dnl# These settings help protect against people verifying email addresses
dnl# at your site in order to send you email that you probably don't want:
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
dnl# Uncomment the line below to send outgoing mail through an external server:
define(`SMART_HOST',`smtp.mts.net')dnl
dnl# No timeout for ident:
define(`confTO_IDENT', `0')dnl
dnl# Enable the line below to use smrsh to restrict what sendmail can run:
dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
dnl# See the README in /usr/share/sendmail/cf for a ton of information on
dnl# how these options work:
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`redirect')dnl
dnl# Turn this feature on if you don't always have DNS, or enjoy junk mail:
dnl FEATURE(`accept_unresolvable_domains')dnl
EXPOSED_USER(`root')dnl
dnl# Also accept mail for localhost.localdomain:
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
If it matters I do not have a local domain name. Could the problem be the last few lines in the above file? If so, what should they be?
What other info do I need to supply in order for you help?
Thanks,
Randy