mirror of
https://github.com/hyzendust/mutt-add-account.git
synced 2026-07-01 05:32:19 +02:00
Update: URLScan and Lynx
This commit is contained in:
@@ -18,6 +18,7 @@ unset imap_passive
|
|||||||
set mail_check = 15
|
set mail_check = 15
|
||||||
set timeout = 10
|
set timeout = 10
|
||||||
set mbox_type=Maildir
|
set mbox_type=Maildir
|
||||||
|
set mailcap_path = ~/.mailcap
|
||||||
set use_envelope_from = yes
|
set use_envelope_from = yes
|
||||||
set sort=reverse-date
|
set sort=reverse-date
|
||||||
set ssl_verify_host = no
|
set ssl_verify_host = no
|
||||||
@@ -34,6 +35,9 @@ source ~/.mutt/vombatidae.neomuttrc
|
|||||||
# Clear any default mailboxes before loading account configs
|
# Clear any default mailboxes before loading account configs
|
||||||
unmailboxes *
|
unmailboxes *
|
||||||
|
|
||||||
|
# URLScan
|
||||||
|
macro index,pager \cb "<pipe-message> urlscan<enter>" "scan for URLs"
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# Static sidebar — all accounts and their folders
|
# Static sidebar — all accounts and their folders
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
@@ -79,6 +83,7 @@ SIDEBAR_BLOCK_EOF
|
|||||||
"set mail_check = 15"
|
"set mail_check = 15"
|
||||||
"set timeout = 10"
|
"set timeout = 10"
|
||||||
"set mbox_type=Maildir"
|
"set mbox_type=Maildir"
|
||||||
|
"set mailcap_path = ~/.mailcap"
|
||||||
"set use_envelope_from = yes"
|
"set use_envelope_from = yes"
|
||||||
"set sort=reverse-date"
|
"set sort=reverse-date"
|
||||||
"set ssl_verify_host = no"
|
"set ssl_verify_host = no"
|
||||||
@@ -94,6 +99,9 @@ SIDEBAR_BLOCK_EOF
|
|||||||
"# Clear any default mailboxes before loading account configs"
|
"# Clear any default mailboxes before loading account configs"
|
||||||
"unmailboxes *"
|
"unmailboxes *"
|
||||||
""
|
""
|
||||||
|
"# URLScan"
|
||||||
|
"macro index,pager \cb \"<pipe-message> urlscan<enter>\" \"scan for URLs\""
|
||||||
|
""
|
||||||
)
|
)
|
||||||
|
|
||||||
for option in "${required_options[@]}"; do
|
for option in "${required_options[@]}"; do
|
||||||
@@ -352,6 +360,17 @@ APPARMOR_EOF
|
|||||||
sudo systemctl restart apparmor.service 2>/dev/null || echo "Note: Could not restart apparmor service"
|
sudo systemctl restart apparmor.service 2>/dev/null || echo "Note: Could not restart apparmor service"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create/update ~/.mailcap with lynx HTML handler
|
||||||
|
mailcap_file="$HOME/.mailcap"
|
||||||
|
mailcap_line="text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -stdin -dump; copiousoutput"
|
||||||
|
if [ ! -f "$mailcap_file" ]; then
|
||||||
|
echo "$mailcap_line" > "$mailcap_file"
|
||||||
|
echo "Created ~/.mailcap"
|
||||||
|
elif ! grep -qF "$mailcap_line" "$mailcap_file"; then
|
||||||
|
echo "$mailcap_line" >> "$mailcap_file"
|
||||||
|
echo "Updated ~/.mailcap"
|
||||||
|
fi
|
||||||
|
|
||||||
# Get user inputs
|
# Get user inputs
|
||||||
read -p "Enter your full email address: " email
|
read -p "Enter your full email address: " email
|
||||||
read -p "Enter your full name: " fullname
|
read -p "Enter your full name: " fullname
|
||||||
@@ -651,7 +670,7 @@ if [ "$is_gmail" = true ]; then
|
|||||||
else
|
else
|
||||||
# Boxes for goimapnotify (standard) - list of maps with per-box handlers
|
# Boxes for goimapnotify (standard) - list of maps with per-box handlers
|
||||||
notify_boxes_yaml=" - mailbox: \"INBOX\"
|
notify_boxes_yaml=" - mailbox: \"INBOX\"
|
||||||
onNewMail: \"mbsync '$email' && notify-send -i mail-unread 'New Mail' '$email' && paplay /usr/share/sounds/freedesktop/stereo/message-new-instant.oga\"
|
onNewMail: \"mbsync '$email' && MAIL=\$(ls -t ~/Maildir/${shortname}/INBOX/cur/ | head -1) && FROM=\$(grep -m1 '^From:' ~/Maildir/${shortname}/INBOX/cur/\$MAIL | cut -c6-50) && SUBJ=\$(grep -m1 '^Subject:' ~/Maildir/${shortname}/INBOX/cur/\$MAIL | cut -c9-60) && notify-send -i mail-unread 'New Mail - $email' \"\$FROM\n\$SUBJ\" && paplay /usr/share/sounds/freedesktop/stereo/message-new-instant.oga\"
|
||||||
onNewMailPost: \"\"
|
onNewMailPost: \"\"
|
||||||
onChangedMail: \"mbsync $email\"
|
onChangedMail: \"mbsync $email\"
|
||||||
onChangedMailPost: \"\"
|
onChangedMailPost: \"\"
|
||||||
|
|||||||
Reference in New Issue
Block a user