Avatar of eggster34
eggster34 asked on

RHEL 5 sendmail problems

Hi, I'm having this very strange issue today, where I get errors trying to start sendmail:

[root@eggster mail]# service sendmail restart
Shutting down sm-client: [  OK  ]
Shutting down sendmail: [FAILED]
Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 91: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 588: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory
[FAILED]
Starting sm-client: [  OK  ]

my permissions on these directories are as below, so I don't see any of the mentioned files being group writable??

[root@eggster mail]# ls -l
total 268
-rw-r--r-- 1 root root   355 Jan 22  2010 access
-rw-r--r-- 1 root root 12288 Apr 23  2010 access.db
-rw-r--r-- 1 root root     0 Jan 22  2010 domaintable
-rw-r--r-- 1 root root 12288 Apr 23  2010 domaintable.db
-rw-r--r-- 1 root root  5521 Jan 22  2010 helpfile
-rw-r--r-- 1 root root    64 Jan 22  2010 local-host-names
-rw-r--r-- 1 root root     0 Jan 22  2010 mailertable
-rw-r--r-- 1 root root 12288 Apr 23  2010 mailertable.db
-rw-r--r-- 1 root root  1048 Jan 22  2010 Makefile
-rw-r--r-- 1 root root 58275 Nov 30 18:46 sendmail.cf
-rw-r--r-- 1 root root 58325 Nov 30 17:45 sendmail.cf.bak
-rw-r--r-- 1 root root  7205 Nov 30 17:46 sendmail.mc
drwxr-xr-x 2 root root  4096 Jan 23  2009 spamassassin
-rw-r--r-- 1 root root 41382 Nov 30 17:13 submit.cf
-rw-r--r-- 1 root root   940 Jan 22  2010 submit.mc
-rw-r--r-- 1 root root   127 Jan 22  2010 trusted-users
-rw-r--r-- 1 root root     0 Jan 22  2010 virtusertable
-rw-r--r-- 1 root root 12288 Apr 23  2010 virtusertable.db
[root@eggster mail]#
Linux

Avatar of undefined
Last Comment
eggster34

8/22/2022 - Mon
larsrohr

It's the directory itself; check it out:
ls -ld /etc/mail

If the directory is group-writable, then the contents of that directory can be messed with, so sendmail doesn't trust them.

Just do:  chmod 755 /etc/mail
and then sendmail should be happy with the permissions.
ASKER
eggster34

I already did that prior to openimg the ticket. the directory is not group writable :(
larsrohr

Then you should also check up the tree:
ls -ld /
ls -ld /etc

Those also should be 755.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
legolasthehansy

edit manually file sendmail.cf

nano -w /etc/mail/sendmail.cf

replace line Fw/etc/mail/local-host-names with line
Fw-o /etc/mail/local-host-names
identically (if you got the same error for trusted-users)

Ft/etc/mail/trusted-users
with line Ft-o /etc/mail/trusted-users
i spent 4 hours to see that. if you rebuild sendmail.cf from sendmail.mc you can modify the last file (sendmail.mc) to suit your needs


Courtesy - http://www.oreillynet.com/cs/user/view/cs_msg/10340
arnold

run:
getfacl /etc/mail

Would you post the output of the various commands people asked earlier and here?
tail /var/log/maillog
ASKER
eggster34

legolasthehansy: I already tried that: it works for a while, then the next time I restart sendmail the config appsrently changes and I get the same messages again :(
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
eggster34

[root@eggster ~]# getfacl /etc/mail
getfacl: Removing leading '/' from absolute path names
# file: etc/mail
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

----

tail /var/log/maillog

Nov 30 19:03:50 eggster sendmail[24617]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 91: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
Nov 30 19:03:50 eggster sendmail[24617]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 588: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory
Nov 30 19:03:50 eggster sm-msp-queue[24624]: starting daemon (8.13.8): queueing@01:00:00
Dec  1 00:48:10 eggster sendmail[28761]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 91: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
Dec  1 00:48:10 eggster sendmail[28761]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 588: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory
Dec  1 00:48:10 eggster sendmail[28765]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 91: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
Dec  1 00:48:10 eggster sendmail[28765]: NOQUEUE: SYSERR(root): /etc/mail/sendmail.cf: line 588: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory

----
[root@eggster ~]# ls -ld /etc/mail
drwxr-xr-x 3 root root 4096 Nov 30 18:46 /etc/mail
[root@eggster ~]# ls -ld /
drwxrwxr-x 24 root root 4096 Nov 10 17:37 /
[root@eggster ~]# ls -ld /etc
drwxr-xr-x 105 root root 12288 Dec  1 00:32 /etc

----

not sure what I should be doing?
 
ASKER CERTIFIED SOLUTION
larsrohr

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
eggster34

aha, that worked :)))