[nos-bbs] smtp gateway command

Michael Fox - N6MEF n6mef at mefox.org
Tue Mar 15 23:16:36 EDT 2011


It does indeed take quite a bit of time for JNOS to timeout trying to
connect to external servers.

 

If JNOS is successful reaching a "real" mail server, it typically gets a
reject for doing something wrong.  This causes JNOS to send the message back
to the sender of the message informing of the reject.

 

So, to prevent that from happening, I disabled forwarding of SMTP on the
tunnel between JNOS and Linux.  This causes the JNOS attempts to reach
Internet mail servers to time out.  At that point, JNOS tries the gateway.

 

This timeout takes about 2 minutes.  That's kind-of annoying, especially
when you're trying to test a set-up or train people.

 

So, it seems like an "smtp use-gateway" command which could control JNOS's
gateway usage would be helpful.  The options I originally suggested below
seem good, except I'd change "like-dns" to "non-local".  For completeness,
I'll rewrite it here:

 

smtp use-gateway { LAST | first | always  | non-local }

 

smtp use-gateway last   # the default and current behavior; tries direct
and, if it times out, passes to gateway

smtp use-gateway first  # sends to the gateway first and, if that fails,
tries direct

smtp use-gateway only  # sends to the gateway only; does not try to send
direct

smtp use-gateway non-local  # if the host is found in domain.txt, behaves
like "last" (tries to connect directly; otherwise it behaves like "only"
(sends only to the gateway)

 

Thoughts anyone?  Is this reasonable?  Do-able?

 

Michael

 

 

 

 

From: Michael Fox - N6MEF [mailto:n6mef at mefox.org] 
Sent: Friday, March 11, 2011 3:34 PM
To: 'TAPR xNOS Mailing List'
Subject: FW: [nos-bbs] smtp gateway command

 

I wonder if it makes sense to have an smtp command that would control this.

 

My thinking is that you can control completely the machines in your
domain.txt file.  These would typically be the machines in your own network
that you want to be able to connect to, even if external DNS is down.  This
is much like /etc/hosts in linux.  JNOS looks in domain.txt first and, if
not found, then consults DNS.

 

The same would apply to sending messages.  So, since JNOS currently attempts
direct delivery and, if that fails, sends to the smtp gateway, how about
these two options

 

smtp use-gateway { LAST | first | always  | like-dns }

 

smtp use-gateway last   # the default and current behavior; tries direct
and, if fails, passes to gateway

smtp use-gateway first  # sends to the gateway first and, if that fails,
tries direct

smtp use-gateway only  # sends to the gateway only; does not try to send
direct

smtp use-gateway like-dns  # if the host is found in domain.txt, behaves
like "last"; otherwise (needs to consult DNS) it behaves like "first"

 

I don't know how hard that would be to code.  And, if the failure is like
Bill says, perhaps it's not really needed.  I just wonder if, at some point,
repeated failed attempts to connect to some other MTA gets you on a
blacklist such that you're hosed going forward..

 

Michael

N6MEF

 

 

 

 

From: nos-bbs-bounces at tapr.org [mailto:nos-bbs-bounces at tapr.org] On Behalf
Of Wm Lewis
Sent: Thursday, March 10, 2011 9:48 PM
To: nos-bbs at tapr.org
Subject: Re: [nos-bbs] smtp gateway command

 

Well, I agree that there should be a way to tell JNOS to always default to
an smtp gateway.
 
But I think the thought process way back when all this was developed was
that jnos should
attempt the shortest path first, which meant using a gateway last.
 
But, the upside is, if your station is setup correctly, even if jnos tries
direct connects first, (and
they all get rejected due to bad authentication), then it tries your
gateway, and it goes through,
*** the speed at which all this takes place is still so fast there is
*almost* no noticable delay
in the mail reaching its destination.
 
>From *failed first* to *gateway success* delivery, is usually still less
than 5-10 seconds.
 
That's still pretty fast for email delivery.
 
> Date: Thu, 10 Mar 2011 23:14:07 -0500
> From: bobtenty at gmail.com
> To: nos-bbs at tapr.org
> Subject: Re: [nos-bbs] smtp gateway command
> 
> 
> You have to set smtp usemx off so that mx record lookup is prevented so 
> that smtp's
> are sent directly if they can be reached otherwise the smtp gateway will 
> be used.
> Not ideal as I have found out and it can take a while before it tries 
> the smtp gateway
> and in my experience can fail.
> 
> I think there should be a setting so that outgoing mail is always 
> directed to the smtp gateway
> like what you can with the smtp servers in linux (exim, postfix) , no 
> questions asked.
> 
> 73,
> 
> Bob VE3TOK
> 
> 
> On 11-03-10 07:34 PM, Bill V WA7NWP wrote:
> > On Thu, Mar 10, 2011 at 3:33 PM, Bob Tenty<bobtenty at gmail.com> wrote:
> >
> >> I process all my mail in linux
> >
> > Could we, with appropriate local MX entries or other magic, send Email
> > directly to 44net entities and/or other selected sites while letting
> > everything else use the default SMTP gateway? Or just let the first
> > delivery attempt be direct and then pass it on to the default gateway
> > if that fails...
> >
> > 73
> > Bill - WA7NWP
> >
> > _______________________________________________
> > nos-bbs mailing list
> > nos-bbs at tapr.org
> > https://www.tapr.org/cgi-bin/mailman/listinfo/nos-bbs
> 
> 
> _______________________________________________
> nos-bbs mailing list
> nos-bbs at tapr.org
> https://www.tapr.org/cgi-bin/mailman/listinfo/nos-bbs

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tapr.org/pipermail/nos-bbs_lists.tapr.org/attachments/20110315/df4b5d7c/attachment.html>


More information about the nos-bbs mailing list