shithub: rc

Download patch

ref: ab56f96c115e380768bb57e091155d35381ec20c
parent: c6d76c84ced203089e18cb1d9d3cac63170a62f7
author: sl <sl@x1yg3>
date: Sun Jul 6 18:46:05 EDT 2025

add mlchmod

--- a/INDEX
+++ b/INDEX
@@ -35,6 +35,7 @@
 mkfile - $home/mkfile
 mkufont - Borrow from other fonts to create unicode.font (by cinap_lenrek)
 ml - Print commands to search or read mailing list archives.
+mlchmod - chmod mailing list messages so they can be read by remote 9p users.
 n700 - Set preferred X11 mouse acceleration for Lenovo N700 wireless mouse.
 nauth - rcpu to or rimport from auth.inri.net
 nn - run webcookies/webfs, populate factotum from secstore, perform some binds, run plumber.
--- /dev/null
+++ b/mlchmod
@@ -1,0 +1,13 @@
+#!/bin/rc
+# chmod mailing list messages so they can be read by remote 9p users.
+rfork en
+if(! test -f /mail/box/$1/index)
+	>/mail/box/$1/index
+chmod +t /mail/box/$1/index
+if(! test -d /mail/box/$1/mbox)
+	exit
+builtin cd /mail/box/$1/mbox
+for(i in `{ls -l  | grep -v 'rw-rw-r' | awk '{print $10}'}){
+	echo $i
+	chmod +r $i
+}
--