summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGab Virebent <noreply@virebent.art>2026-05-26 00:06:05 +0200
committerGab Virebent <noreply@virebent.art>2026-05-26 00:06:05 +0200
commit507ca3a7e3f2d72e583bb26d6817f7deee9188ec (patch)
tree76827026924649ac1d970a48834e3c252b44b068
parent847759f50596b0d992085aa34d7b5b78057aa7ce (diff)
downloadneomutt-config-507ca3a7e3f2d72e583bb26d6817f7deee9188ec.tar.gz
neomutt-config-507ca3a7e3f2d72e583bb26d6817f7deee9188ec.tar.xz
neomutt-config-507ca3a7e3f2d72e583bb26d6817f7deee9188ec.zip
update: real mail2news config with virebent.art onion addresses, add Tor profile and posting script
- accounts/mail2news: real onion SMTP endpoint, ephemeral nobody@virebent.invalid From - scripts/m2n-prompt.sh: working interactive posting script (swaks + torsocks) - neomuttrc.tor: Tor profile sourcing mail2news account, F9 macro binding - neomuttrc.common: shared UI/GPG/sidebar base config - README: rewritten in English, documents actual setup and gateway address
-rw-r--r--README.md217
-rw-r--r--accounts/mail2news36
-rw-r--r--neomuttrc.common117
-rw-r--r--neomuttrc.tor14
-rw-r--r--scripts/m2n-prompt.sh82
5 files changed, 302 insertions, 164 deletions
diff --git a/README.md b/README.md
index 249985e..220989b 100644
--- a/README.md
+++ b/README.md
@@ -1,191 +1,132 @@
# neomutt-config
-Privacy-focused NeoMutt configuration with:
-- Multi-account support (IMAP/SMTP)
-- GPG/ECC signing on all accounts
-- **Mail2news via Tor** — post to Usenet anonymously through a `.onion` SMTP gateway
-- Cyberpunk color theme
-- `pass`(1) integration for credential management (no plaintext passwords)
+Privacy-focused NeoMutt configuration with multi-account support and anonymous Usenet posting via a mail2news gateway over Tor.
----
-
-## Requirements
-
-| Package | Purpose |
-|--------------|----------------------------------|
-| `neomutt` | MUA |
-| `gpg` | Signing/encryption |
-| `pass` | Password storage |
-| `torsocks` | Tor proxy for mail2news |
-| `netcat` | SMTP raw send (openbsd-netcat) |
-| `tor` | Tor daemon |
-| `vim` | Composing messages |
-| `lynx` | HTML email rendering in terminal |
-| `pandoc` | Markdown → HTML compose (opt.) |
+Full write-up: [Posting to Usenet Anonymously with NeoMutt and Mail2News over Tor](https://www.virebent.art/blog/)
---
-## Installation
-
-```bash
-git clone https://github.com/YOUR_USERNAME/neomutt-config
-cd neomutt-config
+## Features
-# Copia i file di configurazione
-mkdir -p ~/.config/neomutt/accounts
-cp neomuttrc ~/.config/neomutt/neomuttrc # oppure ~/.neomuttrc
-cp colors.mutt ~/.config/neomutt/colors.mutt
-cp mailcap ~/.config/neomutt/mailcap
-cp accounts/* ~/.config/neomutt/accounts/
-cp scripts/m2n-post.sh ~/.config/neomutt/m2n-post.sh
-chmod +x ~/.config/neomutt/m2n-post.sh
-
-# Cache per header/body IMAP
-mkdir -p ~/.cache/neomutt/{headers,bodies}
-```
+- Multi-account IMAP/SMTP (STARTTLS, port 143/587)
+- **Mail2news via Tor** — post to Usenet through a `.onion` SMTP gateway, no IP exposed
+- F9 macro → interactive post script (newsgroup, subject, editor, review, send)
+- Ephemeral `.invalid` From address — not traceable, not replyable
+- No IMAP for the mail2news account — send-only
---
-## Setup account email
-
-Ogni account ha un file in `~/.config/neomutt/accounts/`. Modifica i valori:
-
-```
-set from = "user@example.com"
-set imap_user = "user@example.com"
-set folder = "imap://mail.example.com:143"
-set smtp_url = "smtp://user%40example.com@mail.example.com:587"
-```
-
-### Password con `pass`
+## Requirements
-Usa [pass](https://www.passwordstore.org/) per non avere password in chiaro:
+| Package | Purpose |
+|------------|-------------------------------|
+| `neomutt` | MUA |
+| `tor` | Tor daemon (127.0.0.1:9050) |
+| `torsocks` | Tor proxy wrapper |
+| `swaks` | SMTP test/send tool |
+| `vim` | Message editor |
+On Arch:
```bash
-pass insert email/account1
+pacman -S neomutt tor torsocks swaks
```
-Nel file account:
-```
-set imap_pass = "`pass email/account1`"
-set smtp_pass = "`pass email/account1`"
+On Debian/Ubuntu:
+```bash
+apt install neomutt tor torsocks swaks
```
---
-## Generare una chiave ECC (Ed25519) con GPG
+## Installation
```bash
-gpg --full-generate-key
-# → scegli: (9) ECC (sign and encrypt) oppure (10) ECC (sign only)
-# → curva: Ed25519
-# → scadenza: a tua scelta (consigliato: 1-2 anni)
-# → nome e indirizzo
-
-# Mostra il fingerprint
-gpg --list-secret-keys --keyid-format LONG
-
-# Esempio output:
-# sec ed25519/AABBCCDDEEFF0011 2024-01-01
-# Key fingerprint = AABB CCDD EEFF 0011 ...
-# uid Your Name <user@example.com>
+git clone https://git.gabrielesalati.eu/gabrielesalati/neomutt-config
+cd neomutt-config
+
+mkdir -p ~/.config/neomutt/accounts
+cp neomuttrc.common ~/.config/neomutt/neomuttrc.common
+cp neomuttrc.tor ~/.config/neomutt/neomuttrc.tor
+cp colors.mutt ~/.config/neomutt/colors.mutt
+cp mailcap ~/.config/neomutt/mailcap
+cp accounts/mail2news ~/.config/neomutt/accounts/mail2news
+cp scripts/m2n-prompt.sh ~/.config/neomutt/m2n-prompt.sh
+chmod +x ~/.config/neomutt/m2n-prompt.sh
```
-Copia il fingerprint (es. `AABBCCDDEEFF0011`) nel campo `pgp_default_key` e `pgp_sign_as` del file account.
+---
-### Chiave dedicata per mail2news
+## Mail2news usage
-Si consiglia una chiave separata per i post Usenet, non legata alla propria identità email:
+Start Tor, then launch NeoMutt through the Tor profile:
```bash
-gpg --full-generate-key
-# → usa un nome/email non riconducibile a te (es. "Anonymous <anon@anonymous.invalid>")
+torsocks neomutt -F ~/.config/neomutt/neomuttrc.tor
```
-Aggiorna `FINGERPRINT_CHIAVE_ECC_MAIL2NEWS` in `accounts/mail2news` e in `scripts/m2n-post.sh`.
+Press **F9** from the index or pager. Answer the prompts:
----
-
-## Mail2news via Tor
+```
+Newsgroup(s): misc.test
+Subject: test post
+```
-Il sistema mail2news permette di inviare post Usenet attraverso un gateway SMTP `.onion`, senza rivelare il proprio IP.
+Write your message in the editor, review the draft, send.
-### Configurazione
+The post goes to `mail2news@xilb7y4kj6u6qfo45o3yk2kilfv54ffukzei3puonuqlncy7cn2afwyd.onion`,
+which forwards to Peanny NNTP and propagates from there.
-1. Avvia il daemon Tor
-2. Modifica `scripts/m2n-post.sh` con i tuoi valori:
+### Send directly from the shell (no NeoMutt)
```bash
-SMTP_ONION="INDIRIZZO.onion" # server mail2news .onion
-SMTP_PORT="25"
-MAIL2NEWS_TO="mail2news@INDIRIZZO.onion"
-FROM_ADDR="anon@anonymous.invalid"
-GPG_KEY="FINGERPRINT_CHIAVE_ECC_MAIL2NEWS"
+torsocks swaks \
+ --server xilb7y4kj6u6qfo45o3yk2kilfv54ffukzei3puonuqlncy7cn2afwyd.onion:25 \
+ --from nobody@virebent.invalid \
+ --to mail2news@xilb7y4kj6u6qfo45o3yk2kilfv54ffukzei3puonuqlncy7cn2afwyd.onion \
+ --header "Newsgroups: misc.test" \
+ --header "Subject: test post" \
+ --body "This is a test."
```
-3. In NeoMutt premi **F9** per aprire lo script interattivo
+---
-### Flusso del post
+## File layout
```
-F9 → Newsgroup → Subject → [References se Re:] → vim → Revisione → Invio
+~/.config/neomutt/
+├── neomuttrc # main profile (clearnet accounts)
+├── neomuttrc.common # shared UI/GPG/sidebar settings
+├── neomuttrc.tor # Tor profile — sources mail2news account, F9 macro
+├── colors.mutt # color theme
+├── mailcap # MIME handlers
+├── m2n-prompt.sh # mail2news posting script (called by F9)
+└── accounts/
+ ├── account1 # example IMAP/SMTP account
+ ├── account2
+ ├── account3
+ └── mail2news # send-only, onion SMTP, ephemeral From
```
-Il messaggio viene firmato con GPG/ECC prima dell'invio (clearsign inline, compatibile con i lettori Usenet).
-
-### Server mail2news noti su Tor
-
-Cerca gateway mail2news pubblici su Tor in:
-- gruppi `alt.privacy`, `alt.anonymous.messages`
-- [Tor hidden services directories]
-
---
## Keybindings
-| Tasto | Azione |
-|-------|-------------------------------|
-| F2 | Account 1 |
-| F3 | Account 2 |
-| F4 | Account 3 |
-| F9 | Nuovo post mail2news |
-| B | Toggle sidebar |
-| Ctrl+P / Ctrl+N | Sidebar su/giù |
-| j/k | Navigazione vim-like |
-| r/R | Reply / Reply-all |
-| p | Menu GPG in composizione |
+| Key | Action |
+|-------|-------------------------|
+| F2 | Switch to account 1 |
+| F3 | Switch to account 2 |
+| F4 | Switch to account 3 |
+| F9 | Post to Usenet |
+| B | Toggle sidebar |
---
-## Account FOG SMTP
-
-FOG è un relay SMTP custom raggiungibile via Tor (`.onion`). Se usi il tuo server:
+## Gateway address
-```
-set smtp_url = "smtp://YOUR_FOG_ONION.onion:25"
-set ssl_starttls = no
-set ssl_force_tls = no
-```
-
-Assicurati di avviare `torsocks` prima di NeoMutt oppure configura un proxy SOCKS5:
+The mail2news gateway on `virebent.art` accepts unauthenticated SMTP on port 25
+and forwards to Peanny NNTP over Tor. No registration required.
-```bash
-torsocks neomutt
```
-
----
-
-## Struttura file
-
-```
-~/.config/neomutt/
-├── neomuttrc # configurazione principale
-├── colors.mutt # tema cyberpunk
-├── mailcap # handler MIME
-├── m2n-post.sh # script mail2news
-└── accounts/
- ├── account1 # account email 1
- ├── account2 # account email 2
- ├── account3 # account con FOG SMTP
- └── mail2news # mittente fisso per Usenet
+SMTP/mail2news onion:
+xilb7y4kj6u6qfo45o3yk2kilfv54ffukzei3puonuqlncy7cn2afwyd.onion
```
diff --git a/accounts/mail2news b/accounts/mail2news
index e3be1e7..9fa485e 100644
--- a/accounts/mail2news
+++ b/accounts/mail2news
@@ -1,36 +1,20 @@
-# Account: mail2news (solo SMTP via Tor, nessun IMAP)
-#
-# Questo account usa un indirizzo fisso (mittente anonimo) e una chiave ECC dedicata
-# per firmare tutti i post Usenet inviati via mail2news.
-#
-# Il server SMTP è raggiungibile solo via Tor (.onion) — nessuna connessione clearnet.
-# Il "From" viene settato qui e usato dallo script m2n-post.sh
+# ~/.config/neomutt/accounts/mail2news
+# Send-only account — mail2news gateway via Tor onion SMTP
-# Mittente fisso per tutti i post mail2news
-# Usa un indirizzo .invalid per non rivelare email reale
-set from = "anon@anonymous.invalid"
-set realname = "Anonymous"
+# Ephemeral From — .invalid domain cannot be traced or replied to
+set from = "nobody@virebent.invalid"
+set realname = "anonymous"
-# Nessun IMAP - solo invio
-set folder = ""
+# No inbox — send only
+set folder = ""
set spoolfile = ""
-# SMTP via Tor (.onion) — mail2news server onion
-# Sostituisci con l'indirizzo .onion del tuo server mail2news preferito
-# Esempio noto: mail2news pubblico su Tor
-set smtp_url = "smtp://MAIL2NEWS_ONION_ADDRESS.onion:25"
+# SMTP via Tor hidden service — virebent.art mail2news onion relay
+set smtp_url = "smtp://xilb7y4kj6u6qfo45o3yk2kilfv54ffukzei3puonuqlncy7cn2afwyd.onion:25"
set smtp_pass = ""
set ssl_starttls = no
set ssl_force_tls = no
-# GPG/ECC — chiave dedicata per mail2news (separata dalle email personali)
-# Genera con: gpg --full-generate-key → ECC/Ed25519
-# Poi esporta la pubkey su keyserver o allegala nei post
-set pgp_default_key = "FINGERPRINT_CHIAVE_ECC_MAIL2NEWS"
-set pgp_sign_as = "FINGERPRINT_CHIAVE_ECC_MAIL2NEWS"
-set crypt_autosign = yes # firma automatica di tutti i post
-
-# Header identificativo
-my_hdr X-Mailer: NeoMutt/mail2news
+my_hdr X-Mailer: NeoMutt
color status black white
diff --git a/neomuttrc.common b/neomuttrc.common
new file mode 100644
index 0000000..6823509
--- /dev/null
+++ b/neomuttrc.common
@@ -0,0 +1,117 @@
+# NeoMutt shared base — sourced by neomuttrc (clearnet) and neomuttrc.tor
+# Contiene UI, GPG, sidebar, HTML, sort, cache, colors. NESSUN account qui.
+
+# =====================================================
+# Impostazioni Generali
+# =====================================================
+
+set realname = "Gabriel1"
+set use_from = yes
+set envelope_from = yes
+
+set editor = "vim"
+set edit_headers = yes
+set autoedit = yes
+
+my_hdr References:
+my_hdr Reply-To:
+my_hdr X-Newsgroups:
+
+set date_format = "%d/%m/%Y %H:%M"
+set index_format = "%4C %Z %d %-20.20L %s"
+
+set my_account_info = "[Account]"
+set status_format = "$my_account_info │ %f %?M?(%M hidden)? %?n?(%n new)?%?d? (%d to delete)?%?t? (%t tagged)? %>─%?p?(%p postponed)?─"
+
+# Sidebar
+set sidebar_visible = yes
+set sidebar_width = 30
+set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S"
+set mail_check_stats
+
+# =====================================================
+# Sicurezza
+# =====================================================
+
+set ssl_force_tls = yes
+set ssl_starttls = yes
+
+# =====================================================
+# GPG/PGP
+# =====================================================
+
+set crypt_use_gpgme = yes
+set crypt_autopgp = yes
+set pgp_auto_decode = yes
+set crypt_verify_sig = yes
+set crypt_replysign = yes
+set crypt_replyencrypt = yes
+set crypt_replysignencrypted = yes
+
+set pgp_sign_as = "0xC8F007F03A6657D8"
+set pgp_default_key = "0xC8F007F03A6657D8"
+set pgp_use_gpg_agent = yes
+
+set crypt_opportunistic_encrypt = no
+
+macro index,pager \Ce "<check-traditional-pgp>" "Verifica PGP inline"
+macro index,pager \Cv "<view-attachments><search>application/pgp<enter><view-mailcap><exit>" "Visualizza firma/chiave PGP"
+
+# =====================================================
+# HTML
+# =====================================================
+
+set mailcap_path = "~/.config/neomutt/mailcap"
+auto_view text/html
+alternative_order text/html text/plain
+set implicit_autoview = yes
+
+macro index,pager \cv "<view-attachments><search>html<enter><view-mailcap><exit>" "Apri HTML in Firefox"
+
+# =====================================================
+# Ordinamento
+# =====================================================
+
+set sort = threads
+set sort_aux = reverse-last-date-received
+
+# =====================================================
+# Cache
+# =====================================================
+
+set header_cache = "~/.cache/neomutt/headers"
+set message_cachedir = "~/.cache/neomutt/bodies"
+
+# =====================================================
+# Theme
+# =====================================================
+
+source ~/.config/neomutt/colors.mutt
+
+# =====================================================
+# Scorciatoie utili (UI generale)
+# =====================================================
+
+bind index,pager B sidebar-toggle-visible
+bind index,pager \Cp sidebar-prev
+bind index,pager \Cn sidebar-next
+bind index,pager \Co sidebar-open
+
+# Vim-like
+bind pager j next-line
+bind pager k previous-line
+bind index j next-entry
+bind index k previous-entry
+bind index G last-entry
+bind index g noop
+bind index gg first-entry
+
+bind index,pager r reply
+bind index,pager R group-reply
+bind index,pager f forward-message
+
+macro compose H "F pandoc -s -f markdown -t html<enter>y^T^Utext/html<enter>" "Converti in HTML"
+
+# Disable drafts/postponed (avoid IMAP errors)
+set postponed = ""
+set record = ""
diff --git a/neomuttrc.tor b/neomuttrc.tor
new file mode 100644
index 0000000..a8d6203
--- /dev/null
+++ b/neomuttrc.tor
@@ -0,0 +1,14 @@
+# NeoMutt Tor profile
+# Lanciato con: torsocks neomutt -F ~/.config/neomutt/neomuttrc.tor
+# Tutto il processo passa da SOCKS5 127.0.0.1:9050.
+# Non includere account clearnet qui: torsocks li forzerebbe comunque su Tor
+# (rischio di esporre credenziali clearnet a un exit/relay non previsto).
+
+# Riusa la base condivisa (UI, GPG, sidebar, sort, cache, colors)
+source ~/.config/neomutt/neomuttrc.common
+
+# Account di default per questo profilo
+source ~/.config/neomutt/accounts/mail2news
+
+# Switch account: solo profili compatibili con Tor
+macro index,pager <f9> "<shell-escape>~/.config/neomutt/m2n-prompt.sh<enter>" "Post mail2news"
diff --git a/scripts/m2n-prompt.sh b/scripts/m2n-prompt.sh
new file mode 100644
index 0000000..d57db96
--- /dev/null
+++ b/scripts/m2n-prompt.sh
@@ -0,0 +1,82 @@
+#!/bin/bash
+# Mail2News posting script — NeoMutt + torsocks + swaks
+# Bind to F9 in neomuttrc.tor:
+# macro index,pager <F9> "<shell-escape>~/.config/neomutt/m2n-prompt.sh<enter>" "Post to Usenet"
+set -euo pipefail
+
+M2N_TO="mail2news@xilb7y4kj6u6qfo45o3yk2kilfv54ffukzei3puonuqlncy7cn2afwyd.onion"
+SMTP_HOST="xilb7y4kj6u6qfo45o3yk2kilfv54ffukzei3puonuqlncy7cn2afwyd.onion"
+SMTP_PORT="25"
+FROM="nobody@virebent.invalid"
+
+clear
+echo "=== MAIL2NEWS — Usenet Post ==="
+echo
+
+printf "Newsgroup(s) [comma-separated]: "
+read -r NEWSGROUP
+[ -z "$NEWSGROUP" ] && echo "Aborted." && exit 1
+NEWSGROUP=$(echo "$NEWSGROUP" | sed 's/ *, */,/g')
+
+printf "Subject: "
+read -r SUBJECT
+[ -z "$SUBJECT" ] && echo "Aborted." && exit 1
+
+REFERENCES=""
+if echo "$SUBJECT" | grep -qi "^re:"; then
+ printf "References (Message-ID of original): "
+ read -r REFERENCES
+fi
+
+MSGFILE=$(mktemp /tmp/m2n-body.XXXXXX)
+echo "" > "$MSGFILE"
+echo "-- " >> "$MSGFILE"
+echo "posted via virebent.art mail2news" >> "$MSGFILE"
+
+${EDITOR:-vim} "$MSGFILE"
+
+DRAFTFILE=$(mktemp /tmp/m2n-draft.XXXXXX)
+{
+ printf "To: %s\n" "$M2N_TO"
+ printf "From: %s\n" "$FROM"
+ printf "Subject: %s\n" "$SUBJECT"
+ [ -n "$REFERENCES" ] && printf "References: %s\n" "$REFERENCES"
+ printf "Newsgroups: %s\n" "$NEWSGROUP"
+ printf "\n"
+ cat "$MSGFILE"
+} > "$DRAFTFILE"
+
+clear
+echo "=== REVIEW ==="
+cat "$DRAFTFILE"
+echo
+printf "[s]end [e]dit [q]uit: "
+read -r CHOICE
+
+case "$CHOICE" in
+ e|E) ${EDITOR:-vim} "$DRAFTFILE" ;;
+ q|Q) rm -f "$MSGFILE" "$DRAFTFILE"; echo "Cancelled."; exit 0 ;;
+esac
+
+echo
+echo "Sending via Tor..."
+
+torsocks swaks \
+ --server "${SMTP_HOST}:${SMTP_PORT}" \
+ --from "$FROM" \
+ --to "$M2N_TO" \
+ --data "@${DRAFTFILE}" \
+ --timeout 60 \
+ 2>&1 | tee /tmp/m2n-smtp.log
+
+if grep -q "250 " /tmp/m2n-smtp.log; then
+ echo
+ echo "Sent to: $NEWSGROUP"
+else
+ echo
+ echo "ERROR — check /tmp/m2n-smtp.log"
+fi
+
+rm -f "$MSGFILE" "$DRAFTFILE"
+printf "\nPress Enter to return to NeoMutt..."
+read -r