Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 8dd2dd58354f3fec2a948c3a007fc7fdb0ae6c73
parent c4a97ff4309d634e1e21758cff17820704250dd3
Author: Leah Neukirchen <leah@vuxu.org>
Date:   Tue, 20 Jun 2017 14:17:24 +0200

mmkdir: make official command

GNUmakefile | 2+-
contrib/mmkdir | 9---------
man/mblaze.7 | 4+++-
man/mmkdir.1 | 40++++++++++++++++++++++++++++++++++++++++
mmkdir | 9+++++++++
5 files changed, 53 insertions(+), 11 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile @@ -18,7 +18,7 @@ BINDIR=$(PREFIX)/bin MANDIR=$(PREFIX)/share/man ALL = maddr magrep mdate mdeliver mdirs mexport mflag mgenmid mhdr minc mlist mmime mpick mscan msed mseq mshow msort mthread -SCRIPT = mcolor mcom mless mquote museragent +SCRIPT = mcolor mcom mless mmkdir mquote museragent all: $(ALL) museragent diff --git a/contrib/mmkdir b/contrib/mmkdir @@ -1,9 +0,0 @@ -#!/bin/sh -# mmkdir DIRS... - create new maildirs - -r=0 -for dir; do - mkdir -p -m 0700 $dir/cur $dir/new $dir/tmp || r=1 -done - -exit $r diff --git a/man/mblaze.7 b/man/mblaze.7 @@ -25,7 +25,7 @@ to write and send mail .It Xr mdeliver 1 to deliver messages or import mailboxes .It Xr mdirs 1 -to find Maildirs +to find Maildir .It Xr mexport 1 to export mailboxes .It Xr mflag 1 @@ -43,6 +43,8 @@ to conveniently read mail in to list and filter mail messages .It Xr mmime 1 to create MIME messages +.It Xr mmkdir 1 +to create new Maildir .It Xr mpick 1 to filter mail .It Xr mrep 1 diff --git a/man/mmkdir.1 b/man/mmkdir.1 @@ -0,0 +1,40 @@ +.Dd June 20, 2017 +.Dt MMKDIR 1 +.Os +.Sh NAME +.Nm mmkdir +.Nd create new Maildir +.Sh SYNOPSIS +.Nm +.Ar dirs\ ... +.Sh DESCRIPTION +.Nm +creates new Maildir. +.Pp +Parent directories are created as needed, and creating existing +Maildir is no error. +.Pp +New Maildir are created with permission 0700, i.e. +only readable and writable by the owner. +.Sh EXIT STATUS +.Ex -std +.Sh SEE ALSO +.Xr mkdir 1 +.Pp +.Lk https://cr.yp.to/proto/maildir.html "Using maildir format" +.Sh AUTHORS +.An Leah Neukirchen Aq Mt leah@vuxu.org +.Sh CAVEATS +.Nm +does not support Maildir++, +you need to transform nested Maildir++ folder names yourself. +.Sh LICENSE +.Nm +is in the public domain. +.Pp +To the extent possible under law, +the creator of this work +has waived all copyright and related or +neighboring rights to this work. +.Pp +.Lk http://creativecommons.org/publicdomain/zero/1.0/ diff --git a/mmkdir b/mmkdir @@ -0,0 +1,9 @@ +#!/bin/sh +# mmkdir DIRS... - create new maildirs + +r=0 +for dir; do + mkdir -p -m 0700 $dir/cur $dir/new $dir/tmp || r=1 +done + +exit $r