[Xitami] how add a mail server to xitami

Paul Reid xitami@lists.xitami.org
Tue, 24 Jul 2001 00:37:37 -0400


> Umm - if  you are creating more than 25 line mail messages I think you'll have a stalled program waiting for someone to press
enter 

Duh - I hadn't thought of that. I just was not thinking of MORE's
main feature (the 25-line pause) at all.

But it seems Owen is right. I just ran 240+ lines through my BAT
file in a single gulp, and all the output showed as soon as I
switched back to my editor (which told me I should reload the
changed file). 

Theory: MORE asks the terminal driver how many lines between
Press Any Key.... 25, 43, 50 lines, it can vary. When run in a
pipe, the answer is "There is no screen size", and apparently
MORE is smart enough (or stupid enough) to pass huge streams
without user intervention.

 ....More testing... I just fed it 34480 lines, 1.1 megabytes.
This takes a couple seconds, and then the output shows up in the
sentmail.txt file. 30K lines+ and a megabyte+ of characters ought
to be enough for most purposes. 

I learned something new. Thanks. 

Owen > if you do TYPE WHATEVER | MORE

I tried TYPE, but sendmail generally expects the body of the
message as a pipe or redirect. I could not remember the syntax to
make TYPE eat STDIN instead of a real file. (DOS ain't unix; and
TYPE predates the semi-unixification of DOS 2.0.) 

Wolfgang, if you are still here... sendmail also generally takes
the TO address and some arcane options on the command line. My
trick will not pass this information. I assume that, since you
aren't really mailing it, you don't need this info while doing
"sandbox by myself" testing. You will check your TO address and
options in the script when you really do set it up for emailing.

Also: the "fake" sendmail dumping to a local text file is faster
than any mail server. True, a local unloaded mailserver can be
faster than your fingers so that may not be important, but the
fake sendmail is probably many microseconds faster. And keeping a
good editor open on the output file is probably faster than
working through a mail reader. Especially on a pay-per-minute
connection.

>OH! > Oooh, Paul!

Sorry. I didn't mean to startle you. But I was so excited I
slapped my forehead and said "OH! That's what he needs!"

I was not sure what you were doing, and you were not sure what to
ask, so we had all that talk about mailservers. When it became
clear that you were "testing in a sandbox", and wanted to work
off-line, and real email wasn't needed, I said "OH! There has to
be some super-simple way to do that!" 

You didn't need a mail server, you needed something to pretend to
take mail (in sendmail format) and put it where you could see it.
As long as the script can believe it is feeding to sendmail, it
does not matter what really happens inside "sendmail". DOS isn't
unix so it isn't THAT easy, but certainly a BAT file with MORE is
easier than building a post office. 

If you ever do install a "real" sendmail, hide or rename your
"fake" sendmail so there is no confusion. 

 -PRR