Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendmail server on private LAN?

Status
Not open for further replies.

capitano

Programmer
Jul 30, 2001
88
US
I'm trying to configure seperate RedHat 7.1 sendmail servers on each RH machine of my private LAN. I want each server to send & receive mail to the other machines on my LAN.

I've looked through the Sendmail HOWTO's, but all this stuff looks way too complicated for my simple needs. It appears sendmail is already up and running on all my machines, I can send mail out through my gateway/router to the internet. (Although I have not asked my ISP to put an MX entry in their DNS records so I can receive mail to my domain on my machines. This is not necessary for me at the moment.)

I have tried adding entries in the /etc/mail/mailertable:
host1.mydomain.com SMTP:[192.168.1.2]
host2.mydomain.com SMTP:[192.168.1.3]

...and so forth, and then updating the database:
makemap hash /etc/mail/mailertable < /etc/mail/mailertable

but I still cannot seem to get mail going to other machines on my LAN.

Any help would be MUCH appreciated. THanks so much,

Bryan C.
 
It's possible that your firewall may be blocking smtp requests. Try and open up port 25, and see if that gets the mail through. You can use 'lokkit', /usr/sbin/lokkit as root, and see if port 25 is open, or from the command line: /sbin/ipchains -L Bruce Garlock
bruceg@tiac.net
 
Thanks, that's a good suggestion. I'm using IPTables to filter packets coming from outside my private LAN, while allowing everything to migrate between machines on my LAN.

I made sure SMTP port 25 was accepting on input & output chain rules. Still can't get mail sent.
I stopped IPTables service (just for a test) on a couple internal machines. But I still cannot send/receive email, even between machines with no firewall Hmmmm....!

After an hour or so, I get a 'returned mail: see transcript' where the body of the returned mail says it could not reach 192.168.1.4: connection refused.'

Why is this? Sendmail is running on 192.168.1.4. Firewall is turned off completely, what else am I not configuring?

Anybody? Thanks!
 
Look in your /etc/sendmail.cf for a line similar to this:

# SMTP daemon options

O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA


If that is the only option for the daemon, then it will only listen on the local interface. I commented mine out (then restarted sendmail), and it started accepting connections on the LAN.


Bruce Garlock
bruceg@tiac.net
 
Thank you, that did the trick! I'll have to spend some time learning more about sendmail.cf file and how to configure this puppy. Seems that line might allow/disallow receiving mail from particular hosts?

Can anybody recommend a good book on getting up to speed with Sendmail -- especially for RH Linux??

Thanks,
Bryan Capitano
 
Hi,

I'd agree with Bruce on the Craig Hunt book - all of his stuff is very good as far as I'm concerned. There are actually a couple of slightly adapted chapters from that book available as pdfs from sybex :

ftp://ftp.sybex.com/4036/4036BC01.pdf
ftp://ftp.sybex.com/4036/4036BC02.pdf

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top