mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
a09cfdbaf1
neomutt: Updated options and added tests neomutt: Added test for individual mailbox type neomutt: Formatted code neomutt: Enable ssl_force_tls based on IMAP instead of SMTP neomutt: Applied suggestions from @chayleaf neomutt: fix breaking tests
39 lines
697 B
Bash
39 lines
697 B
Bash
#!/nix/store/00000000000000000000000000000000-bash/bin/bash
|
|
# Automatically set login variables based on the current account.
|
|
# This requires NeoMutt >= 2022-05-16
|
|
|
|
while [ ! -z "$1" ]; do
|
|
case "$1" in
|
|
--hostname)
|
|
shift
|
|
hostname="$1"
|
|
;;
|
|
--username)
|
|
shift
|
|
username="$1@"
|
|
;;
|
|
--type)
|
|
shift
|
|
type="$1"
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
found=
|
|
case "${username}${hostname}" in
|
|
home.manager@imap.example.com)
|
|
found=1
|
|
username="home.manager"
|
|
password="$(password-command)"
|
|
;;
|
|
esac
|
|
|
|
if [ -n "$found" ]; then
|
|
echo "username: $username"
|
|
echo "password: $password"
|
|
fi
|
|
|