Reading unix mailbox with plan9port

56 views
Skip to first unread message

Fernando

unread,
Apr 22, 2024, 5:33:04 PMApr 22
to plan9port-dev
Hello all,

I am trying to use plan9port's mail utilities to read unix mailboxes
stored locally on my OpenBSD machine. The file $PLAN9/mail/README
says:

To run mail you need to do at least the following:

cd $PLAN9/src/cmd/upas; mk install
cd $PLAN9/log; chmod 666 smtp smtp.debug smtp.fail mail >smtp >smtp.debug >smtp.fail >mail
chmod 777 $PLAN9/mail/queue

I was able to run mk install in $PLAN9/src/cmd/upas, but there was no
$PLAN9/log directory in my tree or $PLAN9/mail/queue so I had to
manually create those.

I tried to parse the unix mailbox in my home directory, mbox, using
Mail in acme (Mail on OpenBSD is berkeley mailx so use 9 Mail). The
file $PLAN9/src/cmd/acme/mail/readme says:

Mail uses upas/fs to access the mail box.  By default it reads "mbox",
the standard user mail box.  If Mail is given an argument, it is
passed to upas/fs as the name of the mail box (or upas/fs directory)
to open.

When I try to run 9 Mail or 9 Mail /path/to/mbox:

Mail: cannot mount mail: dial unix!/tmp/ns.fr3.:0/mail: connect /tmp/ns.fr3.:0/mail: No such file or directory
9: exit 1

The path /tmp/ns.fr3.:0/mail does not exist.

$ ls -l /tmp/ns.fr3.:0/

S-rwxr-xr-x M 0 fr3 wheel 0 Apr 22 11:23 /tmp/ns.fr3.:0/acme
S-rwxr-xr-x M 0 fr3 wheel 0 Apr 22 10:47 /tmp/ns.fr3.:0/factotum
S-rwxr-xr-x M 0 fr3 wheel 0 Apr 22 10:18 /tmp/ns.fr3.:0/plumb

There is a process running for factotum and plumber, but not for mail

$ ps

  PID TT  STAT        TIME COMMAND
10374 p0- I        0:00.05 plumber
83170 p0- I        0:00.33 9pserve -u unix!/tmp/ns.fr3.:0/plumb
13345 p0- I        0:00.01 factotum
66605 p0- I        0:00.03 9pserve -u unix!/tmp/ns.fr3.:0/factotum
39639 p0  Sp       0:00.02 ksh

I do not know what service the error from acme Mail is reporting
about. There are no manpages on plan9port for any of the mail programs
provided in $PLAN9/src/cmd/upas and I don't know how to program so I
can't refer to the source code either. There are of course the
original plan 9 man pages but I believe this error is specific to p9p
because of the way it attempted to implement plan 9 namespaces. I
would be thankful for any help on how to proceed from here.

Sincerely,
Fernando

Jacob Vosmaer

unread,
Apr 22, 2024, 6:10:51 PMApr 22
to fernandor...@gmail.com, plan9port-dev
I had plan9port mail working for a while (reading and answering my work mails with ned!) but it got old. I haven't used it in ages.

Looking at my scripts from back then, I was spawning a mailfs process. That is probably the 9p filesystem Mail is failing to connect to in your case. I don't remember how I installed it because it does not seem to get compiled by default. The source of mailfs is in src/cmd/upas/nfs.



Op ma 22 apr 2024 om 23:33 schreef Fernando <fernandor...@gmail.com>:
--

---
You received this message because you are subscribed to the Google Groups "plan9port-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plan9port-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plan9port-dev/ed6f7894-48a4-40f1-826b-40015de26a99n%40googlegroups.com.

Jacob Vosmaer

unread,
Apr 22, 2024, 6:12:55 PMApr 22
to fernandor...@gmail.com, plan9port-dev
In src/cmd/mkfile, there is a variable called BUGGERED which disables compilation of a bunch of things. mailfs is in there. If you remove it from BUGGERED, it should get compiled.

Op di 23 apr 2024 om 00:10 schreef Jacob Vosmaer <con...@jacobvosmaer.nl>:
Reply all
Reply to author
Forward
0 new messages