Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jan 2003 21:50:53 -0800
From:      "Adam Lofstedt" <>
To:        "'Chuck Swiger'" <>, <questions@FreeBSD.ORG>
Subject:   RE: Redirecting root's email
Message-ID:  <000001c2b610$c5d99c20$6501a8c0@5adam5>
In-Reply-To: <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Damn this is a long thread...

> > Thanks Jack.  That didn't work.  This is what I got: 
> forcefield# mail 
> > -v -s test sendtest < /dev/null Null message body; hope that's ok
> > sendtest... Connecting to via relay...
> > sendtest... Deferred: Operation timed out with 
> >
> > I think something else is wrong here.  This is on a 
> dual-homed gateway 
> > running ipf and ipnat.  For testing purposes I made the ipf.rules 
> > simply pass in all and pass out all, and then I am mapping 
> my external 
> > address on external NIC to my internal network.  In 
> ipnat.rules I am 
> > redirecting port 25 of the external interface to port 25 of my 
> > internal network's mailserver.
> That probably means that sendmail can't bind to port 25 on 
> that interface, 
> because your NAT rule is already listening on that port, in 
> order to redirect 
> connections.  [ However, you may not care if you're only 
> trying to send mail 
> outbound from this gateway box. ]

Right, I don't care.  I just want to get root's emails out of there.
Basically I'm trying to send root's emails outbound from the gateway
through the internal interface to my internal mail server.  The gateway
uses my internal name server to resolve names, so nothing should even be
going out the external interface of the box.

> > This seems like a standard gateway setup.  I'm not sure how/why it 
> > would affect sendmail running on the gateway machine.  I just can't 
> > understand why I can telnet into port 25 and get 
> a response 
> > from sendmail, but then when I try to send a mail out, it can't 
> > connect to the localhost.
> Are you sure that "" maps to 
Yes.  I can ping and it comes back just fine as

>Anyway, you 
> don't want to deliver the mail locally, right-- you want the 
> mail from 
> "forcefield" to be relayed (via an alias if I understood the 
> earlier part of 
> the thread) to your "internal network's mailserver".

Right.  Exactly.

> Can you telnet internal_mailserver 25?

Yes I can telnet to it from the gateway.  Definately my internal mail
server is not the problem, as it is working normally.

> Does it work if you turn off NAT and the redirect?

Nope.  I flushed all the rules, my ipnat.rules in empty and my ipf.rules
is pass in all and pass out all.

> Is there anything interesting in /var/log/maillog?

Nope.  Just the same things.

Jan  4 00:00:00 forcefield newsyslog[7170]: logfile turned over 
Jan  4 00:07:33 forcefield sm-msp-queue[7180]: h03F7WAs006196: to=root,
delay=17:00:01, xdelay=00:00:00, mailer=relay, pri=3091680,, dsn=4.0.0, stat=Deferred: Operation
timed out with 
Jan  4 00:07:33 forcefield sm-msp-queue[7180]: h03F7WAr006196: to=root,
delay=17:00:01, xdelay=00:00:00, mailer=relay, pri=3098805,, dsn=4.0.0, stat=Deferred: Operation
timed out with 
Jan  4 00:07:33 forcefield sm-msp-queue[7180]: h03B2Nw3006001: to=root,
ctladdr=root (0/0), delay=21:05:10, xdelay=00:00:00, mailer=relay,
pri=3900062,, dsn=4.0.0, stat=Deferred:
Operation timed out with

To Unsubscribe: send mail to
with "unsubscribe freebsd-questions" in the body of the message

Want to link to this message? Use this URL: <$c5d99c20$6501a8c0>