Click to See Complete Forum and Search --> : sendmail produces 550 error when sending to Comcast.net


etrader_x11
03-23-2005, 08:26 AM
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 -----
<myemailaddress@comcast.net>
(reason: 550 [PERMFAIL] comcast.net requires valid sender domain)

----- Transcript of session follows -----
... while talking to gateway-r.comcast.net.:
>>> DATA
<<< 550 [PERMFAIL] comcast.net requires valid sender domain
550 5.1.1 <myemailaddress@comcast.net>... 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 root@localhost.localdomain. 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 apache@localhost.localdomain
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:

<?php

$to = 'myemailaddress@comcast.net';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@someknowndomain.com';

$formsent = mail($to, $subject, $message, $headers);
?>

-That's when I got the bad mail to apache@localhost.localdomain

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.
Thank you.
George.

etrader_x11
03-25-2005, 05:43 AM
For those who's interested, I was able to track a solution for this problem!

Go to http://mpickering.homeip.net/phpwiki/index.php/HomePage/2004-06-24
and you'll see how you can fix it. The secret was in adding the confDOMAIN_NAME variable to the mc file and then it worked just fine. I knew it wasn't the comcast!!! Well I feel much better after 2 days worth of research.
Thanks to everyone!

vicksslc
05-07-2005, 11:42 PM
I too got the same problem. Using PHP mail() function. I looked at your solution - and I'm not that advanced. I can pull my logs and stuff - but it looks like you're editing with shell? At any rate - if you could just guide me I'm sure I can configure my server.

I just need the basics on how to edit that file. The actual steps to get to the file and the edit it. I use WHM on my webserver and I'm sure I can shell in if I need to.

Here is my log:

375 root@localhost R=fail_remote_domains: unrouteable mail
domain "localhost"

8 myemailwashere@comcast.net R=lookuphost T=remote_smtp: SMTP
error from remote mailer after RCPT TO::
host gateway-r.comcast.net [204.127.198.26]: 550 [PERMFAIL]
comcast.net requires valid sender domain