?
Solved

error starting sendmail

Posted on 2003-02-26
10
Medium Priority
?
257 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: 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!

 
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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month8 days, 12 hours left to enroll

764 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