LinuxQuestions.org
Visit Jeremy's Blog.
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 03-17-2012, 02:43 AM   #1
sanjay87
Member
 
Registered: Oct 2011
Posts: 164

Rep: Reputation: Disabled
Sendmal error:connnection refused by 127.0.0.1


Hi
When i tried to send email out from my ubuntu machine .Its delivering Sendmal error:connnection refused by 127.0.0.1


Error log

Quote:
Mar 17 13:05:11 dhinesh-desktop sendmail[3315]: q2HH5A1J003315: to=<jsaravana02@gmail.com>, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30084, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Quote:
service sendmail restart
* Restarting Mail Transport Agent (MTA) sendmail 451 4.0.0 /etc/mail/sendmail.cf: line 100: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
[ OK ]
Quote:
# ls -al /etc/mail/sendmail.cf
-rw-r--r-- 1 root smmsp 63622 2012-03-17 12:21 /etc/mail/sendmail.cf
root@dhinesh-desktop:~# ls -al /etc/mail/local-host-names
-rw-r--r-- 1 root smmsp 24 2012-03-16 21:21 /etc/mail/local-host-names
root@ecare-desktop:~#




Quote:
cat /etc/hosts

#127.0.0.1 localhost.localdomain localhost
127.0.0.1 dinesh-desktop localhost.localdomain localhost
127.0.0.1 localhost localhost.localdomain dinesh-desktop dinesh-desktop.foobar
10.200.2.42 ws6.etl.com

Last edited by sanjay87; 03-17-2012 at 02:45 AM.
 
Old 03-17-2012, 04:14 AM   #2
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:
service sendmail restart
* Restarting Mail Transport Agent (MTA) sendmail 451 4.0.0 /etc/mail/sendmail.cf: line 100: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
[ OK ]
Sendmail refuses to start if there is a world writable directory in the directory tree /etc/mal. So run
Code:
ls -ld / /etc/ /etc/mail/
and fix the permissions of the offending directory

Regards
 
Old 03-19-2012, 12:29 PM   #3
agentbuzz
Member
 
Registered: Oct 2010
Location: Texas
Distribution: Debian, Ubuntu, CentOS, RHEL
Posts: 131

Rep: Reputation: 25
sendmail

sanjay87,
bathory gave you the correct answer. Since you know you somehow ended up with permissions errors, it might be a good idea if you also checked the permissions on the rest of the sendmail-related items.
Code:
drwxrwx---      smmsp  smmsp     /var/spool/clientmqueue
drwx------      root   wheel     /var/spool/mqueue
-r--r--r--      root   wheel     /etc/mail/sendmail.cf
-r--r--r--      root   wheel     /etc/mail/submit.cf
-r-xr-sr-x      root   smmsp     /usr/sbin/sendmail
The sendmail binary could be /usr/sbin/sendmail.sendmail if it's RH or CentOS. It is also at /usr/lib/sendmail on some systems, like Solaris.
 
Old 03-20-2012, 02:47 AM   #4
sanjay87
Member
 
Registered: Oct 2011
Posts: 164

Original Poster
Rep: Reputation: Disabled
Thanks Bathory for ur reply .I solved the error by correcting out wright permission for /etc/mail
 
1 members found this post helpful.
Old 10-05-2014, 09:24 PM   #5
wildblueyonder
LQ Newbie
 
Registered: Feb 2007
Posts: 3

Rep: Reputation: 0
Thank you!!

Wow I spent hours on this before finding this simple solution. Geesh!! Thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
127.0.0.1 connection refused criathar Linux - Newbie 1 11-27-2009 03:53 PM
[SOLVED] outgoing messages met with error in maillog: connection refused by [127.0.0.1] sarsaeol Linux - Newbie 1 04-22-2008 04:28 PM
Kerberos Connnection Refused! mesh2005 Linux - Networking 0 11-13-2005 02:54 AM
Apache; connection refused 127.0.0.1 error. Hal Linux - Newbie 6 04-18-2004 02:08 PM
Connection refused by [127.0.0.1] GraemeK Linux - Networking 6 09-03-2003 02:26 PM

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

All times are GMT -5. The time now is 12:53 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