Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
|
|
11-24-2003, 08:37 PM
|
#1
|
Member
Registered: Oct 2003
Location: UK
Distribution: RHEL4
Posts: 54
Rep:
|
SENDMAIL Configuration
Hi,
I am designing a web based solution to a problem. This requires me to send email to a user via PHP's mail() function. The only problem is that in order for me to use the mail function, I need to have sendmail running on my computer. I am using RedHat 9, and I have sendmail installed, but when I try to start the service, I get the following error:
Failed to start sendmail :
Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 90: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 567: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
/etc/mail/sendmail.cf: WARNING: dangerous write permissions
[FAILED]
Starting sm-client: /etc/mail/submit.cf: line 525: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
[FAILED]
I need to get sendmail configured, so I can start it as a service, and use PHP's mail() function.
Can anyone help me, please? I have searched everywhere for a solution.
Thank you in advance.
Matt
xianzai
|
|
|
11-25-2003, 06:51 PM
|
#2
|
Member
Registered: Nov 2003
Location: New Zealand
Distribution: Redhat 9 2.4.20-8 Athlon, Windows 2000 Professional, FreeBSD
Posts: 122
Rep:
|
ok dude here goes:
Sendmail is an smtp server... it is used for receiving and sending mail...
Now sendmail is by default setup to start automatically with the following settings:
Service is NOT receiving mail from the internet
Service is ONLY sending mail from the local machine
SMTP runs on port 25 by default, so you can access it by typing "telnet localhost 25" in console
(That was to help you understand what it is)
Now.... the problem you're having is with your recieved mail directory... mybe it doesn't exist?... anyways.. heres how mines setup...
/var/mail
owner = root (all permissions)
group = mail (all permissions)
other = all but write
* non recursive
/var/spool/mail
same as above
Your error message tells me that the permissions for your send mail directories are wrong, this can probably be fixed by simply uninstalling and installing sendmail from your redhat cds
I've just started using linux sendmail so I could be wrong
|
|
|
11-25-2003, 06:52 PM
|
#3
|
Member
Registered: Nov 2003
Location: New Zealand
Distribution: Redhat 9 2.4.20-8 Athlon, Windows 2000 Professional, FreeBSD
Posts: 122
Rep:
|
you didn't delete the 'mail' user group did you?
|
|
|
11-26-2003, 07:45 AM
|
#4
|
Member
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613
Rep:
|
instead of sendmail, I would advice to use postfix. it's a simple sendmail-compatible mail server, and much more secure. Sendmail uses one big monolithic approach to mail handing; which is a nightmare to secure.
the postfix configuration is also easier to understand.
|
|
|
08-02-2004, 08:28 AM
|
#5
|
LQ Newbie
Registered: Apr 2003
Distribution: Suse & Redhat
Posts: 7
Rep:
|
It appears that sendmail is complaining about permisions on /. Mine were set to drwxrwxrwx.
From / run ls -ld and they should be :
drwxr-xr-x 25 root root 1024 Jul 21 10:08 .
Once the permisions were set as drwxr-xr-x sendmail worked without any complaints.
Regards
Stan
|
|
|
08-02-2004, 08:30 AM
|
#6
|
Senior Member
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552
Rep:
|
Check the perms of /etc/mail.
|
|
|
08-02-2004, 08:34 AM
|
#7
|
LQ Newbie
Registered: Apr 2003
Distribution: Suse & Redhat
Posts: 7
Rep:
|
Hi Stickman.
I did check the perms of /etc/mail and it was the same as the other servers. The only difference I found was the perms on /, and when I changed that to the same perms as my other servers the problem went away.
Stan
|
|
|
08-02-2004, 09:40 AM
|
#8
|
Member
Registered: Jun 2002
Location: Franklin, IN
Distribution: Debian, CentOS, Mac OS X
Posts: 158
Rep:
|
Quote:
Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 90: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 567: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
/etc/mail/sendmail.cf: WARNING: dangerous write permissions
[FAILED]
Starting sm-client: /etc/mail/submit.cf: line 525: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
[FAILED]
|
okay..... from what i can tell, sendmail can't open these files. either they don't exist or they are world writable, which is a bad thing. first, run:
if that doesn't correct the problem, then you'll have to manually check the permissions of your files. what make -C /etc/mail does is it compiles all the files needed for sendmail to run, and auto-sets the permissions that it needs.
hope i could help!!!!!
|
|
|
08-02-2004, 09:42 AM
|
#9
|
Member
Registered: Jun 2002
Location: Franklin, IN
Distribution: Debian, CentOS, Mac OS X
Posts: 158
Rep:
|
also, check to make sure you have correct permissions on /etc/mail . or, if all else fail, do as stated above; reinstall sendmail.
|
|
|
All times are GMT -5. The time now is 07:09 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
|
|