[nos-bbs] SMTP server response to LAN client

Barry Siegfried k2mf at k2mf.ampr.org
Thu Oct 11 18:56:43 EDT 2007


["(Skip) K8RRA" <k8rra at ameritech.net> wrote]:

> I have dug into a failure deeply enough to get over my head.
> This is a request for help with jnos on Linux with a remote mail reader.
> Here is a summary of my last few days work on this issue:
>
> My site is jnos2.0e including three upgrades not related to this issue.
> The config.h is lightly modified from the standard & compiled here.
> The platform is FC-7, and most things work nicely day-in/day-out.
>
> My mail reader is Evolution and I am POPing mail OK from jnos.
> When I try to *respond* to mail from jnos using Evolution there is a
> delivery problem with some mail:
>   Mail to the local system areas delivers OK
>   Mail to my neighbor node fails
>     a) Evolution responds to me:
>              "...mailbox unavailable." (seen in pop-up window)
>     b) jnos SMTP responds to Evolution:
>              "550 ... address unknown" (seen in tun0 trace)
>
> I find that rewrite is *not* modifying the To: address.  The To:
> address is identical to an address that delivers OK if/when similar
> mail is entered via the BBS mailbox of jnos.  The From: address is
> valid for local delivery in both forms: a) IP number  b) domain name.
>
> The "mbox header" is OFF, the "third-party" is OFF, no entry in ftpusers
> contains the "no_third-party" bit turned on.  When I read smtpserv.c I
> find seven tests that can give the jnos response output - yes I don't
> know which one is coming up true!...:-(

I can give you a little programming trick here to find the spot you're
looking for.  In as much as you are looking through the code enough
to find when that response is output, then you should temporarily be
able to modify the code and recompile your program.

Seven tests, huh?  Interesting.

Problem:  You want to identify which one is failing.
Solution:  Put something *unique* inside the braces for each of the
seven tests that will give you proof positive of which one it is
that is failing.

So... go to test 1.  The code might look something like this:

if(test() == fail) {
	usprintf(s,Unknown,Badrecipient);
	break;
}

There may in fact be other actions within those braces.  That's ok.
Right before the server outputs the Badrecipient message to the
socket, simply add a call to printf() with something unique in it,
like:

if(test() == fail) {
	printf("Test 1 has failed!\n");
	usprintf(s,Unknown,Badrecipient);
	break;
}

Now... repeat this for *each* of the seven tests and increment the
test number each time in the call to printf().  Recompile and run.
Then try sending your message from Evolution.  Whichever message
pops out at the JNOS console when the email fails will be the test
that is failing.

When you are done, either edit out each of your additional printf()
lines, or, restore the original smtpserv.c file.

> As I study the documentation on this subject, the approved action for
> SMTP server is to deliver the message to local recipients first, then
> second for remote recipients deposit the message into ./spool/mqueue for
> SMTP client to forward.  For me -- the second part is not working...
>
> Clearly the difference lies in the source of the message.  BBS mail is
> OK, Evolution mail fails.  I am now several days into poking around with
> the details and have not found the cause for the failure.

Do you happen to have that NO_SMTP_RELAY (or similar) option set in
your config.h so that your JNOS program does not function as an open
email relay?  If you are sending non-local email through the SMTP
server so that you expect its client to handle it, then you *must*
permit SMTP "relaying" of some kind in the server.

In contrast, when a user enters email at the mailbox prompt, the
mechanics of how it is processed is different.  While this routine
*does* consult the rewrite file, it does not actually use the SMTP
server for "delivery".  So first I would check to see if the mailbox
mail sending code is is also affected by the NO_SMTP_RELAY compile-
time option.  My guess is that it is an SMTP server-only option and
that the mailbox mail sending code is NOT affected by it.

> If anyone has been successful at using mail reader on the LAN hooked
> up to jnos as a delivery path, then perhaps you shine a light on my
> situation?  I'm needing a beer...
>
> MANY MANY THANKS if you can work magic...

Magic?  It's all magic and done with smoke and mirrors.  Didn't you
know that?  :)

73, de Barry, K2MF >>
           o
          <|>      Barry Siegfried
+---------/-\---------------------------+
| Internet | bgs at mfnos.net              |
| HomePage | http://www.mfnos.net/~bgs  |
+----------+----------------------------+
| Amprnet  | k2mf at k2mf.ampr.org         |
| PBBS     | k2mf at k2ge.#cnj.nj.usa.noam |
+----------+----------------------------+




More information about the nos-bbs mailing list