aerc-wizard

Easily auto-configure aerc and isync/mpop with safe passwords (IMAP/POP3/SMTP)
git clone https://git.awy.one/aerc-wizard
Log | Files | Refs | README | LICENSE

commit 9db8e8294bedf9cc1c750d179b01d978779fa37f
parent 2158f18b716792e45eab8a579a359bec1178d118
Author: awy <awy@awy.one>
Date:   Thu, 22 Jan 2026 00:06:21 +0300

Use existing hostname variable, fix mail port overrides from domains.csv, and apply $scheme for STARTTLS or implicit TLS based on SMTP port

Diffstat:
Mbin/aew | 14++++++++------
Mshare/aerc-temp | 2+-
2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/bin/aew b/bin/aew @@ -126,7 +126,6 @@ prepimapnotify() { prepaerc() { mkdir -p "$aercdir" aercuser="${fulladdr%@*}" - aercdomain="${fulladdr#*@}" [ ! -f "$aercconf" ] && cat "$aerctempconf" >"$aercconf" [ ! -f "$bindsconf" ] && cat "$aerctempbinds" >"$bindsconf" [ ! -f "$accountsconf" ] && envsubst <"$aercbase" >"$accountsconf" @@ -167,10 +166,10 @@ parsedomains() { IFS=, read -r service imapsugg iportsugg smtpsugg sportsugg <<EOF $serverinfo EOF - imap="${imap:-$imapsugg}" - smtp="${smtp:-$smtpsugg}" - sport="${sport:-$sportsugg}" - iport="${iport:-$iportsugg}" + imap="${imapsugg:-$imap}" + smtp="${smtpsugg:-$smtp}" + sport="${sportsugg:-$sport}" + iport="${iportsugg:-$iport}" } delete() { @@ -220,7 +219,10 @@ askinfo() { [ -z "$smtp" ] && echo "Give your email server's SMTP address (excluding the port number):" && read -r smtp case $sport in - 587) tlsline="# tls_starttls" ;; + 465) scheme="smtps" ;; + 587) + scheme="smtp" + tlsline="# tls_starttls" ;; esac [ -z "$realname" ] && realname="${fulladdr%%@*}" [ -z "$passprefix" ] && passprefix="" diff --git a/share/aerc-temp b/share/aerc-temp @@ -1,5 +1,5 @@ [$fulladdr] -outgoing = smtps://$aercuser%40$aercdomain@$smtp:$sport +outgoing = $scheme://$aercuser%40$hostname@$smtp:$sport maildir-account-path = $fulladdr outgoing-cred-cmd = gopass $passprefix$fulladdr from = $realname <$fulladdr>