proper mailbox setup

This commit is contained in:
Rouven Seifert 2023-01-27 11:22:49 +01:00
parent f4ef85b10d
commit d9c1a272fe
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
3 changed files with 113 additions and 11 deletions

View file

@ -3,21 +3,20 @@ let
gpg-default-key = "116987A8DD3F78FF8601BF4DB95E8FE6B11C4D09"; gpg-default-key = "116987A8DD3F78FF8601BF4DB95E8FE6B11C4D09";
in in
{ {
programs.thunderbird = {
enable = true;
profiles = {
default = {
withExternalGnupg = true;
isDefault = true;
};
};
};
programs = { programs = {
neomutt = { neomutt = {
enable = true; enable = true;
sidebar.enable = true; sidebar.enable = true;
checkStatsInterval = 30;
extraConfig = '' extraConfig = ''
bind pager <Space> noop
bind index,pager \Cp sidebar-prev
# Move the highlight to the next mailbox
bind index,pager \Cn sidebar-next
# Open the highlighted mailbox
bind index,pager <space><return> sidebar-open
source ${./dracula.muttrc} source ${./dracula.muttrc}
source ${./powerline.neomuttrc}
''; '';
}; };
mbsync.enable = true; mbsync.enable = true;
@ -42,7 +41,7 @@ in
port = 587; port = 587;
tls.useStartTls = true; tls.useStartTls = true;
}; };
thunderbird.enable = true; msmtp.enable = true;
mbsync = { mbsync = {
enable = true; enable = true;
create = "maildir"; create = "maildir";
@ -89,8 +88,56 @@ in
neomutt = { neomutt = {
enable = true; enable = true;
mailboxName = "--TU Dresden-------"; mailboxName = "--TU Dresden-------";
extraMailboxes = [ "Sent" "Opal" "Trash" "Junk-E-Mail" "Drafts" ]; # mbsync can't handle umlauts, rap
extraMailboxes = [ "Gesendete Elemente" "Opal" "Gel&APY-schte Elemente" "Junk-E-Mail" "Entw&APw-rfe" ];
extraConfig = ''
unset postponed
unset trash
unset record
set postponed='+Entw&APw-rfe'
set trash='+Gel&APY-schte Elemente'
set record='+Gesendete Elemente'
'';
}; };
}; };
"gmail" = rec {
address = "seifertrouven@gmail.com";
realName = "Rouven Seifert";
userName = address;
passwordCommand = "pass mail/google";
imap = {
host = "imap.gmail.com";
port = 993;
};
smtp = {
host = "smtp.gmail.com";
port = 465;
};
mbsync = {
enable = true;
create = "maildir";
extraConfig = {
account = {
AuthMechs = "Login";
};
};
subFolders = "Verbatim";
};
msmtp.enable = true;
neomutt = {
enable = true;
mailboxName = "--gmail------------";
extraMailboxes = [ "[Gmail]/Gesendet" "[Gmail]/Papierkorb" "[Gmail]/Spam" "[Gmail]/Entw&APw-rfe" ];
extraConfig = ''
unset postponed
unset trash
unset record
set postponed='+[Gmail]/Entw&APw-rfe'
set trash='+[Gmail]/Papierkorb'
set record='+[Gmail/Gesendet]'
'';
};
};
}; };
} }

View file

@ -40,3 +40,12 @@ color quoted2 color84 default
color quoted3 color215 default color quoted3 color215 default
color quoted4 color212 default color quoted4 color212 default
color signature color212 default color signature color212 default
color sidebar_indicator cyan black
color sidebar_highlight white color8
color sidebar_divider color8 black
color sidebar_flagged red black
color sidebar_new green black
color sidebar_ordinary color245 default
color sidebar_spool_file color207 default
color sidebar_unread color136 default

View file

@ -0,0 +1,46 @@
# ----------------------------------------------------------------------------
# Powerline / nerdfont
# This is a bit "hackish" due to neomutt limitations
#
# Author: Sheoak <contact [at] sheoak.fr>
# ----------------------------------------------------------------------------
set index_format=" %zs %zc %zt %{!%d %b} . %-28.28L %?M?(%1M)& ? %?X?&·? %s"
set pager_format=" %n %zc  %T %s%*  %{!%d %b · %H:%M} %?X?  %X ? %P  "
set status_format = " %f%?r? %r?   %m %?n?  %n ?  %?d?  %d ?%?t?  %t ?%?F?  %F? %> %?p?  %p ?"
set vfolder_format = " %N %?n?%3n& ? %8m  · %f"
set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M"
# no addressed to me, to me, group, cc, sent by me, mailing list
set to_chars="➜"
# unchanged mailbox, changed, read only, attach mode
set status_chars = " "
ifdef crypt_chars set crypt_chars = " "
set flag_chars = " "
set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted"
tag-transforms "replied" "↻ " \
"encrytpted" "" \
"signed" "" \
"attachment" "" \
# The formats must start with 'G' and the entire sequence is case sensitive.
tag-formats "replied" "GR" \
"encrypted" "GE" \
"signed" "GS" \
"attachment" "GA" \
color status white black
# powerline status bar hack
color status green black ''
color status yellow black ''
color status red black ''
color status brightblack blue '(.*)' 1
color status blue black '.*()' 1
color status black blue '\s* [0-9]+\s*'
color status blue black '().*$' 1
color status yellow black '()\s*\s*[0-9]+\s*' 1
color status black yellow '\s*\s*[0-9]+\s*'
color status blue yellow '() ([0-9]+%|all|end) \s*' 1
color status black blue ' ([0-9]+%|all|end) \s*'
color status yellow black '()\s*' 1
color status default black ''