LinuxQuestions.org
Visit Jeremy's Blog.
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 05-17-2014, 08:57 AM   #1
babbab
Member
 
Registered: Mar 2010
Distribution: slackware64 current
Posts: 104

Rep: Reputation: 4
slackware 14.1 sendmail default configuartion force it to using hosts file


Hi
I'm using slack 14.1 and trying to configure sendmail to use hosts file with default configuration file sendmail.cf that came with. and I'm not running dns sever

My other laptop has static ip and added to /etc/hosts file
it seemed working then now the sendmail is not sending
when i give command

Code:
mailq
it says deferred: name server
i read sendmail manual for 8.14.7 it says I can put /etc/mail/service.switch file and put

Code:
hosts files dns
in it. but it does not seems to work. I did and restarted rc.sendmail but it still does not send mails

I also read that if /etc/nsswitch.conf is used, I think the service.switch file is ignored.

anyway how do I force sendmail to use /etc/hosts file?
or is there something I did wrong in the procedure?
 
Old 05-17-2014, 09:34 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Not real sure that I completely understand the question -- sendmail does use /etc/hosts (at least on this machine, sending mail to myself (or any other user)):
Code:
fubar-trona-/home/trona: mailx trona
Subject: A Test Message
This is a test message.
EOT
fubar-trona-/home/trona: mailx
Heirloom mailx version 12.5 7/5/10.  Type ? for help.
"/var/spool/mail/trona": 1 message 1 new
>N  1 trona@fubar.lan    Sat May 17 10:23   20/688   A Test Message
? t
Message  1:
From trona@fubar.lan  Sat May 17 10:23:00 2014
Return-Path: <trona@fubar.lan>
From: trona@fubar.lan
Date: Sat, 17 May 2014 10:23:00 -0400
To: trona@fubar.lan
Subject: A Test Message
User-Agent: Heirloom mailx 12.5 7/5/10
Content-Type: text/plain; charset=us-ascii
Status: R

This is a test message.

? d
? q
fubar-trona-/home/trona:
This machine, fubar, is fixed-IP (as are all my machines), all are in every /etc/hosts and all send mail back and forth to each other without any additional configuration (those are fubar.lan, snafu.lan, pita.lan and dufus.lan).

To the outside world, no, messages bounce because fubar.lan is not a valid DNS address; inside world, no problem.

I'm not using sendmail directly, I let mailx (or mail) handle that.

That help any?
 
Old 05-17-2014, 10:27 AM   #3
babbab
Member
 
Registered: Mar 2010
Distribution: slackware64 current
Posts: 104

Original Poster
Rep: Reputation: 4
>>Not real sure that I completely understand the question -- sendmail does use /etc/hosts (at least on this >>machine, sending mail to myself (or any other user)):

that's what I thought. and my sendmail did sent mails for while, then now simply doesn't work. so I thought maybe sendmail use name server before reading hosts file.

I force sent mails in queue by

Code:
sendmail -q
still sendmail doesn't find hosts

Code:
root@garlicbread:[/home/chano]# sendmail -q
root@garlicbread:[/home/chano]# mailq
                /var/spool/mqueue (5 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
s4GNs8PS001975*      60 Fri May 16 19:54 <chano@garlicbread.home.net>
                 (Deferred: Name server: friedrice.home.net.: host name lookup)
                                         <chano@friedrice.home.net>
s4GNhJ3M001664       36 Fri May 16 19:43 <chano@garlicbread.home.net>
                 (Deferred: Name server: friedrice.home.net.: host name lookup)
                                         <chano@friedrice.home.net>
s4GIouYp001229        2 Fri May 16 14:50 <chano@garlicbread.home.net>
                 (Deferred: Name server: friedrice.home.net.: host name lookup)
                                         <chano@friedrice.home.net>
s4GIp7VV001235    11274 Fri May 16 14:51 <chano@garlicbread.home.net>
                 (Deferred: Name server: friedrice.home.net.: host name lookup)
                                         <chano@friedrice.home.net>
s4GIhVsD001144    11274 Fri May 16 14:43 <chano@garlicbread.home.net>
                 (Deferred: Name server: friedrice.home.net.: host name lookup)
                                         <chano@friedrice.home.net>
                Total requests: 5
root@garlicbread:[/home/chano]#
so I thought maybe I configured it wrong. still makes me wonder why it doesn't work any more...
 
Old 05-17-2014, 11:32 AM   #4
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 528

Rep: Reputation: 273Reputation: 273Reputation: 273
If sendmail worked for you before you made configuration changes then you may want to back out of your changes to get sendmail working again. Then carefully redo the configuration changes to help narrow down what change broke sendmail.

EDIT: Don't forget to restart services/daemons to re-read configuration files.

Last edited by TracyTiger; 05-17-2014 at 11:35 AM.
 
Old 05-17-2014, 11:53 AM   #5
babbab
Member
 
Registered: Mar 2010
Distribution: slackware64 current
Posts: 104

Original Poster
Rep: Reputation: 4
the problem is I didn't modify sendmail.cf file. now I'm reading manual finding out new things. but no solution still.
 
Old 05-19-2014, 07:17 AM   #6
babbab
Member
 
Registered: Mar 2010
Distribution: slackware64 current
Posts: 104

Original Poster
Rep: Reputation: 4
I just notice something while giving command of sendmail -q -v

Code:
root@garlicbread:[/home/chano]# sendmail -q -v

Running /var/spool/mqueue/s4GNs8PS001975 (sequence 1 of 5)
<chano@friedrice.home.net>... Connecting to friedrice.home.net. via esmtp...
^Croot@garlicbread:[/home/chano]# ^C
root@garlicbread:[/home/chano]#
the mailer tries to send by esmtp port. both of my machines's ports 27 are closed by firewall

How do I force sendmail to use smtp port which is 25?
 
  


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
[SOLVED] sendmail ignoring hosts file .... Rohit_4739 Linux - Server 8 01-08-2016 11:34 AM
Slackware 12 + beryl configuartion problems joker20 Linux - Software 2 09-18-2007 04:50 AM
Sendmail configuartion brijesh Linux - Networking 0 06-02-2004 02:36 AM
Where can I find the network configuartion file Bassam Linux - Networking 1 02-11-2004 10:49 PM
rehat sendmail configuartion problem sajandavid Linux - General 1 11-13-2002 05:48 AM

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

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