LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   cannot send email (https://www.linuxquestions.org/questions/linux-server-73/cannot-send-email-926755/)

DanStrong 01-31-2012 01:27 PM

cannot send email
 
Hi friends,
My CentOS server cannot send email since I got this message in /var/log/maillog:
localhost sendmail[9135]: NOQUEUE: SYSERR(root): /etc/mail/submit.cf: line 544: fileclass: cannot open '/etc/mail/trusted-user' : World writable directory

I check the permission for all files in the mail folder, it shows:
-r-xr-xr-x 1 root root
Could you please help!
Thanks

T3RM1NVT0R 01-31-2012 01:50 PM

@ Reply
 
Hi DanStrong,

Could you please let us know the permissions that are set on /etc/mail? Files under /etc/mail/ should have rw-r--r-- permissions set instead of -r-xr-xr-x

bathory 01-31-2012 02:00 PM

Quote:

localhost sendmail[9135]: NOQUEUE: SYSERR(root): /etc/mail/submit.cf: line 544: fileclass: cannot open '/etc/mail/trusted-user' : World writable directory
Sendmail refuses to start if it finds a group/world writable directory in the directory tree /etc/mail. So run
Code:

ls -ld / /etc /etc/mail
and make sure all 3 directories above have the 755 permissions
Also as T3RM1NVT0R already mentioned, the files under /etc/mail must be 644 and owned by root

HTH

DanStrong 01-31-2012 02:41 PM

Thanks you very much for your quick help,
I run command ls -ld / /etc /etc/mail , and set all files under /etc/mail with permission: rwxr-xr-x, which is 755 permission.
but it still doesn't work.
Thanks

DanStrong 01-31-2012 02:48 PM

Hi bathory,
I am very new to Linux. I don't understand the command ls -ld / /etc /etc/mail , and also you said: "make sure all 3 directories have the 755 permissions", then "the files under /etc/mail must be 644 permission and owned by root".
I got confused.
Thanks

repo 01-31-2012 02:50 PM

try this:
http://hjzhao.blogspot.com/2010/09/c...ost-names.html
Are you using the latest version of sendmail?

Kind regards

DanStrong 01-31-2012 02:52 PM

and also, when I run the command ls -ld / /etc/ /etc/mail, it shows:
drwxr-xr-x 24 root root 4096 Jan 31 11:31 /
drwxr-xr-x 85 root root 12288 Jan 31 12:37 /etc/
drwxr-xr-x 2 root root 4096 Jun 8 2011 /etc/mail
Thanks

T3RM1NVT0R 01-31-2012 02:56 PM

@ Reply
 
Have a look at the following link: http://www.linuxsolved.com/forums/in...p?topic=3447.0

bathory was trying to say that / directory /etc directory and /etc/mail directory should be owned by root and should have 755 permissions that is drwxr-xr-x. As I said files under /etc/mail should have 644 permissions set that is rw-r--r-- permissions set and all files should be owned by root.

bathory 01-31-2012 03:04 PM

Quote:

Originally Posted by DanStrong (Post 4589659)
and also, when I run the command ls -ld / /etc/ /etc/mail, it shows:
drwxr-xr-x 24 root root 4096 Jan 31 11:31 /
drwxr-xr-x 85 root root 12288 Jan 31 12:37 /etc/
drwxr-xr-x 2 root root 4096 Jun 8 2011 /etc/mail
Thanks

The directories permissions are correct, so it shouldn't complain about a world writable directory. What is the output of
Code:

ls -l /etc/mail
You can bypass this by uncommenting the line
Code:

#O DontBlameSendmail=safe
(remove the leading #)in both sendmail.cf and submit.cf, but it's not an elegant solution.

DanStrong 01-31-2012 03:22 PM

After all resetting with file permissions, I have to restart the mail server.
I god i worked ... Great! great! great!
Thank you very much for your help: bathory and T3RM1NVT0R .
I will support this site with all my efforts.
best regards ...

T3RM1NVT0R 01-31-2012 03:47 PM

@ Reply
 
Great!!! Good to hear that. Could you please mark this thread as solved.

Enjoy linux!!!


All times are GMT -5. The time now is 01:16 AM.