Como não encontrei um programa pequeno e existente, decidi escrever o meu próprio. Originalmente, eu inventei:
#!/bin/bash
# Simple sendmail
# filename per spec at http://cr.yp.to/proto/maildir.html
rand=$((RANDOM % 1000))
msgname=$(date +%s).P$$R$rand.$(hostname | tr '/:' '72')
# Safety measure: do not overwrite existing mail
set -o noclobber
cat > ~peter/".local/share/local-mail/inbox/new/$msgname"
Isso funcionou ... exceto se o usuário que está executando o script não for "peter". O sucessor dessa idéia é um "pequeno" programa C, femtomail . A partir do seu README:
femtomail - minimal MDA with Maildir support
femtomail is a minimal Mail Delivery Agent (MDA) for local mail. Mail is accepted from standard input and placed in a Maildir box of a user. This software is intended for use on a single-user machine.
Remote delivery, daemonizing, sender verification, etc. is not implemented and won't be implemented due to its complexity. femtomail is not written because mail software did not exist, but because existing software were too large for the simple task of delivering cron mail to the local user.
The workflow of femtomail:
- Change the process user and group.
- Create a new file with a unique filename in the mail directory.
- Write a
Received
header to the file.- Pass data from standard input to the file.
- Exit.
O código-fonte e as instruções de instalação estão disponíveis no link .