From: Samir Benmendil Date: Sat, 8 Aug 2020 11:58:24 +0000 (+0100) Subject: mail: setup youtube sync for mailfence X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/5278b58a9efffc9e9850104091d8d93551118036 mail: setup youtube sync for mailfence --- diff --git a/mbsync/config b/mbsync/config index aa81604..aa3d76e 100644 --- a/mbsync/config +++ b/mbsync/config @@ -41,6 +41,11 @@ Channel mailfence-bin Master :mailfence-remote:"Trash" Slave :mailfence-local:"trash" +Channel mailfence-youtube +Master :mailfence-remote: +Slave :mailfence-local: +Patterns youtube* + Channel mailfence-archive Master :mailfence-remote: Slave :mailfence-local: @@ -52,6 +57,7 @@ Channel mailfence-drafts Channel mailfence-sent Channel mailfence-spam Channel mailfence-bin +Channel mailfence-youtube Channel mailfence-archive IMAPAccount gmail diff --git a/mbsync/post-sync.d/10-youtube.hook b/mbsync/post-sync.d/10-youtube.hook index 616a0ed..de02bba 100755 --- a/mbsync/post-sync.d/10-youtube.hook +++ b/mbsync/post-sync.d/10-youtube.hook @@ -1,6 +1,6 @@ #!/usr/bin/env bash -maildir="$MAILDIR/gmail" +maildir="$MAILDIR/mailfence" yt_src_mb=youtube-orig yt_dst_mb=youtube yt_parser=$dir/parse-mail.py @@ -12,8 +12,8 @@ fi mbsync_args=$* -if [[ "$mbsync_args" != "gmail" ]]; then - # only run for gmail account +if [[ "$mbsync_args" != "mailfence" ]]; then + # only run for mailfence account exit fi @@ -46,4 +46,4 @@ for mail in "$maildir"/$yt_src_mb/new/* ; do done # resync new yt_dst_mb -mbsync -c "$config" gmail-$yt_src_mb gmail-$yt_dst_mb +mbsync -c "$config" mailfence-youtube diff --git a/mutt/accounts/mailfence b/mutt/accounts/mailfence index 4714c72..5e54663 100644 --- a/mutt/accounts/mailfence +++ b/mutt/accounts/mailfence @@ -17,12 +17,13 @@ unset move # do not move read msgs, we archive them aft mailboxes "+mailfence/inbox" mailboxes "+mailfence/sent" -# mailboxes "+mailfence/youtube" +mailboxes "+mailfence/youtube" mailboxes "+mailfence/archive" mailboxes "+mailfence/drafts" mailboxes "+mailfence/spam" mailboxes "+mailfence/trash" macro index,pager gi "=mailfence/inbox" "go to inbox" +macro index,pager gy "=mailfence/youtube" "go to youtube" macro index,pager ga "=mailfence/archive" "go to archive" macro index,pager gs "=mailfence/spam" "go to spam"