Email with sneakermail
Sneakermail is a sneakernet app that transmits emails over sneakernet. You can have any number of sneakermail addresses as name@your public key.alt. For example, Drew’s sneakermail address is drew@ytck2bv0ecrdsacknvky4w0aw3sh75erb8zcr4xd67wz4rrnc2gg.alt.
Bonus: Sneakermail provides authenticity and encryption for all emails without PGP ✨
Configuration
To configure sneakermail, first enable it in ~/.config/sneaker/config.ini to process org.sneakernet.mail application messages by adding the following:
[org.sneakernet.mail]
cmd=snprocmail
Note: sneakerd must be restarted for this change to take effect.
Create ~/.config/sneaker/mail.ini to configure delivery of messages to local mailboxes:
[user@your public key.alt]
maildir=~/.local/share/sneaker/mail/INBOX
# Repeat for any number of addresses you desire
Proceed to configure your email client as necessary. For advice on configuring common MUAs, see the list on the sidebar.
sendmail
Sneakermail includes a sendmail-compatible command for delivering emails via sneakernet. Simply configure your mail client to use snsendmail as the sendmail command. This is the simplest outgoing mail configuration and is recommended for any mail client that supports sendmail.
SMTP
For clients which do not support sendmail, sneakernet provides a simple SMTP server. Run the snsmtpd command to run the SMTP server (ideally with a user service manager, if available, such as OpenRC or systemd user services), then configure your mail client with the following parameters:
- Protocol: SMTP
- Hostname: localhost
- Port: 5587 (or whatever you configured in mail.ini)
- Authentication: None
- Encryption (SSL/TLS/STARTTLS): None
You can configure the SMTP port by adding the following to mail.ini:
[smtpd]
smtp-port=5587
IMAP
Sneakermail does not provide its own solution for IMAP. However, if your preferred mail client does not support Maildir, you can hack Dovecot for this purpose.
Running Dovecot with dovecot -c dovecot.conf -F and the following configuration file will suffice. Read the configuration and modify it to suit your needs before use.
dovecot_config_version = 2.4.0
dovecot_storage_version = 2.4.0
state_dir = /tmp/dovecot/state
base_dir = /tmp/dovecot/base
log_path = /dev/stdout
mail_driver = maildir
mail_path = ~/.local/share/sneakermail/%{user | username}
mail_inbox_path = INBOX
mailbox_list_layout = fs
# Update these to your Unix account name and group:
default_internal_user = YOUR USERNAME
default_internal_group = YOUR GROUP
default_login_user = YOUR USERNAME
protocols {
imap = yes
}
service anvil {
chroot =
}
service imap-login {
chroot =
}
service pop3-login {
chroot =
}
listen = 127.0.0.1
ssl = no
auth_allow_cleartext = yes
auth_mechanisms = plain login
namespace inbox {
separator = /
inbox = yes
}
service imap-login {
inet_listener imap {
listen = 127.0.0.1
port = 1143
}
inet_listener imaps {
port = 0
}
}
userdb passwd {
}
passdb static {
fields {
nopassword = yes
}
}
Configure your email client as follows:
- Protocol: IMAP
- Hostname: localhost
- Port: 1143
- Authentication: User Unix username and no/any password
- Encryption (SSL/TLS/STARTTLS): None