LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   sendmail won't send locally! (https://www.linuxquestions.org/questions/linux-software-2/sendmail-wont-send-locally-169838/)

Red Squirrel 04-13-2004 10:07 PM

sendmail won't send locally!
 
I finally managed to get sendmail working externally so I can configure all my pop3 accounts in my mail client to use it, and it works but locally (serverwise) it does not work. If I try to send mail through the command line I get this:

The original message was received at Tue, 13 Apr 2004 22:57:11 -0400
from localhost.localdomain [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<validemail@host.com>
(reason: 550-Verification failed for <root@localhost.localdomain>)

----- Transcript of session follows -----
... while talking to iceteks.com.:
>>> DATA
<<< 550-Verification failed for <root@localhost.localdomain>
<<< 550-unrouteable mail domain "localhost.localdomain"
<<< 550 Sender verify failed
550 5.1.1 <validemail@host.com>... User unknown
<<< 503 valid RCPT command must precede DATA



How can I get it to work? I want to be able to use the php mail() function so I can make myself a php based newsletter management system.


Ok, I think I know what I need to do. I need to make it so sendmail does not make mail come from root@localhost.localdomain but rather from a valid email address, since the emails DO make it out of the server in the sense that the smtp server connects to the host I'm trying to send, but the host rejects localhost.localdomain as a from email, which makes sense. So any ways to make it default to something like my real email address or something?

AutOPSY 04-13-2004 11:01 PM

you could try aliasing your machine by putting an entry in /etc/hosts

like

your IP blahname.blahdomain.net blahname

your IP should be the machines IP not 127.0.0.1 .
you will have to restart before the machine accepts the new name.

Red Squirrel 04-13-2004 11:07 PM

Is there a way I can just alias the email nobody@localhost.localdomain and not the entire domain? I think some applications rely on localhost.localdomain as being the loopback, so it would cause problems if I aliased it. Thanks for the help anyway, though.

AutOPSY 04-13-2004 11:29 PM

the 127.0.0.1 is an alias already to localhost.localdomain

if you veiw your /etc/hosts file you will see what Im talking about.

I have done this aliasing of my IP with a hostname and nothing refuses to work.

localhosts.localdomain is still 127.0.0.1 is still loopback regardless.
127.0.0.1 localhost localhost.localdomain
68.124.99.123 yourcomputer yourcomputer.yourdomain.net

I never said change the 127.0.0.1 line did I?

Red Squirrel 04-14-2004 07:45 AM

sorry I miss read your post, I th ought you wanted me to alias localhost.localdomain to something other then root.

But if I make my own host, what will that do? the email will still be sent as root@localhost.localdomain, and that's what I need to change. What I need to do is make it come from a valid email by default if the from: field is not sent.

Red Squirrel 04-14-2004 04:45 PM

Been trying everything, no luck. Someone was telling me I need to run a DNS server to run an email server, is this the case? Thing is though, it's only locally that it does not work. I can send email to root@borg from my mail client and it get's there. Obviously this only works on my network but that's all I need. What's more important is being able to send outside, which I can do fine, but not on the server through php or even using sendmail in the console.

Edit: If I type in the cli
sendmail -f valid@email.com
(message)
.


It works, so all I need is to make sure the email comes from a valid host, and I'm set. So how would I manage to make php mail() do that? I can't seem to get it working that way, I checked in php.ini and there's a section for the from but it says win32 only, for linux it only has an option for sendmail path, which I put and is correct.

Thanks in advance!


All times are GMT -5. The time now is 02:48 PM.