Link to home
Start Free TrialLog in
Avatar of TECHMAN10
TECHMAN10

asked on

error starting sendmail

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.
Avatar of heskyttberg
heskyttberg

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

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.  
ASKER CERTIFIED SOLUTION
Avatar of heskyttberg
heskyttberg

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
chomd -R 644 /etc/mail
chown -R root:root /etc/mail

thats all
chmod -R 644 /etc/mail

And then
chmod 755 /etc/mail
Avatar of TECHMAN10

ASKER

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.
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
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.
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