PHP mail() (Sendmail) Problem :(

Reply

Join Date: Nov 2006
Posts: 18
Reputation: sellingonline is an unknown quantity at this point 
Solved Threads: 0
sellingonline sellingonline is offline Offline
Newbie Poster

PHP mail() (Sendmail) Problem :(

 
0
  #1
Dec 22nd, 2006
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!
investing in old (aged) Value-Domains
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 18
Reputation: sellingonline is an unknown quantity at this point 
Solved Threads: 0
sellingonline sellingonline is offline Offline
Newbie Poster

Re: PHP mail() (Sendmail) Problem :(

 
0
  #2
Dec 22nd, 2006
some more details, I really hope someone can help:

  1. file "access"
  2.  
  3. localhost.localdomain RELAY
  4. localhost RELAY
  5. 127.0.0.1 RELAY
  6. myPOPIP RELAY (dont want to write it here, there is my provider IP, POP is working as well as SMTP...)

btw, telnet works:

  1. telnet 127.0.0.1 25
  2. Trying 127.0.0.1...
  3. Connected to 127.0.0.1.
  4. Escape character is '^]'.
  5. 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:

  1. # /etc/init.d/sendmail status
  2. MSP: is run via cron (20m)
  3. MTA: 8640 /usr/sbin/sendmail-mta -Am -L sm-mta -bd -q10m
  4. UID PID PPID C STIME TTY TIME CMD
  5. root 8640 1 0 22:32 ? 00:00:00 sendmail: MTA: accepting connections
  6. 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, :

  1. # netstat -an|grep 25
  2. tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
  3. ....tcp 0 0 serverip:25 220.174.224.223:2246 VERBUNDEN
  4.  
  5. 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
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 18
Reputation: sellingonline is an unknown quantity at this point 
Solved Threads: 0
sellingonline sellingonline is offline Offline
Newbie Poster

Re: PHP mail() (Sendmail) Problem :(

 
0
  #3
Dec 23rd, 2006
is nobody able to help?
investing in old (aged) Value-Domains
--- (buy aged domainnames & list your own aged domains)
ICQ 417649206
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 18
Reputation: sellingonline is an unknown quantity at this point 
Solved Threads: 0
sellingonline sellingonline is offline Offline
Newbie Poster

Re: PHP mail() (Sendmail) Problem :(

 
0
  #4
Dec 23rd, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 18
Reputation: sellingonline is an unknown quantity at this point 
Solved Threads: 0
sellingonline sellingonline is offline Offline
Newbie Poster

Re: PHP mail() (Sendmail) Problem :(

 
0
  #5
Dec 23rd, 2006
ok, did some more tests now as suggested by other people, maybe this helps:

  1. # sendmail -v -d8 -d38 validemail@validdomain.com
  2. dsfsdfs
  3. .
  4. validemail@validdomain.com... Connecting to [127.0.0.1] port 587 via relay...
  5. validemail@validdomain.com... Deferred: Connection refused by [127.0.0.1]

so there is the error again, on the other side:

  1. # telnet 127.0.0.1 25
  2. Trying 127.0.0.1...
  3. Connected to 127.0.0.1.
  4. Escape character is '^]'.
  5. 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]
  6. helo test
  7. 250 "myserver" Hello localhost [127.0.0.1], pleased to meet you
  8. mail from: validemail@validdomain.com
  9. 250 2.1.0 validemail@validdomain.com... Sender ok
  10. rcpt to: anothervalidemail@differentvaliddomain.com
  11. 250 2.1.5 anothervalidemail@differentvaliddomain.com... Recipient ok
  12. data
  13. 354 Enter mail, end with "." on a line by itself
  14. test message
  15. .
  16. 250 2.0.0 kBNMOoZu004585 Message accepted for delivery
  17. quit
  18. 221 2.0.0 myserver closing connection
  19. 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
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 18
Reputation: sellingonline is an unknown quantity at this point 
Solved Threads: 0
sellingonline sellingonline is offline Offline
Newbie Poster

Re: PHP mail() (Sendmail) Problem :(

 
0
  #6
Jan 8th, 2007
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....):


  1. Delivered-To: my-address-at@gmail.com
  2. Received: by 10.82.153.10 with SMTP id a10cs185450bue;
  3. Sat, 6 Jan 2007 18:05:47 -0800 (PST)
  4. Received: by 10.67.29.12 with SMTP id g12mr14006613ugj.1168135547091;
  5. Sat, 06 Jan 2007 18:05:47 -0800 (PST)
  6. Return-Path: <sender@mydomain.com>
  7. Received: from mydomain.com (mydomain.com [MY-SERVERs-IP-HERE])
  8. by mx.google.com with ESMTP id u6si37493585uge.2007.01.06.18.05.46;
  9. Sat, 06 Jan 2007 18:05:47 -0800 (PST)
  10. Received-SPF: pass (google.com: domain of sender@mydomain.com designates MY-SERVERs-IP-HERE as permitted sender)
  11. Received: from mydomain.com (localhost [127.0.0.1])
  12. by mydomain.com (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id l07261DL004032
  13. for <my-address-at@gmail.com>; Sun, 7 Jan 2007 03:06:02 +0100
  14. Received: (from root@localhost)
  15. by mydomain.com (8.13.4/8.13.4/Submit) id l072613x004030;
  16. Sun, 7 Jan 2007 03:06:01 +0100
  17. Date: Sun, 7 Jan 2007 03:06:01 +0100
  18. Message-Id: <200701070206.l072613x004030@mydomain.com>
  19. To: my-address-at@gmail.com
  20. Subject: I got news for you
  21. Reply-To: sender@mydomain.com
  22. From: David <sender@mydomain.com>

the email via smtp (the one landing in the inbox at gmail has the following headers instead:

  1. Delivered-To: my-address-at@gmail.com
  2. Received: by 10.82.153.10 with SMTP id a10cs180353bue;
  3. Sat, 6 Jan 2007 15:02:32 -0800 (PST)
  4. Received: by 10.67.121.15 with SMTP id y15mr31671422ugm.1168124551891;
  5. Sat, 06 Jan 2007 15:02:31 -0800 (PST)
  6. Return-Path: <sender@mydomain.com>
  7. Received: from mydomain.com (mydomain.com [MY-SERVERs-IP-HERE])
  8. by mx.google.com with ESMTP id 54si37319882ugp.2007.01.06.15.02.31;
  9. Sat, 06 Jan 2007 15:02:31 -0800 (PST)
  10. Received-SPF: pass (google.com: domain of sender@mydomain.com designates MY-SERVERs-IP-HERE as permitted sender)
  11. Received: from mylaptop ([MY-ADSL-IP-HERE])
  12. by mydomain.com (8.13.4/8.13.4/Debian-3sarge1) with SMTP id l06N2iSv029170
  13. for <my-address-at@gmail.com>; Sun, 7 Jan 2007 00:02:46 +0100
  14. Message-ID: <000301c731e6$be0b28f0$0973a8c0@mylaptop>
  15. From: "my name" <sender@mydomain.com>
  16. 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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC