>
> It's important to note, when talking about NFS, that there was Sun's NFS
> and everyone else's NFS. Sun ran their entire company on NFS. /usr/dist
> was where all the software that was not part of SunOS lived, it was an
> NFS mounted volume (that was replicated to each subnet). It was heavily
> used as were a lot of other things. The automounter at Sun just worked,
> wanted to see your buddies stuff? You just cd-ed to it and it worked.
>
> Much like mmap, NFS did not export well to other companies. When I went
> to SGI I actually had a principle engineer (like Suns distinguished
> engineer) tell me "nobody trusts NFS, use rcp if you care about your
> data". What. The. Fuck. At Sun, NFS just worked. All the time.
> The idea that it would not work was unthinkable and if it ever did
> not work it got fixed right away.
>
> Other companies, it was a checkbox thing, it sorta worked. That was
> an eye opener for me. mmap was the same way, Sun got it right and
> other companies sort of did.
>
I remember the days of NFS Connect-a-thons where all the different
vendors would get together and see if they all interoperated. It was
interesting to see who worked and who didn’t. And all the hacking to
fix your implementation to talk to vendor X while not breaking it working
with vendor Y.
Good times indeed.
David
> From: Theodore Ts'o
> when a file was truncated and then rewritten, and "truncate this file"
> packet got reordered and got received after the "here's the new 4k of
> contents of the file", Hilar[i]ty Enused.
This sounds _exactly_ like a bad bug found in the RVD protocol (Remote Virtual
Disk - a simple block device emulator). Disks kept suffering bit rot (damage
to the inodes, IIRC). After much suffering, and pain trying to debug it (lots
of disk writes, how do you figure out the one that's the problem), it was
finally found (IIRC, it wasn't something thinking about it, they actually
caught it). Turned out (I'm pretty sure my memory of the bug is correct), if
you had two writes of the same block in quick sucession, and the second was
lost, if the first one's ack was delayed Just Enough...
They had an unused 'hint' (I think) field in the protocol, and so they
recycled that to be a sequence number, so they could tell ack's apart.
Noel
Larry McVoy:
> +1 on what Ron said. I don't get the rationale for going back to ptrace.
> Anyone know what it is? Is there a perf issue?
Kurt H Maier:
The usual rationale presented is that someone can exhaust the fd table
and then you can't get anything done. Instead of fixing that problem,
the popular approach is to add more syscalls, like with getrandom(2).
====
Funny that that rationale isn't extended to its logical
conclusion: get rid of open and creat. Then nobody needs
to worry about running out of file descriptors ever!
I too am saddened to see such a retrograde step, but perhaps
I'm biased. When I arrived in 1127, the kernel had /proc but
still had ptrace as well. Why? Because no one was brave enough
to wade into sdb and adb.
After a couple of years, I felt brave enough, so I did it.
Once the revised sdb and adb had propagated to all our systems,
I removed the syscall. I celebrated by physically removing
ptrace(2) from the Eighth Edition manual in the UNIX room: the
manual entry comprised two facing pages, which I glued together.
I can sympathize with FreeBSD excuse someone cited elsewhere,
that nobody used the code so it should go--I'm always in favour
of improving programs by chopping sutff out--but I think the
decision here was backwards. The proper answer would have been
to teach ps et al to use /proc, not to invent a new complex of
system calls.
I dislike how Linux has tossed information about processes and
other system-related data into the same namespace (and now that
there is /sys as well as /proc, I wonder whether it's time to
divorce them, or even to move /proc into /sys/proc), but the
general direction of moving things into the file system makes
sense. I have some qualms about adding more and more code to
the kernel that just does string processing (making the kernel
bigger and more complicated, and widening the attack surface
for bad guys), though; maybe most of that stuff belongs not in
the OS proper but in a user-mode program that reads /dev/mem
and presents as a file system.
Norman Wilson
Toronto ON
On Wed, 27 Sep 2017, Roland Turner wrote:
> * Simply attaching the entire message as a message/rfc822 part is an
> appealing approach, but very few mail clients would do anything
> intelligent with it.
My MUA of choice, Alpine, certainly does, and it's hardly uncommon. I
tried Elm once, and immediately went straight back to Pine (as it was
known then); never bothered with Mutt.
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."
All, I've set up a mirror TUHS list which munges the From: line to keep
mail systems like Gmail happy. I've migrated some of you over to this
new list: those whose subscriptions were disabled due to excessive bounces.
I'm hoping that this will a) fix most of the bounce problems and b) keep
those who don't want address munging happy.
If I've moved you and you want to be put back on the non-munged list,
let me know.
Fingers crossed that this is a good solution,
Warren
All, overnight the mail list blocked about 60 people because of excessive
bouncing. It was probably because the list has been busy, and the bounce
threshold for the (mostly gmail) addresses was exceeded. I've manually
re-enabled them all.
I have installed the script that strips DKIM and ARC header lines before
the list software processes the inbound e-mails. We will see if that helps.
Apologies, Warren
All, I just had a whole bumch of gmail addresses disabled on the TUHS
list because of DKIM. I had an idea. I'll create a second list which
munges the From: line. E-mail to tuhs(a)tuhs.org will go to both lists.
I'll move the gmail people over to the munging list.
This is just a test e-mail to see if the munging list works. I'm the only
one on it. If it seems to work, I'll move the gmail folk over.
Cheers, Warren
Clem Cole:
It was never designed for it. dmr designed Streams to replace the
tty handler. I never understood why the Summit guys insisted on
forcing networking into it.
======
You've mistaken. The point of the stream I/O setup with
stackable line disciplines, rather than the old single
line-discipline switch, was specifically to support networking
as well as tty processing.
Serial-device drivers in V7 used a single line-discipline
driver, used variously for canonical-tty handling and for
network protocols. The standard system as used outside
the labs had only one line discipline configured, with
standard tty handling (see usr/sys/conf/c.c). There were
driver source files for what I think were internal-use-only
networks (dev/pk[12].c, perhaps), but I don't think they
were used outside AT&T.
The problem Dennis wanted to solve was that tty handling
and network protocol handling interfered with one another;
you couldn't ask the kernel to do both, because there was
only one line discipline at a time. Hence the stackable
modules. It was possible to duplicate tty handling (probably
by placing calls to the regular tty line discipline's innards)
within the network-protocol code, but that was messy. It also
ran into trouble when people wanted to use the C shell, which
expected its own special `new tty' line discipline, so the
network code would have to know which tty driver to call.
It made more sense to stack the modules instead, so the tty
code was there only if it was needed, and different tty
drivers could exist without the network code knowing or caring.
When I arrived at the Labs in 1984, the streams code was in
use daily by most of us in 1127. The terminals on our desks
were plugged into serial ports on Datakit (like what we call
a terminal server now). I would turn on my terminal in the
morning, tell the prompt which system I wanted to connect to,
and so far as I could tell I had a direct serial connection.
But in the remote host, my shell talked to an instance of the
tty line module, which exchanged data with a Datakit protocol
module, which exchanged data with the low-level Datakit driver.
If I switched to the C shell (I didn't but some did), csh would
pop off the tty module and push on the newtty module, and the
network code was none the wiser.
Later there was a TCP/IP that used the stream mechanism. The
first version was shoehorned in by Robert T Morris, who worked
as a summer intern for us; it was later cleaned up considerably
by Paul Glick. It's more complicated because of all the
multiplexers involved (Ethernet packets split up by protocol
number; IP packets divided by their own protocol number;
TCP packets into sessions), but it worked. I still use it at
home. Its major flaw is that details of the original stream
implementation make it messy to handle windows of more than
4096 bytes; there are also some quirks involving data left in
the pipe when a connection closes, something Dennis's code
doesn't handle well.
The much-messier STREAMS that came out of the official System
V people had fixes for some of that, but at the cost of quite
a bit more complexity; it could probably be done rather better.
At one point I wanted to have a go at it, but I've never had
the time, and now I doubt I ever will.
One demonstration of virtue, though: although Datakit was the
workhorse network in Research when I was there (and despite
the common bias against virtual circuits it worked pretty well;
the major drawback was that although the underlying Datakit
fabric could run at multiple megabits per second, we never had
a host interface that could reliably run at even a single megabit),
we did once arrange to run TCP/IP over a Datakit connection.
It was very simple in concept: make a Datakit connection (so the
Datakit protocol module is present); push an IP instance onto
that stream; and off you go.
I did something similar in my home V10 world when quickly writing
my own implementation of PPP from the specs many years ago.
The core of that code is still in use in my home-written PPPoE code.
PPP and PPPoE are all outside the kernel; the user-mode program
reads and writes the serial device (PPP) or an Ethernet instance
that returns just the desired protocol types (PPPoE), does the
PPP processing, and reads and writes IP packets to a (full-duplex
stream) pipe on the other end of which is pushed the IP module.
All this is very different from the socket(2) way of thinking,
and it has its vices, but it also has its virtues.
Norman Wilson
Toronto ON
>> "Bah. That's just some goof-ball research toy."
> I feel like the same thing was said about Unix at some point very early
in it's history.
Amusingly the IT department of AT&T felt that way and commissioned a
Harvard prof, no less, to write a report about why VMS was the way to
go on Vaxen. The hired gun (so much for academic integrity) addressed
the subject almost entirely with meta arguments:
(1) VMS was written by OS professionals; Unix was a lab experiment.
(2) One could count on support from DEC, not from Research. (So
much for USG; as far as i know the author never asked anyone in]
Bell Labs about anything.)
(3) And the real killer: VMS was clearly far advanced, witness
its shelf of manuals vs the thin Unix volumes that fit in one's
briefcase. Lee McMahon had particular fun with this one in a
rebuttal that unleashed the full power of his Jesuit training
in analytic debate.
Doug
OK, here's another one that's good for chest thumping...
I am not a fan of texinfo. It doesn't provide any benefits (to me) over man.
I suppose that it was trailblazing in that it broke manual pages up into
sections that couldn't easily be viewed concurrently long before the www and
web pages that broke things up into multiple pages to make room for more ads.
Any benefits that texinfo might have are completely lost by the introduction
of multiple non-intersecting ways to find documentation.
This is a systemic problem. I have a section in my book-in-progress where I
talk about being a "good programming citizen". One of the things that I say
is:
Often there is a tool that does most of what you need but is lacking
some feature or other. Add that feature to the existing tool;
don't just write a new one. The problem with writing a new one
is that, as a tool user, you end up having to learn a lot of tools
that perform essentially the same function. It's a waste of time
an energy. A good example is the make utility (invented by Stuart
Feldman at Bell Labs in 1976) that is used to build large software
packages. As time went on, new features were needed. Some were
added to make, but many other incompatible utilities were created that
performed similar functions. Don't create burdens for others.
Improve existing tools if possible.
A funny example of this is when I was consulting for Xilinx in the late 80s
on a project that had to run on both Suns and PCs. Naturally, I did the
development on a Sun and ported to the PC later. When it came time to do
the port, a couple of the employees proudly came to me and told me about
this wonderful program that they wrote that was absolutely necessary for
doing the PC build. I was completely puzzled and told them that I already
had the PC build complete. They told me that that couldn't be possible
since I didn't use their wonderful utility. Turns out that their utility
wrote out all of the make dependencies for the PC. I, of course, wrote a
.c.obj rule which was all that it took. They were excessively angry at me
for inadvertently making them look like fools that they were.
Another example is a more recent web-based project on which I was advising.
I'm a big fan of jQuery; it gets the job done. Someone said "Why are you
using that instead of angular?" I did a bit of research before answering.
Turns out that one of the main reasons given for angular over jQuery was
that "it's fresh". That was a new one for me. Still unclear why freshness
is an attribute that would trump stability.
So, I'm sure that many of you have stories about unnecessary tools and
packages that were created by people unable to RTFM. Would be amused
to hear 'em.
Jon
I started using Unix in ~1977 at UC Santa Barbara. At some point
around then we decided to host a Unix users meeting in the U-Cen
student union building. We asked the facilities people to prepare
a sign pointing to the meeting room.
Imagine my reaction when I walked into the building and saw
the following sign:
"Eunuchs Group Meeting - Room 125"
I don't know if any eunuchs actually showed up.
Jon Forrest
Warner Losh <imp(a)bsdimp.com> kindly corrected my statement that kcc
compiler on the PDP-10 was done by Ken Harrenstien, pointing out that
it was actually begun by Kok Chen (whence, the name kcc).
I've just dug into the source tree for the compiler, and found this
leading paragraph in kcc5.vmshelp (filesystem date of 3-Sep-1988) that
provides proper credits:
>> ...
>> KCC is a compiler for the C language on the PDP-10. It was
>> originally begun by Kok Chen of Stanford University around 1981 (hence
>> the name "KCC"), improved by a number of people at Stanford and Columbia
>> (primarily David Eppstein, KRONJ), and then adopted by Ken Harrenstien
>> and Ian Macky of SRI International as the starting point for what is now
>> a complete and supported implementation of C. KCC implements C as
>> described by the following references:
>>
>> H&S: Harbison and Steele, "C: A Reference Manual",
>> HS1: (1st edition) Prentice-Hall, 1984, ISBN 0-13-110008-4
>> HS2: (2nd edition) Prentice-Hall, 1987, ISBN 0-13-109802-0
>> K&R: Kernighan and Ritchie, "The C Programming Language",
>> Prentice-Hall, 1978, ISBN 0-13-110163-3
>>
>> Currently KCC is only supported for TOPS-20, although there is
>> no reason it cannot be used for other PDP-10 systems or processors.
>> The remaining discussion assumes you are on a TOPS-20 system.
>> ...
I met Ken only once, in his office at SRI, but back in our TOPS-20
days, we had several e-mail contacts.
----------------------------------------
P.S. In these days of multi-million line compilers, it is interesting
to inspect the kcc source code line count:
% find . -name '*.[ch]' | xargs cat | wc -l
80298
A similar check on a 10-Oct-2016 snapshot of the actively-maintained
pcc compiler for Unix systems found 155896 lines.
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: beebe(a)math.utah.edu -
- 155 S 1400 E RM 233 beebe(a)acm.org beebe(a)computer.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
Gentlemen,
Below some additional thoughts on the various observations posted
about this. Note that I was not a contemporary of these developments,
and I may stand corrected on some views.
> I'm pretty sure the two main System V based TCP/IP stacks were STREAMS
> based: the Lachman one (which I ported to the ETA-10 and to SCO Unix)
> and the Mentat one that was done for Sun. The socket API was sort of
> bolted on top of the STREAMS stuff, you could get to the STREAMS stuff
> directly (I think, it's been a long time).
Yes, that is my understanding too. I think it goes back to the two
roots of networking on Unix: the 1974 Spider network at Murray Hill and
the 1975 Arpanet implementation of the UoI.
It would seem that Spider chose to expose the network as a device, whereas
UoI chose to expose it as a kind of pipe. This seems to have continued in
derivative work (Datakit/streams/STREAMS and BBN/BSD sockets respectively).
When these systems were developed networking was mostly over serial lines,
and to use serial drivers was not illogical (i.e. streams->STREAMS). By 1980
fast local area networks were spreading, and the idea to see the network as
a serial device started to suck.
Much of the initial modification work that Joy did on the BBN code was to
make it perform on early ethernet -- it had been designed for 50 kbps arpanet
links. Some of his speed hacks (such as trailing headers) were later
discarded.
Interestingly, Spider was conceived as a fast network (1.5 Mbps); the local
network at Murray Hill operated at that speed, and things were designed to
work over long distance T1 connections as well. This integrated fast LAN/WAN
idea seems to have been abandoned in Datakit. I have a question out to Sandy
Fraser to ask about the origins of this, but have not yet received a reply.
> The sockets stuff was something Joy created to compete with the CMU Accent
> networking system. [...] CMU was developing Accent on the Triple Drip
> PascAlto (aka the Perq) and had a formal networking model that was very clean
> and sexy. There were a lot of people interested in workstations, the Andrew
> project (MIT is about to start Athena etc). So Bill creates the sockets
> interface, and to show that UNIX could be just as modern as Accent.
I've always thought that the Joy/Leffler API was a gradual development of
the UoI/BBN API. The main conceptual change seem to have been support for
multiple network systems (selectable network stack, expansion
of the address space to 14 bytes).
I don't quite see the link to Accent and Wikipedia offers little help here
https://en.wikipedia.org/wiki/Accent_kernel
Could you elaborate on how Accent networking influenced Joy's sockets?
> * There's no reason for
> a separate listen() call (it takes a "backlog" argument but
> in practice everyone defaults it and the kernel does strange
> manipulations on it.)
Perhaps there is. The UoI/BBN API did not have a listen() call;
instead the open() call - if it was for a listening connection - blocked until
a connection occurred. The server process would then fork of a worker process
and re-issue the listening open() call for the next connection. This left a
time gap where the server would not be 'listening'.
The listen() call would create up to 'backlog' connection blocks in the
network code, so that this many clients could connect simultaneously
without user space intervention. Each accept() would hand over a (now
connected) connection block and add a fresh unconnected one to the backlog
list. I think this idea came from Sam Leffler, but perhaps he was inspired
by something else (Accent?, Chaos?)
Of course, this can be done with fewer system calls. The UoI/BBN system
used the open() call, with a pointer to a parameter data block as the 2nd
argument. Perhaps Joy/Leffler were of the opinion that parameter data
blocks were not very Unix-y, and hence spread it out over
socket()/connect()/bind()/listen() instead.
The UoI choice to overload the open() call and not create a new call
(analogous to the pipe() call) was entirely pragmatic: they felt this
was easier for keeping up with the updates coming out of Murray Hill
all the time.
> In particular, I have often thought that it would have been a better
> and more consistent with the philosophy to have it implemented as
> open("/dev/tcp") and so on.
I think this is perhaps an orthogonal topic: how does one map network names
to network addresses. The most ambitious was perhaps the "portal()" system
call contemplated by Joy, but soon abandoned. It may have been implemented
in the early 90's in BSD, but I'm not sure this was fully the same idea.
That said, making the the name mapping a user concern rather than a kernel
concern is indeed a missed opportunity.
Last and least, when feeling argumentative I would claim that connection
strings like "/dev/tcp/host:port" are simply parameter data blocks encoded
in a string :^)
> This also knocks out the need for
> SO_REUSEADDR, because the kernel can tell at the time of
> the call that you are asking to be a server. Either someone
> else already is (error) or you win (success).
Under TCP/IP I'm not sure you can. The protocol specifies that you must
wait for a certain period of time (120 sec, if memory serves my right)
before reusing an address/port combo, so that all in-flight packets have
disappeared from the network. Only if one is sure that this is not an
issue one can use SO_REUSEADDR.
> Also, the profusion of system calls (send, recv, sendmsg, recvmsg,
> recvfrom) is quite unnecessary: at most, one needs the equivalent
> of sendmsg/recvmsg.
Today that would indeed seem to make sense. Back in 1980 there seems
to have been a lot of confusion over message boundaries, even in
stream connections. My understanding is that originally send() and
recv() were intended to communicate a borderless stream, whereas
sendmsg() and recvmsg() were intended to communicate distinct
messages, even if transmitted over a stream protocol.
Paul
> On Sep 23, 2017, at 3:06 PM, Nelson H. F. Beebe <beebe(a)math.utah.edu> wrote:
>
> Not that version, but I have the 4.4BSD-Lite source tree online with
> these files in the path 4.4BSD-Lite/usr/src/usr.bin/uucp:
Thanks, but I have the 44BSD CDs.
> If they look close enough to what you need, I can put
> a bundle online for you.
I'm looking for the seismo/uunet version that Rick hacked on for so many years. It started off as the 4.3BSD version, but grew to embrace the volume of traffic uunet handled in its heyday. It wasn't your daddy's uucico ;-)
--lyndon
Dario Niedermann <dario(a)darioniedermann.it> wrote on Sat, 23 Sep 2017
11:17:04 +0200:
>> I just can't forgive FreeBSD for abandoning the proc filesystem ...
It can be there, if you wish.
Here are two snippets from a recent log of a recent "pkg update -f ;
pkg upgrade" run on a one of my many *BSD family systems, this one
running FreeBSD 11.1-RELEASE-p1:
Message from openjdk8-8.131.11:
======================================================================
This OpenJDK implementation requires fdescfs(5) mounted on
/dev/fd and procfs(5) mounted on /proc.
If you have not done it yet, please do the following:
mount -t fdescfs fdesc /dev/fd mount -t procfs proc
/proc
To make it permanent, you need the following lines in
/etc/fstab:
fdesc /dev/fd fdescfs rw 0 0 proc /proc procfs rw 0 0
======================================================================
Message from rust-1.18.0:
======================================================================
Printing Rust backtraces requires procfs(5) mounted on /proc .
If you have not already done so, please do the following:
mount -t procfs proc /proc
To make it permanent, you need the following lines in /etc/fstab:
proc /proc procfs rw 0 0
======================================================================
I've seen such messages in many package installations in the *BSD
family, and I generally add the suggested lines to /etc/fstab.
Perhaps others more familiar with BSD internals might comment on
whether it is many non-BSD software, like the Java Developer's Kit,
and Mozilla's rust language, that mostly would like /proc support, or
whether there are plenty of native-BSD packages that expect it too.
The second edition of
Marshall Kirk McKusick, George V. Neville-Neil, and Robert N. M. Watson
The Design and Implementation of the FreeBSD Operating System
ISBN 0-201-70245-2 (hardcover), 0-321-96897-2 (hardcover)
has 5 pages with mention of the /proc filesystem, and nothing that
suggests that it is in any way deprecated.
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- University of Utah FAX: +1 801 581 4148 -
- Department of Mathematics, 110 LCB Internet e-mail: beebe(a)math.utah.edu -
- 155 S 1400 E RM 233 beebe(a)acm.org beebe(a)computer.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe/ -
-------------------------------------------------------------------------------
Sadly no longer with us (he exited in 2011), he was forked in 1941. Just
think, if it wasn't for him and Ken, we'd all be running Windoze, and
thinking it's wonderful.
A Unix bigot through and through, I remain,
--
Dave Horsfall DTM (VK2KFU) "Those who don't understand security will suffer."
Tom Ivar Helbekkmo:
Why should anyone need to? Of all the mailing lists I'm on, this one is
the only one that has this problem.
=====
Beware tunnel vision. Another mailing list I'm on has exactly
the same problem, made worse because it's being run by a central
Big Company Mailing List Provider so the rules keep changing under
foot and it's up to the poor-sod list maintainer (who is not a
programmer) to cope.
To bring the focus back to this mailing list, not every program
runs on a little-endian computer with arbitrary word alignment
and pointers that fit in an int.
Norman Wilson
Toronto ON
Does anyone have a copy of Rick's uunet version of the 4.3BSD UUCP source? The disk I had it on seized up, and I can't figure out a fine-grained-enough set of search keywords to find it through a web search :-(
--lyndon
Lyndon Nerenberg:
I really like mk. 8ed was where it first rolled out? I remember
reading about it in the 10ed books. It's a joy to use in Plan 9.
======
Later than that. I was around when Andrew wrote mk, so it
definitely post-dated the 8/e manual.
mk does a number of things better, but to my mind not quite
enough to justify carrying it around. Just as I decided long
ago (once I'd come out of the ivory hothouse of Murray Hill)
that I was best off writing programs that hewed to the ISO C
and POSIX interfaces (and later put some work into bringing
my private copy of post-V10 nearer to the standards), because
that way I didn't have to think much about porting; so I
decided eventually that it is better just to use make.
As with any other language, of course, it's best to use it
in as simple a way as possible. So I don't care much whether
it's gmake or pmake or qmake as long as it implements more
or less the 7/e core subset without breaking anything.
Larry McVoy:
I do wish that some simple make had stuffed a scripting language in there.
Anything, tcl, lua, even (horrors, can't believe I'm saying this) a little
lisp. Or ideally a built in shell compat language. All those backslashes
to make shell scripts work get old.
======
This is something mk got right, and it's actually very simple to do:
every recipe is a shell script. Not a collection of lines handed
one by one to the shell, but a block of text. No backslashes (or
extra semicolons) required for tests. Each script is run with sh -e,
so by default one failed command will abort the rest, which is
usually what one wants; but if you don't want that you just insert
set +e
(So it's not that I dislike mk. Were it available as an easy
add-on package on all modern systems, rather than something I'd
have to carry around and compile, I'd be happy to use it.)
Norman Wilson
Toronto ON
I tried running my own server on mcvoy.com but eventually gave up, the
spam filtering was a non-ending task.
If someone has a plug and chug setup for MX I'd love to try it.
Thanks,
--lm
This question is motivated by the posters for whom FreeBSD is not Unix
enough :-)
Probably the best known contribution of the Berkeley branch of Unix is
the sockets API for IP networking. But today, if for no other reason
than the X/Open group of standards, sockets are the preferred networking
API everywhere, even on true AT&T derived UNIX variants. So they must
have been merged back at some point, or reimplemented. My question is,
when and how did that happen?
And if there isn't a simple answer because it happened at different
times and in different ways for each variant, all the better :-)
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
Do obvious transformation on domain to reply privately _only_ on Usenet.
I run my own mail server, on systems in my basement.
It is a setup that no one in their right mind would
replicate, but the details may actually be proper for
this list.
A firewall/gateway system runs a custom SMTP server,
which can do simple filtering based on the SMTP envelope,
SMTP commands, calling IP address and hostname. It is
also able to call external commands to pass judgement on
a caller or a particular message.
If mail is accepted, it is passed through a simple
MTA and a stupidly-simple queueing setup (the latter
made of shell scripts) to be sent via SMTP to a
different internal system, which uses the same SMTP
server and MTA to deliver to local mailboxes.
Outbound mail is more or less the obvious inverse.
I have put off naming names for dramatic effect. The
two systems in question are MicroVAX IIIs running
my somewhat-hacked-up version of post-10/e Research
UNIX. The MTA is early-1990s-vintage upas. The SMTP
server, SMTP sender, and queuing stuff are my own.
I wrote the SMTP server originally not long after I left
Bell Labs; I was now in a world where sendmail was the
least-troublesome MTA, but in those days every month
brought news of a new sendmail vulnerability, so I wrote
my own simple server to act as a condom. Over time it
grew a bit, as I became interested in problems like
what sorts of breakin attempts are there in real life
(back then one received occasional DEBUG or WIZ commands,
but I haven't seen any since the turn of the century);
what sorts of simple filtering at the SMTP level will
get rid of most junk mail. The code is more complicated
than it used to be, but is still small enough that I am
reasonably confident that it is safe to expose to the
network.
The SMTP sender and the queueing scripts came later,
when I decided to host my own mail. Both were designed
in too much of a hurry.
There is no official spam filtering (no bogofilter or
the like). A few simple rules that really just enforce
aspects of the SMTP standard seem to catch most junk
callers: HELO argument must contain at least one . (standard
says it must be your FQDN) and must not be *.* (I see dozens
of those every day!); sender must not speak until my server
has issued a complete greeting (I follow Wietse Venema in
this: send a line with a continuation marker first, then
sleep five seconds or so, then send a finish). I also
have a very simple, naive greylisting implementation that
wouldn't work well for a site with lots of users, but is
fine for my personal traffic. The greylisting is implemented
with a pair of external shell scripts.
I have had it in mind for a long time to consult the Spamhaus
XBL too. It would be easy enough to do with another plug-in
shell script. There are stupid reasons having to do with my
current DNS setup that make that impractical for now.
The mail setup works, but is showing its age, as is the
use of Research UNIX and such old, slow hardware as a network
gateway. One of these years, when I have the time, I'd like
first to redo the mail setup so that mailboxes are stored
on my central file server (a Sun X2200 running Solaris 10,
or perhaps something illumos-based by the time I actually
do all this); then set up a new gateway, probably based on
OpenBSD. Perhaps I should calculate how much hardware I
could buy from the power savings of turning off just one of
the two MicroVAXes for a year.
I have yet to see an MTA that is spare enough for my taste,
but the old upas code just doesn't quite do what I want any
more, and is too messy to port around. (Pursuant to the
conversation earlier here about autoconf: these days I try
to need no configuration magic at all, which works as long
as I stick to ISO C and POSIX and am careful about networking.
upas was written in messier days.) At the moment I'm leaning
toward qmail, just because for other reasons I'm familiar with
it, though for my personal use I will want to make a few changes
here and there. But I'll want to keep my SMTP server because
I am still interested in what goes on there.
Norman Wilson
Toronto ON
> When you say MIT you think about ITS and Lisp. That is why emacs IMHO
> was against UNIX ideals. RMS was thinking in different terms than Bell
> Labs hackers.
Very different. Once, when visiting the Lisp machine, I saw astonishingly
irrelevant things being done as first class emacs commands, and asked
how many commands there were. The instant answer was to have emacs
print the list. Nice, but it scrolled way beyond one screenful. I
persisted: could the machine count them? It took several minutes of
head-scratching and false starts to do a task that was second nature
to Unix hands.
With hindsight, I realize that the thousand emacs commands were but a
foretaste of open-source exuberance--witness this snippet from Linux:
!ls /usr/share/man/man2|wc
468 468 6766
Even a "kernel" is as efflorescent as a tropical rainforest.
On Tue, Sep 19, 2017, at 10:42, Larry McVoy wrote:
> slib.c:1653 (bk-7.3): open failed: permission denied
>
> which is way way way more useful than just permission denied.
Random832 replied:
Well. It's less useful in one way - it doesn't say what file it was
trying to open. You could pass the filename *instead* of "open failed",
but that still omits the issue I had pointed out: what were you trying
to open the file for (at the very least, were you trying to read, write,
or exec it). Ideally the function would have a format and arguments.
====
Exactly.
The string interpretation of errno is just another
item of data that goes in an error message. There is
no fixed place it belongs, and it doesn't always
belong there, because all that is error does not
fail from a syscall (or library routine).
I do often insert a function of the form
void errmsg(char *, ...)
in my C programs. It takes printf-like arguments.
Normally they just get passed to vfprintf(stderr, ...),
though sometimes there is something more esoteric,
and often fprintf(stderr, "%s: ", progname) ends up
in front.
But errmsg never knows anything about errno. Why
should it? It's supposed to send complaints to
a standard place; it's not supposed to invent the
complaints for itself! If an errno is involved,
I write something like
errmsg("%s: cannot open: %s", filename, strerror(errno));
(Oh, yes, errmsg appends a newline too. The idea
is to avoid cluttering code with minutiae of how
errors are reported.)
I don't print the source code filename or line number
except for `this shouldn't have happened' errors.
For routine events like the user gave the wrong
filename or it had the wrong permissions or his
data are malformed, pointers to the source code are
just unhelpful clutter, like the complicated
%JARGON-OBSCURE-ABBREVIATION prefixes that accompanied
every official error message in VMS.
Of course, if the user's data are malformed, he
should be told which file has the problem and
where in the file. But that's different from
telling him that line 193 of some file he doesn't
have and will probably never see contains the system
call that reported that he typed the wrong filename.
Norman Wilson
Toronto ON
I received a private request for info on my Postfix config. I'm happy to
post to list.
This is the interesting bit:
https://pastebin.com/tNceD6zM
Running under Debian 8, soon to be upgraded to Debian 9.
Postgrey is listening on TCP/10023.
As an aside I just saw this in my mail queue:
# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
2182087EA 1618 Thu Sep 21 10:41:07 robert(a)timetraveller.org
(host aneurin.horsfall.org[110.141.193.233] said: 550 5.7.1
<dave(a)horsfall.org>... No reporting address for linode.com; see RFC 2142
(in reply to RCPT TO command))
dave(a)horsfall.org
That is aggressive standards compliance ;)
Rob