Setup multiple accounts according to ArchWiki

This commit is contained in:
flyingscorpio@clevo 2022-05-14 11:11:58 +02:00
parent ff15e951d0
commit f93aefe5ce
2 changed files with 25 additions and 21 deletions

View file

@ -1,11 +1,8 @@
# neomuttrc file for {{ account.fulladdress }}
set hostname = "{{ account.fulladdress.split('@') | last }}"
# SMTP
#set sendmail = "msmtp -a {{ account.fulladdress }}"
set smtp_pass = "`pass {{ account.passlocation }}`"
set smtp_url = "{{ account.smtp.proto }}://{{ account.smtp.login }}@{{ account.smtp.server }}:{{ account.smtp.port }}"
set smtp_pass = "`pass {{ account.passlocation }}`"
{% if neomutt_version | int >= 20211015 %}
set real_name = "{{ account.realname }}"
{% else %}
@ -13,6 +10,7 @@ set realname = "{{ account.realname }}"
{% endif %}
set from = "{{ account.fulladdress }}"
set use_from = yes
set hostname = "{{ account.fulladdress.split('@') | last }}"
# IMAP
{% if account.imap %}
@ -36,3 +34,5 @@ set imap_check_subscribed
set ssl_starttls = yes
set ssl_force_tls = yes
account-hook $folder "set imap_user={{ account.imap.login }} imap_pass=`pass {{ account.passlocation }}`"

View file

@ -6,11 +6,11 @@
#set smtp_authenticators = 'gssapi:login'
#set query_command = "abook --mutt-query '%s'"
#set rfc2047_parameters = yes
#set sleep_time = 0 # Pause 0 seconds for informational messages
#set markers = no # Disables the `+` displayed at line wraps
#set mark_old = no # Unread mail stay unread until read
#set sleep_time = 0 # pause 0 seconds for informational messages
#set markers = no # disables the `+` displayed at line wraps
#set mark_old = no # unread mail stay unread until read
#set mime_forward = yes # attachments are forwarded with mail
#set wait_key = no # mutt won't ask "press key to continue"
#set wait_key = no # don't ask "press key to continue"
#set fast_reply # skip to compose when replying
#set fcc_attach # save attachments with the body
#set forward_format = "Fwd: %s" # format of subject when forwarding
@ -19,6 +19,7 @@
#set include # include message in replies
set mail_check = 120 # how often to check for new mail (in seconds)
set imap_keepalive = 300 # intermittent polling to keep connection alive (in seconds)
unset imap_passive # open imap connection when checking for mail
#auto_view text/html # automatically show html (mailcap uses lynx)
#auto_view application/pgp-encrypted
#alternative_order text/plain text/enriched text/html
@ -177,5 +178,8 @@ set sidebar_visible = yes
{% for account in accounts %}
source ~/.config/neomutt/accounts/{{ account.fulladdress }}.neomuttrc
#macro index,pager i1 '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/{{ account.fulladdress }}.neomuttrc<enter><change-folder>!<enter>;<check-stats>' "switch to {{ account.fulladdress }}"
folder-hook $folder source ~/.config/neomutt/accounts/{{ account.fulladdress }}.neomuttrc
macro index,pager <f{{ loop.index }}> '<sync-mailbox><enter-command>source ~/.config/neomutt/accounts/{{ account.fulladdress }}.neomuttrc<enter><change-folder>!<enter>;<check-stats>' "switch to {{ account.fulladdress }}"
{% endfor %}
#macro index 'c' '<change-folder>?<change-dir><home> =<enter>'