Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

error starting sendmail

Posted on 2003-02-26
10
Medium Priority
?
258 Views
Last Modified: 2013-12-16
i user linux v7.3.
at boot and at start,stop, reload sendmail, get the following error message
Starting sendmail:451 4.0.0 /etc/sendmail.cf: line 88: fileclass: cannot open '/etc/mail/local-host-names':
and
/etc/sendmail.cf: line 513: fileclass: cannot open '/etc/mail/trusted-users':

both these files exists with 777 privilages.

any help is greatly appreiated.
0
Comment
Question by:TECHMAN10
  • 3
  • 3
  • 2
  • +1
10 Comments
 
LVL 8

Expert Comment

by:heskyttberg
ID: 8029318
Hi!

Make sure dir permission is set to 755 on /etc and /etc/mail.

You only need 666 on the files local-host-names and trusted-users.

Or better yet 660, and do chgrp mail on them.

I think sendmails group is mail, but not sure, try with 666 first.

Regards
/Hans - Erik Skyttberg

0
 
LVL 1

Expert Comment

by:Jaem
ID: 8043391
Generally, sendmail refuses to touch a group/world writable file, for security reasons. It can be turned off with confDONT_BLAME_SENDMAIL option. So 777 is pretty bad, and 666 isn't much better (executable flag turned off). 644 or 640 would be much better (660 is so-so). Anyway sendmail needs just to read the files. So 640 if group mail owns the conf files, 644 else.

Making trusted-users and local-host-names world writable is a very bad idea, since any user would be able to forge emails.  
0
 
LVL 8

Accepted Solution

by:
heskyttberg earned 300 total points
ID: 8043524
Hi!

Jaem, I didn't know sendmail refused group/world writeable files.

I Was tired when I wrote 660 and 666, I do agree it should be 640 or 644, we all make misstakes, :)

If you plan on running mail for a domain I would suggest you consider replacing sendmail for qmail.

Regards
/Hans - Erik Skyttberg
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Expert Comment

by:Jaem
ID: 8051324
Sendmail, for most configuration files, will refuse to read group or world writable files, as well as files in group or world writable directories. The doc is not very clear about which files (.forward is sure), but I would expect trusted-users and local-host-names to fall into that category. Anyway that would be a security problem.

So I would try perm 644 for the config files, and 755 for /etc/mail (like Hans-Erik wrote before).

Note: 640 and 750 is tighter, but you need the right group ownership. I don't know if that would be worth it.
0
 
LVL 5

Expert Comment

by:arvind
ID: 8075009
chomd -R 644 /etc/mail
chown -R root:root /etc/mail

thats all
0
 
LVL 1

Expert Comment

by:Jaem
ID: 8082098
chmod -R 644 /etc/mail

And then
chmod 755 /etc/mail
0
 

Author Comment

by:TECHMAN10
ID: 8101855
Guys,

Thanks for your suggestions, but after changing the file permissions, still having the same error message. ie unable to stop, start or restart sendmail.

Any other ideas?.

Regards.
0
 
LVL 5

Expert Comment

by:arvind
ID: 8102509
do u have following files on /etc/mail
local-host-names
trusted-users

If not just do the following

cd /etc/mail
touch local-host-names
touch trusted-users
0
 

Author Comment

by:TECHMAN10
ID: 8110115
Hi Guys,

I discovered the problem to be the root directory privilage with world writable. Once I changed the privilages sendmail is working fine.

Thanks for your comments.

Regards.
0
 

Author Comment

by:TECHMAN10
ID: 8110128
As I mentioned the problem area was the root dir. Once I changed the privilages of root dir, sendmail is working fine.

Thanks for pointing me to the right direction about the privilages.

Regards,

Techman10
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month11 days, 10 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question