/etc/mail/submit.cf: line 544: fileclass: cannot open '/etc/mail/trusted-users': Group writable directorySendmail is default mail server for CentOS.
To test sendmail from ssh, use this:
echo "test" | mail -s testsubject abc@xyz.com
(replace abc@xyz.com with your email address, like hotmail or gmail etc.)
On doing this I was getting the above mentioned error.
Some forums said that the issue is because of permission problems. So run following command:
chmod -R 0755 /etc/mail
It will set 755 rights to all files in this folder.
It works in some cases but in my case it wasn't.
The solution for this is to edit the respective file, like /etc/mail/submit.cf
You can use vi to edit this.
Jump to line number mentioned in error. 544 in our case.
(Note: To see line numbers in vi, press Ctrl+G to get the line number of your cursor)This is the line:
Ft/etc/mail/trusted-usersNow just change it to:
Ft-o /etc/mail/trusted-users
Done. Now try send the mail and it will work.
In some case the error line number and file changes, like e.g.
/etc/mail/sendmail.cf : line 91 : fileclass : Cannot open '/etc/mail/local-host-names' : World writable directory
Or
/etc/mail/sendmail.cf: line 588: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
Etc etc..
Same procedure will be applied to this. Go to respective file and respective line number.
And you will find either Ft or Fw in start
Just add -o after Ft or Fw like Ft-o /etc.... and Fw-o /etc...
This should solve the issue...
This fixed the problem, thanks!
ReplyDeletechmod -R 0755 /var/mail - one more reason of this error - is group writeable permission on mail folder
ReplyDelete