PDA

View Full Version : sendmail error



av1611
19th September 2008, 08:09 PM
yum install sendmail sendmail-cf

[root@host etc]# service sendmail start
Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 91: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 598: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
[FAILED]
**************************
:eek:

/etc/mail and /etc/mail/* are all created by the rpm...
huh?

thanks.

av1611
19th September 2008, 08:13 PM
[root@host mail]# ls -la
total 208
drwxr-xr-x 2 root root 4096 2008-09-19 12:06 .
drwxr-xr-x 137 root root 12288 2008-09-19 12:06 ..
-rw-r--r-- 1 root root 469 2008-03-29 05:27 access
-rw-r----- 1 root root 12288 2008-09-19 12:06 access.db
-rw-r--r-- 1 root root 233 2008-03-29 05:27 domaintable
-rw-r----- 1 root root 12288 2008-09-19 12:06 domaintable.db
-r--r--r-- 1 root root 5584 2008-03-29 05:27 helpfile
-rwx------ 1 root root 64 2008-03-29 05:27 local-host-names
-rw-r--r-- 1 root root 997 2008-03-29 05:27 mailertable
-rw-r----- 1 root root 12288 2008-09-19 12:06 mailertable.db
-rw-r--r-- 1 root root 1048 2008-03-29 05:27 Makefile
-rw-r--r-- 1 root root 58624 2008-03-29 05:27 sendmail.cf
-rw-r--r-- 1 root root 7205 2008-03-29 05:27 sendmail.mc
-r--r--r-- 1 root root 41706 2008-03-29 05:27 submit.cf
-rw-r--r-- 1 root root 941 2008-03-29 05:27 submit.mc
-rwx------ 1 root root 127 2008-03-29 05:27 trusted-users
-rw-r--r-- 1 root root 1847 2008-03-29 05:27 virtusertable
-rw-r----- 1 root root 12288 2008-09-19 12:06 virtusertable.db
[root@host mail]#


They are NOT world writeable!

gibz85
20th September 2008, 11:37 AM
Change the permission and see what happens ... Also see the lines in sendmail.cf and try to adjust it... don forget to use m4....

briantan
20th September 2008, 02:29 PM
The permission should be 644 for these 2 files.

av1611
20th September 2008, 05:26 PM
[root@host etc]# /etc/init.d/sendmail start
Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 91: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 598: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
[FAILED]
Starting sm-client: /etc/mail/submit.cf: line 554: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
[FAILED]
[root@host etc]# cd mail
[root@host mail]# ls
access helpfile Makefile submit.mc
access.db local-host-names sendmail.cf trusted-users
domaintable mailertable sendmail.mc virtusertable
domaintable.db mailertable.db submit.cf virtusertable.db
[root@host mail]# chmod 644 trusted-users
[root@host mail]# chmod 644 local-host-names
[root@host mail]# /etc/init.d/sendmail start
Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 91: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 598: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
[FAILED]
[root@host mail]#

av1611
20th September 2008, 05:59 PM
I guess I have to conclude there is a bug in sendmail or at least the way livna's version is made. The permissions are exactly as they should be according to the error message and what you folks here suggested I do. I only wanted to provide MTA for PHP... I am now using postfix which took me all of 3 minutes to get working.

If someone can explain why it doesn't work I'd sure love to know for my own education but as it stands it seems I have done everything exactly right.

I did notice that this last kernel update broke a LOT of junk. I had to compile nvidia because they got the dependencies goofed up on kmod-nvidia... the had the same problem 2 kernels ago too...

Oh well... I still think fedora rocks...

cheerio158
4th April 2009, 02:25 AM
Hello,

A recent update appears to have broken my sendmail. The permission on /etc/trusted-users look fine. Any ideas?


# service sendmail restart
Shutting down sm-client: [FAILED]
Shutting down sendmail: [FAILED]
Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 87: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 594: fileclass: cannot open '/etc/mail/trusted-users': World writable directory [FAILED]
Starting sm-client: /etc/mail/submit.cf: line 550: fileclass: cannot open '/etc/mail/trusted-users': World writable directory [FAILED]


# rpm -qa | grep sendmail
sendmail-8.14.3-3.fc10.x86_64

av1611
4th April 2009, 07:30 AM
I haven't seen this thread in a while but until someone proves me wrong by explaining the problem we both have, sendmail IS FRICKEN BROKE.

Just use postfix. It work perfectly and take about 3 minutes to get up and running.

cheerio158
4th April 2009, 05:31 PM
Postfix in less than 60 seconds, nice!

Thanks for the tip!


[[cheerio@cheerio01]$ su -l
Password:
[root@cheerio01 ~]# yum erase sendmail
...
[root@cheerio01 ~]# yum install postfix
...
[root@cheerio01 ~]# man postfix
...
[root@cheerio01 ~]# postfix status
postfix/postfix-script: the Postfix mail system is not running
[root@cheerio01 ~]# postfix check
[root@cheerio01 ~]# postfix start
postfix/postfix-script: starting the Postfix mail system
[root@cheerio01 ~]# mail cheerio@localhost
Subject: This is a postfix test
Hello!
EOT
[root@cheerio01 ~]# exit
logout
You have mail in /var/spool/mail/cheerio
[cheerio@cheerio01]$

av1611
4th April 2009, 05:52 PM
I REALLY wish someone would post a howto on how to get Sendmail working since sendmail changed the security requirements is their last major upgrade.

mattes1501
3rd March 2011, 08:52 PM
I encountered the same problem today. It actually started a couple of month ago, though I never noticed until today. Note No updates have been installed on this machine. So I am not sure
what caused it since it was working fine.

error on sendmail start:

/etc/mail/sendmail.cf: line 87: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
/etc/mail/sendmail.cf: line 596: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory

the directory /etc/mail is not group writable, but one of the parent folder was:

# ls -ld /
drwxrwxr-x. 25 root root 4096 2011-03-03 10:49 /
# ls -ld /etc
drwxr-xr-x. 139 root root 12288 2011-03-03 10:50 /etc
# ls -ld /etc/mail
drwxr-xr-x. 2 root root 4096 2011-03-03 11:37 /etc/mail

Changing the root folder itself

chmod 755 /

made the difference. Now sendmail starts up ok and works fine again
Looks like sendmail is testing every single parent folder of /etc/mail too.

Anyhow, hope this helps other to correct the problem

jpollard
3rd March 2011, 10:06 PM
Actually, it is the message that is inaccurate - it should say:

line 91: fileclass: cannot open '/etc/mail/local-host-names': World or group writable directory found in path.

where "World" is changed to "World or group", and extended by "found in path".

The error itself is reasonable, just the message is unclear.

ktmariappan
13th April 2012, 01:28 PM
Please do below steps
--------------------------
Replacing line Fw/etc/mail/ local-host-names with line Fw-o /etc/mail/local-host-names in sendmail.cf, and Ft/etc/mail/trusted-users with line Ft-o /etc/mail/trusted-users in submit.cf and sendmail.cf.