LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-28-2018, 06:18 AM   #1
PreguntoYo
Member
 
Registered: Jan 2012
Distribution: openSUSE, Gentoo, Slackware
Posts: 73

Rep: Reputation: 15
I can't mail messages locally. Connection is refused


Hello:

I'm using Slackware 64 14.2 stable. I'm trying to send messages locally, like:

Code:
$ mail root
$ mail root@localhost

# mail preguntoyo
But messages are never delivered. I've had a look at /var/log/, and files such as: maillog.1, maillog.2, etc are being created. This is today's maillog:

Code:
Apr 28 12:19:20 deathstar sendmail[2454]: w3SAJKh8002454: from=preguntoyo, size=234, class=0, nrcpts=1, msgid=<201804281019.w3SAJKh8002454@deathstar.example.org>, relay=preguntoyo@localhost
Apr 28 12:19:20 deathstar sendmail[2454]: w3SAJKh8002454: to=root, ctladdr=preguntoyo (1000/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30234, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Apr 28 12:23:02 deathstar sendmail[2463]: w3SAN2Dg002463: from=preguntoyo, size=243, class=0, nrcpts=1, msgid=<201804281023.w3SAN2Dg002463@deathstar.example.org>, relay=preguntoyo@localhost
Apr 28 12:23:02 deathstar sendmail[2463]: w3SAN2Dg002463: to=root@localhost, ctladdr=preguntoyo (1000/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30243, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Apr 28 12:23:33 deathstar sendmail[2465]: w3SANXYe002465: from=preguntoyo, size=246, class=0, nrcpts=1, msgid=<201804281023.w3SANXYe002465@deathstar.example.org>, relay=preguntoyo@localhost
Apr 28 12:23:33 deathstar sendmail[2465]: w3SANXYe002465: to=root@deathstar, ctladdr=preguntoyo (1000/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30246, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Yes, I've noticed that "Connection refused by...", but this is the first time I'm trying to use the mail command and I'm clueless. Since now I had been using Thunderbird for e-mails. I just wanted smartd to send messages to root about SMART status of my HDs, and then noticed the thing wasn't working.

I have a firewall (iptables) set up and I've changed my localhost name to "deathstar". May it be the firewall?.

Thanks for any help in advance.
 
Old 04-28-2018, 08:47 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,174
Blog Entries: 1

Rep: Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040Reputation: 2040
Quote:
Yes, I've noticed that "Connection refused by...", but this is the first time I'm trying to use the mail command and I'm clueless
That means that sendmail is not running.
By default the sendmail startup script is not executable, so you have to run:
Code:
sh /etc/rc.d/rc.sendmail start
If you want sendmail to start on boot make the above script executable:
Code:
chmod +x /etc/rc.d/rc.sendmail
Cheers
 
1 members found this post helpful.
Old 04-28-2018, 11:53 AM   #3
PreguntoYo
Member
 
Registered: Jan 2012
Distribution: openSUSE, Gentoo, Slackware
Posts: 73

Original Poster
Rep: Reputation: 15
Thumbs up Thanks!

I hadn't noticed the /etc/rc.d/rc.sendmail script. It's so easy that it's embarrassing.

Now I have 487 messages ahead for reading...
 
Old 04-28-2018, 06:07 PM   #4
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,201

Rep: Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777Reputation: 1777
Quote:
Originally Posted by PreguntoYo View Post
I hadn't noticed the /etc/rc.d/rc.sendmail script. It's so easy that it's embarrassing.
And, in case you missed it, the default MTA in the next Slackware stable is Postfix. So, rc.postfix instead. Just in case you run into this problem again.
 
  


Reply

Tags
mail, mailx, sendmail



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
ERROR: connect to mail.*******.com[*.*.*.*]:25: Connection refused advolente Linux - Server 4 03-30-2009 09:59 PM
connection refused by mail relay vilee SUSE / openSUSE 1 03-09-2009 02:22 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
connection refused for postfix - cant download mail thandika Linux - Server 2 10-02-2007 07:05 AM
connection refused - mail j-me Linux - Newbie 15 09-18-2003 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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