LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-23-2007, 03:31 AM   #1
walidaly
Member
 
Registered: Mar 2007
Posts: 64

Rep: Reputation: 15
sendmail PHP and spam problem


when using mail() on PHP it takes over 2 seconds to send one mail, is that because it waits for sendmail to deliver the mail or is it something wrong with config? I'm on a local home server so not very good connection.
Another problem is that most server identify my emails as spam, I configured sendmail as described on http://yolinux.com/TUTORIALS/LinuxTu...SENDMAILCONFIG
this is a sample of the connection
Code:
[root@server]#  mail -v myemail@hotmail.com
Subject: xxxxxxxx
xxxxxxxxxxxx
Cc: xxxxx
xxxxx,myemail@hotmail.com... Connecting to [127.0.0.1] via relay...
220 server.domain.com ESMTP Sendmail 8.13.1/8.13.1; Mon, 23 Apr 2007 09:49:42 +0200
>>> EHLO server.domain.com
250-server.domain.com Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<root@server.domain.com> SIZE=67 AUTH=root@server.domain.com
250 2.1.0 <root@server.domain.com>... Sender ok
>>> RCPT To:<xxxxx@server.domain.com>
>>> RCPT To:<myemail@hotmail.com>
>>> DATA
550 5.1.1 <xxxxx@server.domain.com>... User unknown
250 2.1.5 <myemail@hotmail.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 l3N7ng0F006322 Message accepted for delivery
myemail@hotmail.com... Sent (l3N7ng0F006322 Message accepted for delivery)
>>> RSET
250 2.0.0 Reset state
root... Using cached ESMTP connection to [127.0.0.1] via relay...
>>> MAIL From:<> SIZE=1091
250 2.1.0 <>... Sender ok
>>> RCPT To:<root@server.domain.com>
>>> DATA
250 2.1.5 <root@server.domain.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 l3N7ng0H006322 Message accepted for delivery
root... Sent (l3N7ng0H006322 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 server.domain.com closing connection
on hotmail I can't even see the message in the junk, I wonder if the localhost.localdomain in the headers is the reason!
this is the headers from yahoo, I sent the email by PHP
Code:
From admin@domain.com Mon Apr 23 01:25:07 2007
Return-Path: <www@domain.com>
Authentication-Results: mta556.mail.mud.yahoo.com  from=domain.co; domainkeys=neutral (no sig)
Received: from 123.12.1.132  (EHLO server.domain.com) (123.12.1.132)
  by mta556.mail.mud.yahoo.com with SMTP; Mon, 23 Apr 2007 01:25:19 -0700
Received: from server.domain.com (localhost.localdomain [127.0.0.1])
	by server.domain.com (8.13.1/8.13.1) with ESMTP id l3N8P8I8006570
	for <myemail@yahoo.com>; Mon, 23 Apr 2007 10:25:10 +0200
Received: (from www@localhost)
	by server.domain.com (8.13.1/8.13.1/Submit) id l3N8P7P5006569;
	Mon, 23 Apr 2007 10:25:07 +0200
Date: Mon, 23 Apr 2007 10:25:07 +0200
Message-Id: <200704230825.l3N8P7P5006569@server.domain.com>
To: myemail@yahoo.com
Subject: xxtesting....
From: admin@domain.com
Content-Length: 14
 
Old 04-23-2007, 03:51 AM   #2
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
I bet it's this:
Code:
Received: from 123.12.1.132  (EHLO server.domain.com) (123.12.1.132)
If you didn't edit that line, your server is giving a fictitious hostname in the HELO. Many (most?) MTAs are going to assume it is spamming.

If you did edit that line, then you will still want to make sure that the hostname given in the HELO resolves to your server's IP address, and also that the IP address has a reverse DNS record set up to point to the hostname given. If these do not match up, most of the major mail services will fail to deliver the messages.
 
Old 04-23-2007, 05:09 AM   #3
walidaly
Member
 
Registered: Mar 2007
Posts: 64

Original Poster
Rep: Reputation: 15
yes, sorry I didn't mention I changed my domain to "domain.com" and my real ip to "123.12.1.132"
well, the problem is that my ISP's technical support doesn't know what a PTR is! is there a work around to do with BIND on my server?
so yahoo and hotmail not accepting mail anymore without a real PTR record? coz google accepts my mail if the from field @myhosted domain on the server.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Mail() Problem w/ Sendmail jusme Linux - Software 6 08-18-2012 02:35 PM
problem with my sendmail and php nshoboul Linux - Networking 3 04-23-2007 02:25 AM
PHP + Sendmail problem ArthurDent Linux - Newbie 2 07-03-2006 02:17 PM
problem with sendmail and php nshoboul Linux - Software 0 12-19-2003 08:06 AM
sendmail - PHP problem munkus Linux - General 0 02-22-2003 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration