[nos-bbs] new smtp gateway options

Maiko Langelaar maiko at pcs.mb.ca
Thu Dec 15 11:44:54 EST 2011


I think this will make a few people happy (I hope). In fact what makes
this even nicer (for me anyways) is that I have been able to make this
work by reusing and reorganizing the SDRE (smtp deny relay exceptions)
code. This is available via RSYNC - for those running an older version
and refuse to move up, let me know what version you're using. Thanks.

I've tested this enough to see that it works, this is new code, so test
the crap out of it please before you decide to put it into production. I
have added a bit of debugging to the main JNOS log file (just so u know).

Two new subcommands have been added to the smtp gateway syntax :

    smtp ga mode [original|force|first|last]

    smtp ga exception add ip mask
    smtp ga exception delete ip mask
    smtp ga exception  (to list)

The original way to define the gateway remains the same :

    smtp ga [A.B.C.D | none]

If mode is not specified, JNOS will function the old way. Force sends ALL 
smtp requests to the gateway before anything else. FIRST does the same,
but allows for exceptions. Why have a FORCE ? For emergencies perhaps,
where you normally want to run FIRST (which implies exceptions). LAST
is a mode I have not thought about yet, ideas are welcome.

Example (this is what I am currently running on my system) :

     smtp ga A.B.C.D

     smtp t4 60		# 1 minute timeout

     smtp ga mode first

     # send everything to gateway except 44 stations, they go direct
     smtp ga exception add 44.0.0.0 0xff000000

     # other exceptions (examples) - you can have as many as you want
     smtp ga exception add E.F.G.0  0xffffff00
     smtp ga exception add X.Y.Z.Z  0xffffffff

For those of you that use the SDRE (smtp deny relay exception) code,
it's the same syntax. Let me know what you think, what you like, what
you don't like, and so on.

Maiko




More information about the nos-bbs mailing list