This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

mutt: add SSH fallback for sending mail

+7 -4
+7 -4
tools/mutt/flake-module.nix
··· 45 45 fi 46 46 done 47 47 48 - # For c-base account, always send directly (no Tor needed) 48 + # For c-base account, always send directly 49 49 if [ "$using_cbase" -eq 1 ]; then 50 50 ${pkgs.coreutils}/bin/tee >(${pkgs.notmuch}/bin/notmuch insert +sent) | \ 51 51 ${pkgs.msmtp}/bin/msmtp -C ${msmtprc} "$@" 52 - # For prism account, check if neoprism.r is reachable 52 + # For default account, try neoprism.r first, then SSH 53 53 elif ping -W2 -c1 neoprism.r >/dev/null 2>&1; then 54 54 ${pkgs.coreutils}/bin/tee >(${pkgs.notmuch}/bin/notmuch insert +sent) | \ 55 55 ${pkgs.msmtp}/bin/msmtp -C ${msmtprc} "$@" 56 56 else 57 - echo "Error: neoprism.r is not reachable" >&2 58 - exit 1 57 + # Fall back to SSH tunnel to neoprism 58 + echo "neoprism.r not reachable, sending via SSH..." >&2 59 + ${pkgs.coreutils}/bin/tee >(${pkgs.notmuch}/bin/notmuch insert +sent) | \ 60 + ${pkgs.openssh}/bin/ssh -p 45621 neoprism.lassul.us sendmail -t 59 61 fi 60 62 ''; 61 63 ··· 206 208 pkgs.elinks 207 209 pkgs.msmtp 208 210 pkgs.notmuch 211 + pkgs.openssh 209 212 pkgs.urlscan 210 213 ] 211 214 ++ lib.optionals pkgs.stdenv.isLinux [