I am attempting to have a php page generate an email using it's mail() function. When I do this, I do not receive any php errors (meaning that the function executed and returned true), but the email is still not sent.
I'm guessing I have sendmail misconfigured somehow.
I don't know a ton about it so I'll give you the info I have and hope someone can point me in the right direction.
I checked to see if sendmail is running.
# ps -ef | grep exim produces
dpassud 2809 2668 0 21:04 pts/2 00:00:00 grep exim
When I kill it and restart using
# sendmail -bd -q20m
The following appears in the syslog
Quote:
Nov 30 20:53:01 stampy /USR/SBIN/CRON[2789]: (mail) CMD ( if [ -x /usr/sbin/exim -a -f /etc/exim/exim.conf ]; then /usr/sbin/exim -q ; fi)
When I looked at the /var/log/mail.log, it shows activity from today, but I can't figure out what I did to create the entries. At any rate it looks like this:
Quote:
Nov 30 15:13:36 stampy sendmail[2119]: My unqualified host name (stampy) unk
nown; sleeping for retry
Nov 30 15:14:36 stampy sendmail[2119]: unable to qualify my own domain name (b
allsack) -- using short name
Nov 30 15:14:36 stampy sendmail[2119]: iAUMEaQN002119: from=www-data, size=49,
class=0, nrcpts=1, msgid=<200411302214.iAUMEaQN002119@stampy>, relay=www-data
@localhost
Nov 30 15:14:36 stampy sm-mta[2122]: iAUMEajV002122: ruleset=check_mail, arg1=
<www-data@stampy>, relay=stampy [127.0.0.1], reject=553 5.1.8 <www-data@ball
sack>... Domain of sender address www-data@stampy does not exist
Nov 30 15:14:36 stampy sendmail[2119]: iAUMEaQN002119: to=dave@budonk.com, ctl
addr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30039,
relay=[127.0.0.1] [127.0.0.1], dsn=5.6.0, stat=Data format error
Nov 30 15:14:36 stampy sendmail[2119]: iAUMEaQN002119: iAUMEaQO002119: DSN: Da
ta format error
Nov 30 15:14:36 stampy sm-mta[2122]: iAUMEajV002122: from=<www-data@stampy>,
size=49, class=0, nrcpts=0, proto=ESMTP, daemon=MSA, relay=stampy [127.0.0.1]
Nov 30 15:14:37 stampy sm-mta[2122]: iAUMEajW002122: from=<>, size=1965, class
=0, nrcpts=1, msgid=<200411302214.iAUMEaQO002119@stampy>, proto=ESMTP, daemon=
MSA, relay=stampy [127.0.0.1]
Nov 30 15:14:37 stampy sendmail[2119]: iAUMEaQO002119: to=www-data, delay=00:0
0:01, xdelay=00:00:01, mailer=relay, pri=31073, relay=[127.0.0.1], dsn=2.0.0, st
at=Sent (iAUMEajW002122 Message accepted for delivery)
Nov 30 15:14:37 stampy sm-mta[2123]: iAUMEajW002122: to=dpassudetti, delay=00:
00:01, xdelay=00:00:00, mailer=local, pri=32146, dsn=2.0.0, stat=Sent
/var/log/exim/paniclog contains
Quote:
2004-11-30 21:17:37 socket bind() to port 25 for address (any IPv4) failed: Address already in use: daemon abandoned
when I execute my script, /var/log/exim/mainlog shows:
and just now, the same log spit out a bunch ofQuote:
2004-11-30 21:21:19 1CZLzT-0000kP-00 <= www-data@stampy U=wwwdata P=local S=3
98
2004-11-30 21:21:21 1CZLzT-0000kP-00 == dave@ample.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:21:29 1CZLzT-0000kP-00 ** dave@budonk.com R=lookuphost T=remote_sm
tp: SMTP error from remote mailer after MAIL FROM:<www-data@stampy> SIZE=1434:
host mailhost.budonk.com [216.219.254.203]: 553 5.1.8 <www-data@stampy>... Do
main of sender address www-data@stampy does not ist
2004-11-30 21:21:29 1CZLzd-0000kU-00 <= <> R=1CZLzT-0000kP-00 U=mail P=local S=1
356
2004-11-30 21:21:29 1CZLzT-0000kP-00 Error message sent to www-data@stampy
2004-11-30 21:21:30 1CZLzd-0000kU-00 => dpassudetti <www-data@stampy> D=localu
ser T=local_delivery
2004-11-30 21:21:30 1CZLzd-0000kU-00 Completed
Quote:
2004-11-30 21:23:01 Start queue run: pid=2889
2004-11-30 21:23:02 1CZLqb-0000jp-00 == dave@example.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:23:03 1CZLot-0000jf-00 == dave@example.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:23:04 1CZL6n-0000iA-00 == dave@example.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:23:05 1CZL6P-0000i0-00 == dave@example.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:23:06 1CZKeq-0000gn-00 == dave@example.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:23:07 1CZHqx-0000e8-00 == dave@example.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:23:08 1CZHt3-0000eF-00 == dave@example.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:23:09 1CZKkd-0000h5-00 == dave@example.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:23:10 1CZL7R-0000iL-00 == dave@example.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:23:11 1CZLvn-0000kD-00 == dave@example.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:23:12 1CZLzT-0000kP-00 == dave@example.com T=remote_smtp defer (-4
4): retry time not reached for any host
2004-11-30 21:23:12 End queue run: pid=2889
Found 1 more clue. This message sent to my user on the linux box.
Quote:
From MAILER-DAEMON Tue Nov 30 22:06:09 2004
Return-path: <>
Envelope-to: www-data@stampy
Received: from mail by stampy with local (Exim 3.35 #1 (Debian))
id 1CZMgr-0000n0-00
for <www-data@stampy>; Tue, 30 Nov 2004 22:06:09 -0700
X-Failed-Recipients: dave@budonk.com
From: Mail Delivery System <Mailer-Daemon@stampy>
To: www-data@stampy
Subject: Mail delivery failed: returning message to sender
Message-Id: <E1CZMgr-0000n0-00@stampy>
Date: Tue, 30 Nov 2004 22:06:09 -0700
This message was created automatically by mail delivery software (Exim).
A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
dave@budonk.com
SMTP error from remote mailer after MAIL FROM:<www-data@stampy> SIZE=1406:
host mailhost.budonk.com [216.219.254.203]: 553 5.1.8 <www-data@stampy>...
Domain of sender address www-data@stampy does not exist
------ This is a copy of the message, including all the headers. ------
Return-path: <www-data@stampy>
Received: from www-data by stampy with local (Exim 3.35 #1 (Debian))
id 1CZMgo-0000ms-00; Tue, 30 Nov 2004 22:06:06 -0700
To: dave@budonk.com
Subject: php mail
To: dave@budonk.com^M
From: jbiggs@budonk.com^M
Reply-To: jbiggs@budonk.com^M
Message-Id: <E1CZMgo-0000ms-00@stampy>
Sender: www-data <www-data@stampy>
Date: Tue, 30 Nov 2004 22:06:06 -0700
it worked man
All any of this means to me is that something isn't configured right. Any ideas as to what?
When I ran eximcinfig and sendmailconfig, I pretty much accepted all the defaults.
