Author Topic: running sendmail behind NAT router  (Read 1462 times)

dbl221

  • Member
  • **
  • Posts: 253
  • Kudos: 0
running sendmail behind NAT router
« on: 24 March 2002, 23:03 »
OK gang, I am trying to get sendmail to work on my Mandrake Box sitting behind my NAT router/firewall.

I can recieve mail from all of my test account on hotmail, yahoo, my school account and my ISP account, no probs...works great.  I use a dynamic dns service so I have an MX entry.

My firewall is set up to allow port 25 connections.    This is the timeout error I am getting.
 
quote:
Mar 24 12:37:04 dbl221 sendmail[1634]: g2OGLZe02508: [email protected], ctladdr=doug (501/501), delay=01:15:29, xdelay=00:31:31, mailer=esmtp, pri=120132, relay=mx4.mail.yahoo.com. [216.136.129.14], dsn=4.0.0, stat=Deferred: Connection timed out with mx4.mail.yahoo.com.


Sendmail needs to resolve to the box its running on to send mail, but my MX entry resolves to my router.

Any sendmail advice is appreciated.
dbl221***Comp-Sys walking wounded

voidmain

  • VIP
  • Member
  • ***
  • Posts: 5,605
  • Kudos: 184
    • http://voidmain.is-a-geek.net/
running sendmail behind NAT router
« Reply #1 on: 25 March 2002, 00:51 »
I *assume* you are forwarding port 25 from your sendmail box to your firewall outside interface correct?  Also, since sendmail is behind the firewall you may have to tweak the timeouts in the /etc/sendmail.cf for "ident". By default it's set to 30 seconds which means if you try to telnet to port 25 from an outside machine it may be up to 30 seconds before it actually makes the connection. Search your sendmail.cf for this line:

#O Timeout.ident=30s

Uncomment it and change the "30s" to something like "1s" or "0s" which means it will not try to do an ident lookup.  There are many other timemouts in the same section of the config file.  After changing this file you'll just need to restart sendmail.

Also if you use m4 to recreate your sendmail.cf you'll either need to change this every time you recreate the sendmail.cf or add it to the sendmail.mc file.
Someone please remove this account. Thanks...