ソースを参照

You can't wrap up the wind or tie down the shadow.

Signed-off-by: Aoi Koizumi <novaburst@kalli.st>
galaxy
コミット
8eb01602d5
  1. 10
      COPYING
  2. 12
      Makefile
  3. 4
      README
  4. 14
      bin/curl-mailer
  5. 28
      bin/rin
  6. 2
      config.mk
  7. 7
      etc/curl-mailer.example
  8. 25
      man/curl-mailer.1
  9. 27
      man/rin.1

10
COPYING

@ -0,0 +1,10 @@
Discordian Public License (DPL)
All Rights Reversed Ⓚ 3188 Aoi Koizumi <novaburst@kalli.st>, Sir Six <jan6@tilde.cafe>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

12
Makefile

@ -0,0 +1,12 @@
include config.mk
install:
install -m 0755 bin/curl-mailer ${DESTDIR}${PREFIX}/bin/curl-mailer
install -m 0755 bin/rin ${DESTDIR}${PREFIX}/bin/rin
install -m 0644 man/curl-mailer.1 ${DESTDIR}${MANDIR}/man1/curl-mailer.1
install -m 0644 man/rin.1 ${DESTDIR}${MANDIR}/man1/rin.1
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/curl-mailer
rm -f ${DESTDIR}${PREFIX}/bin/rin
rm -f ${DESTDIR}${MANDIR}/man1/curl-mailer.1
rm -f ${DESTDIR}${MANDIR}/man1/rin.1

4
README

@ -0,0 +1,4 @@
mailutils
=========
Tiny e-mail utilities written in posix shell

14
bin/curl-mailer

@ -0,0 +1,14 @@
#!/bin/sh
# curl-mailer(1)
# Based on jan6's script.
# Dependencies: curl(1)
# Source configuration file
. ${HOME}/.curl-mailer
curl --crlf \
--mail-auth "$from" \
--mail-from "$from" \
--mail-rcpt "$@" \
--upload-file /dev/stdin \
--ssl-reqd "smtps://$user:$pass@$host"

28
bin/rin

@ -0,0 +1,28 @@
#!/bin/sh
fn_clean() {
find "$2"/cur -type f -print -delete
}
fn_fetch() {
fdm -a "$2" fetch
}
fn_list() {
minc -q "$2"
mlist -s "$2" | msort -dr | mthread -r | mseq -S | mscan
}
fn_read() {
mless "$2"
}
fn_usage() {
printf "Usage: \n"
printf "%s [ clean | compose | fetch | list | read ] \n" "${0##*/}"
}
case $1 in
clean | -c) fn_clean "$@" ;;
compose | -w) mcom ;;
fetch | -f) fn_fetch "$@" ;;
list | -l) fn_list "$@" ;;
read | -r) fn_read "$@" ;;
*) fn_usage ;;
esac

2
config.mk

@ -0,0 +1,2 @@
PREFIX=/usr/local
MANDIR=${PREFIX}/share/man

7
etc/curl-mailer.example

@ -0,0 +1,7 @@
# curl-mailer(1)
# Place this file as ~/.curl-mailer and update accordingly
from=
host=
user=$(echo "$from" | cut -d @ -f 1 | cut -d + -f 1)
pass=

25
man/curl-mailer.1

@ -0,0 +1,25 @@
.Dd April 21, 2022
.Dt CURL-MAILER 1
.Os
.Sh NAME
.Nm curl-mailer
.Nd Rather stupid MTA which uses curl
.Sh SYNOPSIS
cat
.Ar |
.Nm
.Ar example@example.com
.Sh DESCRIPTION
A script which pretends to be a mail transfer agent.
It's not suitable for daily usage, instead you should
consider
.Xr msmtp 1
or
.Xr dma 8
for a superior experience.
.Sh AUTHORS
Original script by
.An jan6 Aq https://jan6.ttm.sh/rwrs/
.Pp
Rewritten by
.An Aoi Koizumi Aq Mt novaburst@kalli.st

27
man/rin.1

@ -0,0 +1,27 @@
.Dd April 21, 2022
.Dt RIN 1
.Os
.Sh NAME
.Nm rin
.Nd E-mail assistant
.Sh DESCRIPTION
My personal E-mail assistant
.Sh USAGE
.Bl -tag -width 11n -compact
.It clean, -c
Clean up a maildir
.It compose, -w
Compose an email
.It fetch, -f
Download mail from the server and store it on a maildir
.It list, -l
List the contents of a maildir
.It read, -r
Read a mail
.El
.Sh SEE ALSO
.Xr fdm 1
.Xr mblaze 7
.Xr msmtp 1
.Sh AUTHORS
.An Aoi Koizumi Aq Mt novaburst@kalli.st
読み込み中…
キャンセル
保存