Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

[root@linux ~]# sendmail -v user@yahoo.com /etc/mail/submit.cf: line 545: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory

Can anyone tell why as a root I cant sent a mail , while if I change user to some particular other user it works .

Whats happening can anyone tell me ?

service sendmail restart gives the following :

Shutting down sm-client: [FAILED] 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: /etc/mail/submit.cf: line 545: fileclass: cannot open '/etc/mail/trusted-users': Group writable directory [FAILED]

Thanks all , found the solution . I solved it using

This will set the permissions for every directory sendmail needs to be non-group writable: sudo chmod go-w / /etc /etc/mail /usr /var /var/spool /var/spool/mqueue /private

share|improve this question
1  
Besides fixing the warning you have in your question ("group writable directory"), you should post your MTA configuration. Sometimes root is not allowed to send mails by configuration (and by intent). –  joschi Dec 17 '09 at 12:22
    
what is MTA configuration ? and we have configured mail as root before in the same machine when we installed the same OS everything same before . I would like to know what the warning means . –  Nishant Dec 17 '09 at 12:24
add comment

1 Answer

To remove (that) warning:

chmod g-w /etc/mail/trusted-users

However given that wasn't obvious to you from the error message I'd strongly suggest not using sendmail, and instead use postfix or one fo the other new, easier to manage MTA's.

share|improve this answer
    
this same permission for directory and files in /etc/mail exist in another server which works fine . it works from there . –  Nishant Dec 17 '09 at 13:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.