| | |
PHP mail() (Sendmail) Problem :(
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2006
Posts: 18
Reputation:
Solved Threads: 0
Hey, I've got a sendmail problem on a dedicated server, shall I post the configs or what do you suggest? Problem is, that all coming in via smtp is sent through fine, but messages I try to send via PHP mail() are not going through, error in root is "deferred: connection refused by [127.0.0.0]"
I guess I just have a block of wood in front of my head, can somebody help to remove it PLEASE!
I guess I just have a block of wood in front of my head, can somebody help to remove it PLEASE!
investing in old (aged) Value-Domains
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
•
•
Join Date: Nov 2006
Posts: 18
Reputation:
Solved Threads: 0
some more details, I really hope someone can help:
btw, telnet works:
and status of sendmail seems to be fine too:
one thing I found (I just used several test commands and this is one result - there is no 127.0.0.1 there, :
like said, SMTP & POP are wonderful working, just this PHP mail() isn't, always the same error
maybe this helps you locating the problem
thanks my friends!
PHP Syntax (Toggle Plain Text)
file "access" localhost.localdomain RELAY localhost RELAY 127.0.0.1 RELAY myPOPIP RELAY (dont want to write it here, there is my provider IP, POP is working as well as SMTP...)
btw, telnet works:
PHP Syntax (Toggle Plain Text)
telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 220 rummels.de ESMTP Sendmail 8.13.4/8.13.4/Debian-3sarge1; Fri, 22 Dec 2006 21:53:12 +0100; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1]
and status of sendmail seems to be fine too:
PHP Syntax (Toggle Plain Text)
# /etc/init.d/sendmail status MSP: is run via cron (20m) MTA: 8640 /usr/sbin/sendmail-mta -Am -L sm-mta -bd -q10m UID PID PPID C STIME TTY TIME CMD root 8640 1 0 22:32 ? 00:00:00 sendmail: MTA: accepting connections QUE: Same as MTA
one thing I found (I just used several test commands and this is one result - there is no 127.0.0.1 there, :
PHP Syntax (Toggle Plain Text)
# netstat -an|grep 25 tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN ....tcp 0 0 serverip:25 220.174.224.223:2246 VERBUNDEN etc.
like said, SMTP & POP are wonderful working, just this PHP mail() isn't, always the same error

maybe this helps you locating the problem
thanks my friends! investing in old (aged) Value-Domains
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
•
•
Join Date: Nov 2006
Posts: 18
Reputation:
Solved Threads: 0
is nobody able to help?
investing in old (aged) Value-Domains
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
•
•
Join Date: Nov 2006
Posts: 18
Reputation:
Solved Threads: 0
posted a mistake, sorry - error is " "deferred: connection refused by [127.0.0.1]", not 127.0.0.0 like posted (can't edit)
investing in old (aged) Value-Domains
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
•
•
Join Date: Nov 2006
Posts: 18
Reputation:
Solved Threads: 0
ok, did some more tests now as suggested by other people, maybe this helps:
so there is the error again, on the other side:
this last one reached the email address fine, so via telnet it's working, via smtp it's working, just via sendmail directly & php not, this is very strange to me
PHP Syntax (Toggle Plain Text)
# sendmail -v -d8 -d38 validemail@validdomain.com dsfsdfs . validemail@validdomain.com... Connecting to [127.0.0.1] port 587 via relay... validemail@validdomain.com... Deferred: Connection refused by [127.0.0.1]
so there is the error again, on the other side:
PHP Syntax (Toggle Plain Text)
# telnet 127.0.0.1 25 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 220 "myserver" ESMTP Sendmail 8.13.4/8.13.4/Debian-3sarge1; Sat, 23 Dec 2006 23:24:50 +0100; (No UCE/UBE) logging access from: localhost(OK)-localhost [127.0.0.1] helo test 250 "myserver" Hello localhost [127.0.0.1], pleased to meet you mail from: validemail@validdomain.com 250 2.1.0 validemail@validdomain.com... Sender ok rcpt to: anothervalidemail@differentvaliddomain.com 250 2.1.5 anothervalidemail@differentvaliddomain.com... Recipient ok data 354 Enter mail, end with "." on a line by itself test message . 250 2.0.0 kBNMOoZu004585 Message accepted for delivery quit 221 2.0.0 myserver closing connection Connection closed by foreign host.
this last one reached the email address fine, so via telnet it's working, via smtp it's working, just via sendmail directly & php not, this is very strange to me
investing in old (aged) Value-Domains
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
•
•
Join Date: Nov 2006
Posts: 18
Reputation:
Solved Threads: 0
I got no help from oyu here, but elsewhere, but probably you can help with the next problem that occured 
when I send out mail via php to my gmail account, it always goes into spam, because of some header problems I think, I included SPF also, which is recognized, but doesn't change the situation to the better (exactly same email delivered via smtp from the same server works out to "land" in the inbox, it's freakin....):
the email via smtp (the one landing in the inbox at gmail has the following headers instead:
like said, the subject + content of the mails is the same, just the headers coming from root@localhost (for the script?) seems the problem maybe, or what do you experienced users think? How can I change this problem to the better? A change in the php.ini or sendmail config? The way it is "working" at present is, that confirmation emails for comments etc. are going into spam of the commenting party and that's not good
Thanks again and in advance as well for your appreciated help!

when I send out mail via php to my gmail account, it always goes into spam, because of some header problems I think, I included SPF also, which is recognized, but doesn't change the situation to the better (exactly same email delivered via smtp from the same server works out to "land" in the inbox, it's freakin....):
PHP Syntax (Toggle Plain Text)
Delivered-To: my-address-at@gmail.com Received: by 10.82.153.10 with SMTP id a10cs185450bue; Sat, 6 Jan 2007 18:05:47 -0800 (PST) Received: by 10.67.29.12 with SMTP id g12mr14006613ugj.1168135547091; Sat, 06 Jan 2007 18:05:47 -0800 (PST) Return-Path: <sender@mydomain.com> Received: from mydomain.com (mydomain.com [MY-SERVERs-IP-HERE]) by mx.google.com with ESMTP id u6si37493585uge.2007.01.06.18.05.46; Sat, 06 Jan 2007 18:05:47 -0800 (PST) Received-SPF: pass (google.com: domain of sender@mydomain.com designates MY-SERVERs-IP-HERE as permitted sender) Received: from mydomain.com (localhost [127.0.0.1]) by mydomain.com (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id l07261DL004032 for <my-address-at@gmail.com>; Sun, 7 Jan 2007 03:06:02 +0100 Received: (from root@localhost) by mydomain.com (8.13.4/8.13.4/Submit) id l072613x004030; Sun, 7 Jan 2007 03:06:01 +0100 Date: Sun, 7 Jan 2007 03:06:01 +0100 Message-Id: <200701070206.l072613x004030@mydomain.com> To: my-address-at@gmail.com Subject: I got news for you Reply-To: sender@mydomain.com From: David <sender@mydomain.com>
the email via smtp (the one landing in the inbox at gmail has the following headers instead:
PHP Syntax (Toggle Plain Text)
Delivered-To: my-address-at@gmail.com Received: by 10.82.153.10 with SMTP id a10cs180353bue; Sat, 6 Jan 2007 15:02:32 -0800 (PST) Received: by 10.67.121.15 with SMTP id y15mr31671422ugm.1168124551891; Sat, 06 Jan 2007 15:02:31 -0800 (PST) Return-Path: <sender@mydomain.com> Received: from mydomain.com (mydomain.com [MY-SERVERs-IP-HERE]) by mx.google.com with ESMTP id 54si37319882ugp.2007.01.06.15.02.31; Sat, 06 Jan 2007 15:02:31 -0800 (PST) Received-SPF: pass (google.com: domain of sender@mydomain.com designates MY-SERVERs-IP-HERE as permitted sender) Received: from mylaptop ([MY-ADSL-IP-HERE]) by mydomain.com (8.13.4/8.13.4/Debian-3sarge1) with SMTP id l06N2iSv029170 for <my-address-at@gmail.com>; Sun, 7 Jan 2007 00:02:46 +0100 Message-ID: <000301c731e6$be0b28f0$0973a8c0@mylaptop> From: "my name" <sender@mydomain.com> To: <my-address-at@gmail.com>
like said, the subject + content of the mails is the same, just the headers coming from root@localhost (for the script?) seems the problem maybe, or what do you experienced users think? How can I change this problem to the better? A change in the php.ini or sendmail config? The way it is "working" at present is, that confirmation emails for comments etc. are going into spam of the commenting party and that's not good

Thanks again and in advance as well for your appreciated help!
investing in old (aged) Value-Domains
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
![]() |
Similar Threads
- PHP Mail Error (PHP)
- Problems with PHP mail function. (PHP)
- how do you setup php mail()? using sendmail and yellowdog linux w/apache and php4 (*nix Software)
- Sendmail problem (*nix Software)
Other Threads in the PHP Forum
- Previous Thread: Automated code checking tools
- Next Thread: Installation Guide Require
| Thread Tools | Search this Thread |
.htaccess alexa apache api array beginner beneath binary broadband broken cakephp checkbox class cms code convert cron curl database date display dynamic echo email emptydisplayvalue encode error fcc file files folder form forms function functions google howtowriteathesis href htaccess html image images include insert ip javascript joomla key keywords limit link login mail mail() memberships menu mlm multiple multipletables mysql mysql_real_escape_string network oop open passwords paypal pdf php provider query radio random redirect remote rss script search securephp server sessions smtp source space sql strip_tags syntax system table template tutorial update upload url user validator variable video voteup web youtube





