LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-31-2012, 01:27 PM   #1
DanStrong
LQ Newbie
 
Registered: Oct 2010
Location: California, USA
Distribution: CentOS
Posts: 20

Rep: Reputation: 0
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
 
Old 01-31-2012, 01:50 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ 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
 
Old 01-31-2012, 02:00 PM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
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
 
Old 01-31-2012, 02:41 PM   #4
DanStrong
LQ Newbie
 
Registered: Oct 2010
Location: California, USA
Distribution: CentOS
Posts: 20

Original Poster
Rep: Reputation: 0
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
 
Old 01-31-2012, 02:48 PM   #5
DanStrong
LQ Newbie
 
Registered: Oct 2010
Location: California, USA
Distribution: CentOS
Posts: 20

Original Poster
Rep: Reputation: 0
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
 
Old 01-31-2012, 02:50 PM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

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

Kind regards
 
Old 01-31-2012, 02:52 PM   #7
DanStrong
LQ Newbie
 
Registered: Oct 2010
Location: California, USA
Distribution: CentOS
Posts: 20

Original Poster
Rep: Reputation: 0
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
 
Old 01-31-2012, 02:56 PM   #8
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ 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.
 
Old 01-31-2012, 03:04 PM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by DanStrong View Post
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.

Last edited by bathory; 01-31-2012 at 03:06 PM. Reason: Forgot the files need changes
 
Old 01-31-2012, 03:22 PM   #10
DanStrong
LQ Newbie
 
Registered: Oct 2010
Location: California, USA
Distribution: CentOS
Posts: 20

Original Poster
Rep: Reputation: 0
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 ...
 
Old 01-31-2012, 03:47 PM   #11
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

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

Enjoy linux!!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command based email client to send email through secure smtp havolinec Linux - Newbie 2 07-27-2010 07:40 AM
[SOLVED] allow unsubscribed email address to send email to mailman list umarzuki Linux - Server 1 07-01-2010 03:54 AM
Perl email::send.. how to send the email? hawk__0 Programming 6 12-24-2009 01:53 PM
Send email to specific SMTP servers per email from my server? neilius Linux - Server 6 06-25-2009 06:31 AM
Apache virtual host send email without email server SibLiant Linux - Software 6 06-03-2009 09:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration