sendmail produces 550 error when sending to Comcast.net
Hi everyone! I am not a Linux Pro, but I have some basic knowledge to get my way around it. I've spent all day trying to configure my Fedora 3 box to send/receive emails using sendmail. And everything seems to work with an exception when I try to send e-mail to my primary mailbox at comcast.net. I keep constantly getting error message from comcast SMTP:
550 [PERMFAIL] comcast.net requires valid sender domain
I also tried to configure KMail and it gave me the following result;
The original message was received at Wed, 23 Mar 2005 02:00:04 GMT
from localhost.localdomain [127.0.0.1]
----- The following addresses had permanent fatal errors -----
(reason: 550 [PERMFAIL] comcast.net requires valid sender domain)
----- Transcript of session follows -----
... while talking to gateway-r.comcast.net.:
<<< 550 [PERMFAIL] comcast.net requires valid sender domain
550 5.1.1 <firstname.lastname@example.org>... User unknown
<<< 503 need RCPT command [data]
Apparently the problem is in me trying to send the e-mail from localhost.localdomain wich is not known to comcasst DNS.
When I try to TELNET smtp.comcast.net on port 25 everything goes well and I am able to send an e-mail, but for some reason sendmail just hangs up doing it. I tried to reconfigure sendmail.mc and rebuild sendmail.cf with multiple other options in order to find out where the missing domain name is comming from, but everything was useless. I even reconfigured my Firewall for ports 20, 21 and 25 and disabled SELinux, but again results were the same. I saw lots of people on the web had the same problem with comcast.net using sendmail, but none of them was successfull in explaining if they could fix the problem and more importantly - how. I googled around for hours trying to find the answer, but again no luck there.
The problem is that if I send an e-mail using KMail, it doesn't let me specify the reply e-mail, and it defaults to the current user on the machine, such as email@example.com. But also when I tried to send a mail using php mail() function, where I can specify a From: header it still gives me the same error() and returns the bad mail to firstname.lastname@example.org
I can send e-mail to ...@comcast.net using Mozilla mail where I can specify who to send e-mail from and then it sends just fine.
But how can I perform mail() function in PHP? I tried:
$to = 'email@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: firstname.lastname@example.org';
$formsent = mail($to, $subject, $message, $headers);
-That's when I got the bad mail to email@example.com
Once again. I am able to send e-mails using sendmail, but I can't seem to be able to send em to Comcast.Net due to invalid "FROM:" return address specification. So the question boils down to "How do I specify my return address?" for programs like KMail, or for sending e-mail using Apache?
If you have any idea of how to change it please type me a reply and I'll appreciate it very much.