LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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

Reply
 
Search this Thread
Old 11-24-2003, 08:37 PM   #1
xianzai
Member
 
Registered: Oct 2003
Location: UK
Distribution: RHEL4
Posts: 54

Rep: Reputation: 15
Question 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
 
Old 11-25-2003, 06:51 PM   #2
scorpatron
Member
 
Registered: Nov 2003
Location: New Zealand
Distribution: Redhat 9 2.4.20-8 Athlon, Windows 2000 Professional, FreeBSD
Posts: 122

Rep: Reputation: 15
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
 
Old 11-25-2003, 06:52 PM   #3
scorpatron
Member
 
Registered: Nov 2003
Location: New Zealand
Distribution: Redhat 9 2.4.20-8 Athlon, Windows 2000 Professional, FreeBSD
Posts: 122

Rep: Reputation: 15
you didn't delete the 'mail' user group did you?
 
Old 11-26-2003, 07:45 AM   #4
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
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.
 
Old 08-02-2004, 08:28 AM   #5
stanlo
LQ Newbie
 
Registered: Apr 2003
Distribution: Suse & Redhat
Posts: 7

Rep: Reputation: 0
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
 
Old 08-02-2004, 08:30 AM   #6
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Check the perms of /etc/mail.
 
Old 08-02-2004, 08:34 AM   #7
stanlo
LQ Newbie
 
Registered: Apr 2003
Distribution: Suse & Redhat
Posts: 7

Rep: Reputation: 0
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
 
Old 08-02-2004, 09:40 AM   #8
linuxlastslonge
Member
 
Registered: Jun 2002
Location: Franklin, IN
Distribution: Debian, CentOS, Mac OS X
Posts: 158

Rep: Reputation: 30
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:

Code:
make -C /etc/mail
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!!!!!




 
Old 08-02-2004, 09:42 AM   #9
linuxlastslonge
Member
 
Registered: Jun 2002
Location: Franklin, IN
Distribution: Debian, CentOS, Mac OS X
Posts: 158

Rep: Reputation: 30
also, check to make sure you have correct permissions on /etc/mail . or, if all else fail, do as stated above; reinstall sendmail.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail Configuration - I need Help ukjairaj Linux - Networking 5 06-23-2005 12:26 PM
SendMail Configuration ChaChi Linux - Newbie 6 06-10-2004 04:00 PM
Sendmail Configuration arshad Red Hat 3 12-14-2003 12:11 AM
Sendmail configuration lapthorn Linux - Newbie 2 12-09-2003 08:13 PM
Sendmail Configuration svsalian Linux - Software 7 08-29-2003 04:17 AM


All times are GMT -5. The time now is 08:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration