Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-25-2005, 08:20 PM
|
#1
|
LQ Newbie
Registered: Apr 2004
Location: Los Angeles
Distribution: Fedora Core 4
Posts: 29
Rep:
|
sendmail
Hi,
I'm a linux newbie (a week old).
I installed Mandrake 10.1.
I selected the packages Apache httpd with php. More precisely, i think they call it ADVX.org on Mandrake.
The web server seems to work fine when I type localhost .
I also tested to write some simple php scripts, worked fine...
Then I tried my mail() function on php, but it didn't work.
After a little research, I found out that I needed "sendmail" on my system.
I used the Package Installer to find and install the package "sendmail".
It now appears on the list of services (on the Mandrake Control Center), but even though it is set to run "On boot", the status is always on "stopped".
When I try to manually click on the START button, the button itself stays down, as if I was still clicking on it, and nothing happens...
I keep clicking on OK, OK, OK... after a long while, it seems to work. The status is "running".
I set my php.ini line to state : sendmail_path = /usr/sbin/sendmail
I now go back on localhost, with my mail() function.
The loading seems to take forever. After a very long time, the mail() still fails.
Can someone help?
Thank You,
Nathan
|
|
|
01-26-2005, 11:11 AM
|
#2
|
Member
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371
Rep:
|
1) Can you telnet to port 25: "telnet localhost 25"?
2) If so, can you send email manually from the telnet prompt? (There's at least one thread in the forum describing how to do that, but if you can't find it let me know.)
3) Are you trying to email from your machine through your ISP out to the internet? If so, your ISP may be blocking port 25 from client computers - you may have to edit the sendmail configuration file to relay to your ISP's SMTP server..
I just went through this exact thing last weekend, but I finally was able to do it, so hang in there
|
|
|
01-26-2005, 07:20 PM
|
#3
|
LQ Newbie
Registered: Apr 2004
Location: Los Angeles
Distribution: Fedora Core 4
Posts: 29
Original Poster
Rep:
|
Hi,
As you sent me this answer, I decided to try again, and here is what happened this time:
I booted my computer, and went on the Mandrake control center> services.
Now, SENDMAIL was RUNNING, but HTTPD was NOT RUNNING. I don't get that...
So, I clicked START on httpd.
Then I tried again to load my php page with my mail() function.
It took forever to load, like maybe 2 or 3 minutes [edit: I just tested, more precisely exactly 61 seconds] , and then it actually SENT the email!
Some might say that my problem is solved, but... I don't think it's right that it takes so long, something must be wrong. And also it's not right that it doesn't always work.
Now about what you said.
I typed : telnet localhost 25
I recieved:
220 localhost ESMTP Sendmail 8.13.1/8.13.1; // and today's date
Now, you asked me to try to send an email via the telnet. So I looked up on the net, and found some command lines:
MAIL
> Polite people say helo first // LOL I liked that one.
HELO localhost
> blabla 127.0.0.1 please to meet you
MAIL FROM:nathan@nathanhazout.com
>...sender ok
RCPT TO:nathan.linux@gmail.com
> bla bla... recipient ok.
DATA
test
.
> blabla.... message accepted for delivery
and... I recieved the message!
I hope it's ok that I give all the details like that... i want to make sure i don't miss anything
So, analyze?
Thanks!
Last edited by nasht; 01-26-2005 at 07:59 PM.
|
|
|
01-26-2005, 08:01 PM
|
#4
|
Senior Member
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040
Rep:
|
I had a problem with sendmail taking close to three minutes to work, and solved it by changing my /etc/hosts file to read
127.0.0.1 localhost.localdomain.bodhisattva localhost
(The name I gave my machine is "bodhisattva.")
That provides a phony, but workable, "fully qualified domain name" for my machine, and after that sendmail loaded and worked instantly.
If you're running some kind of network you might have to do it a bit differently, but that's quite likely where the problem with the delay lies.
|
|
|
01-26-2005, 08:37 PM
|
#5
|
LQ Newbie
Registered: Apr 2004
Location: Los Angeles
Distribution: Fedora Core 4
Posts: 29
Original Poster
Rep:
|
wow kind of cool advice, thanks
Now the time to run my mail() is down to within 1 to 6 seconds. Do you think it's enough?
When you said (The name I gave my machine is "bodhisattva."), does that mean I can write anything here, or do I have to look somewhere in my system for the name of my machine?
well, I was about to ask "what about this httpd that doesn't start at boot?"
But right now I booted twice and it worked fine...
I don't really know what's going on anymore
|
|
|
01-26-2005, 09:10 PM
|
#6
|
Senior Member
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040
Rep:
|
You can name your machine just like a child, anything within reason.
I don't even know what httpd is, so glad it works OK after all.
You're not the only one that doesn't know what's going on, if it's any comfort.
Glad your mail's speedy now!
|
|
|
01-26-2005, 09:22 PM
|
#7
|
Senior Member
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040
Rep:
|
Another thing, if you want the name change to be permanent, go into
/etc/rc.d/rc.sysinit
(as root) and go down to the line that says HOSTNAME=[probably localhost]
and insert the name you chose after the equals sign in place of the name that's there.
Those two files should be all you have to change.
|
|
|
01-27-2005, 12:21 AM
|
#8
|
Member
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110
Rep:
|
Quote:
Originally posted by jonr
Another thing, if you want the name change to be permanent, go into
/etc/rc.d/rc.sysinit
(as root) and go down to the line that says HOSTNAME=[probably localhost]
and insert the name you chose after the equals sign in place of the name that's there.
Those two files should be all you have to change.
|
What two files? One is /etc/rc.d/rc.sysinit and what is another?
For changing my hostname I added HOSTNAME=host.domain.ru to file /etc/sysconfig/network
It works.
|
|
|
01-27-2005, 12:08 PM
|
#9
|
Senior Member
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040
Rep:
|
Quote:
Originally posted by RomanG
What two files? One is /etc/rc.d/rc.sysinit and what is another?
|
The other file is /etc/hosts referred to earlier in the thread.
|
|
|
01-27-2005, 12:46 PM
|
#10
|
Member
Registered: Jan 2005
Location: Russia, Kazan
Distribution: Mandrake 10.2, RedHat sometimes..
Posts: 110
Rep:
|
Quote:
Originally posted by jonr
The other file is /etc/hosts referred to earlier in the thread.
|
I don't have this file (link) by default in my Mandrake 10.1.
What solution is more correctly? With '/etc/rc.d/rc.sysinit' and '/etc/hosts'
or '/etc/sysconfig/network' ?
|
|
|
01-27-2005, 12:58 PM
|
#11
|
Senior Member
Registered: Jan 2003
Location: Kansas City, Missouri, USA
Distribution: Ubuntu
Posts: 1,040
Rep:
|
The solution that works for me with Mandrake 9.2 and now Mandrake 10.1 is to set the name I want in /etc/hosts and /etc/rc.d/rc.sysinit in the way I described in the thread...
I only run a single machine; if a network is involved, the solution may have to be different. But this works for a single machine.
Sendmail wants to see a "fully qualified domain name" and becomes confused when it doesn't. Setting up /etc/hosts as described above provides a name that appears to sendmail to be what it wants. Then it works rapidly.
|
|
|
01-27-2005, 02:53 PM
|
#12
|
Member
Registered: Dec 2004
Location: thailand
Distribution: suse9.3, Mandrake10.1
Posts: 381
Rep:
|
Mandrake comes with postfix and not sendmail. It is already configured for you if you had included it in your install.
I use Postfix on 10.0 and 10.1 and is easier than sendmail to set up maybe you are having a conflict.
You should load webmin from the rpm packages and run that to set up postfix. If you want to change to to sendmail webmin
will configure that to. Mandrake must have had a reason to change to Postfix from the tradional Redhat offering of Sendmail,
still with Fedora 3 I notice. Maybe, someone can enlighten me?
|
|
|
All times are GMT -5. The time now is 02:07 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|