Update mail related configuration
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
f885f6796f
commit
babc2bb780
5 changed files with 52 additions and 47 deletions
32
mbsyncrc
Normal file
32
mbsyncrc
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
IMAPAccount gmail
|
||||||
|
# Address to connect to
|
||||||
|
Host imap.gmail.com
|
||||||
|
User maitysanchayan@gmail.com
|
||||||
|
# To store the password in an encrypted file use PassCmd instead of Pass
|
||||||
|
PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.sanchayan.gpg"
|
||||||
|
#
|
||||||
|
# Use SSL
|
||||||
|
SSLType IMAPS
|
||||||
|
# The following line should work. If get certificate errors, uncomment the two following lines and read the "Troubleshooting" section.
|
||||||
|
CertificateFile /etc/ssl/certs/ca-certificates.crt
|
||||||
|
|
||||||
|
IMAPStore gmail-remote
|
||||||
|
Account gmail
|
||||||
|
|
||||||
|
MaildirStore gmail-local
|
||||||
|
Subfolders Verbatim
|
||||||
|
# The trailing "/" is important
|
||||||
|
Path ~/Gmail/
|
||||||
|
Inbox ~/Gmail/Inbox
|
||||||
|
|
||||||
|
Channel gmail
|
||||||
|
Master :gmail-remote:
|
||||||
|
Slave :gmail-local:
|
||||||
|
# Exclude everything under the internal [Gmail] folder, except the interesting folders
|
||||||
|
Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"
|
||||||
|
# Or include everything
|
||||||
|
#Patterns *
|
||||||
|
# Automatically create missing mailboxes, both locally and on the server
|
||||||
|
Create Both
|
||||||
|
# Save the synchronization state files in the relevant directory
|
||||||
|
SyncState *
|
|
@ -1,15 +1,15 @@
|
||||||
set from = "maitysanchayan@gmail.com"
|
set from = "maitysanchayan@gmail.com"
|
||||||
set sendmail = "/usr/bin/msmtp -a Sanchayan"
|
set sendmail = "/usr/bin/msmtp -a Sanchayan"
|
||||||
set mbox = "+Sanchayan/Archive"
|
set mbox = "+Archive"
|
||||||
set postponed = "+Sanchayan/Drafts"
|
set postponed = "+drafts"
|
||||||
set record = "+Sanchayan/Sent"
|
set record = "+Sent"
|
||||||
|
|
||||||
color status green default
|
color status green default
|
||||||
|
|
||||||
macro index D \
|
macro index D \
|
||||||
"<save-message>+Sanchayan/Trash<enter>" \
|
"<save-message>+Trash<enter>" \
|
||||||
"move message to the trash"
|
"move message to the trash"
|
||||||
|
|
||||||
macro index S \
|
macro index S \
|
||||||
"<save-message>+Sanchayan/Spam<enter>" \
|
"<save-message>+Spam<enter>" \
|
||||||
"mark message as spam"
|
"mark message as spam"
|
||||||
|
|
|
@ -1,25 +1,14 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export DISPLAY=:0
|
|
||||||
|
|
||||||
imapfilter
|
imapfilter -c /home/sanchayan/.imapfilter/config.lua
|
||||||
offlineimap -o -u quiet
|
mbsync -Va
|
||||||
notmuch new
|
notmuch new
|
||||||
|
|
||||||
let toradex_mail_count=`ls /home/sanchayan/Mail/Toradex/INBOX/new/|wc -l`
|
export DISPLAY=:0
|
||||||
let stefan_mail_count=`ls /home/sanchayan/Mail/Sanchayan/Stefan/new/|wc -l`
|
let inbox=`ls /home/sanchayan/Mail/Inbox/new/|wc -l`
|
||||||
let sanchayan_linux=`ls /home/sanchayan/Mail/Sanchayan/Linux\ Kernel/new/|wc -l`
|
|
||||||
|
|
||||||
if (("$toradex_mail_count" > 0)); then
|
if (("$inbox" > 0)); then
|
||||||
sudo -u sanchayan DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "You have
|
sudo -u sanchayan DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "You have
|
||||||
$toradex_mail_count new mails in Toradex"
|
$inbox new mails in Inbox"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (("$stefan_mail_count" > 0)); then
|
|
||||||
sudo -u sanchayan DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "You have
|
|
||||||
$stefan_mail_count new mails in Stefan inbox"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if (("$sanchayan_linux" > 0)); then
|
|
||||||
sudo -u sanchayan DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "You have
|
|
||||||
$sanchayan_linux new mails in Linux Kernel inbox"
|
|
||||||
fi
|
|
||||||
|
|
11
mutt/muttrc
11
mutt/muttrc
|
@ -1,12 +1,11 @@
|
||||||
set mbox_type = Maildir
|
set mbox_type = Maildir
|
||||||
|
|
||||||
set spoolfile = "+Sanchayan/INBOX"
|
set spoolfile = "+Inbox"
|
||||||
|
|
||||||
source ~/.mutt/accounts/sanchayan
|
source ~/.mutt/accounts/sanchayan
|
||||||
|
|
||||||
folder-hook Sanchayan/* source ~/.mutt/accounts/sanchayan
|
folder-hook Sanchayan/* source ~/.mutt/accounts/sanchayan
|
||||||
folder-hook Victor/* source ~/.mutt/accounts/victor
|
#folder-hook Victor/* source ~/.mutt/accounts/victor
|
||||||
folder-hook Toradex/* source ~/.mutt/accounts/toradex
|
|
||||||
|
|
||||||
set mail_check = 0
|
set mail_check = 0
|
||||||
set envelope_from
|
set envelope_from
|
||||||
|
@ -48,7 +47,7 @@ macro index 'c' '<change-folder>?<change-dir><home>^K=<enter>'
|
||||||
set send_charset="us-ascii:utf-8"
|
set send_charset="us-ascii:utf-8"
|
||||||
set send_charset="utf-8"
|
set send_charset="utf-8"
|
||||||
|
|
||||||
set editor="emacsclient -t"
|
set editor="nvim"
|
||||||
|
|
||||||
set date_format="%y-%m-%d %T"
|
set date_format="%y-%m-%d %T"
|
||||||
set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s"
|
set index_format="%2C | %Z [%d] %-30.30F (%-4.4c) %s"
|
||||||
|
@ -74,7 +73,7 @@ macro index L "<enter-command>unset wait_key<enter><shell-escape>read -p 'notmuc
|
||||||
# 'a' shows all messages again (supersedes default <alias> binding)
|
# 'a' shows all messages again (supersedes default <alias> binding)
|
||||||
macro index a "<limit>all\n" "show all messages (undo limit)"
|
macro index a "<limit>all\n" "show all messages (undo limit)"
|
||||||
|
|
||||||
set header_cache=~/Mail/mutt_cache/ # a much faster opening of mailboxes...
|
set header_cache=~/Gmail/mutt_cache/ # a much faster opening of mailboxes...
|
||||||
|
|
||||||
macro index D "<save-message>+/ACCOUNT/[Gmail].Trash<enter>" "Move message to the trash"
|
macro index D "<save-message>+/Trash<enter>" "Move message to the trash"
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[general]
|
[general]
|
||||||
ui = ttyui
|
ui = ttyui
|
||||||
accounts = Sanchayan,Victor,Toradex
|
accounts = Sanchayan,Victor
|
||||||
fsync = false
|
fsync = false
|
||||||
pythonfile = ~/.offlineimap.py
|
pythonfile = ~/.offlineimap.py
|
||||||
|
|
||||||
|
@ -14,10 +14,6 @@ localrepository = Victor-Local
|
||||||
remoterepository = Victor-Remote
|
remoterepository = Victor-Remote
|
||||||
postsynchook =- notmuch new
|
postsynchook =- notmuch new
|
||||||
|
|
||||||
[Account Toradex]
|
|
||||||
localrepository = Toradex-Local
|
|
||||||
remoterepository = Toradex-Remote
|
|
||||||
|
|
||||||
[Repository Sanchayan-Local]
|
[Repository Sanchayan-Local]
|
||||||
type = Maildir
|
type = Maildir
|
||||||
localfolders = ~/Mail/Sanchayan
|
localfolders = ~/Mail/Sanchayan
|
||||||
|
@ -26,15 +22,12 @@ localfolders = ~/Mail/Sanchayan
|
||||||
type = Maildir
|
type = Maildir
|
||||||
localfolders = ~/Mail/Victor
|
localfolders = ~/Mail/Victor
|
||||||
|
|
||||||
[Repository Toradex-Local]
|
|
||||||
type = Maildir
|
|
||||||
localfolders = ~/Mail/Toradex
|
|
||||||
|
|
||||||
[Repository Sanchayan-Remote]
|
[Repository Sanchayan-Remote]
|
||||||
type = Gmail
|
type = Gmail
|
||||||
remoteuser = maitysanchayan@gmail.com
|
remoteuser = maitysanchayan@gmail.com
|
||||||
remotepasseval = mailpasswd("sanchayan")
|
remotepasseval = mailpasswd("sanchayan")
|
||||||
realdelete = yes
|
realdelete = yes
|
||||||
|
ssl_versions = tls1_2
|
||||||
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
|
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
|
||||||
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail','[Gmail]/Trash']
|
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail','[Gmail]/Trash']
|
||||||
|
|
||||||
|
@ -43,16 +36,8 @@ type = Gmail
|
||||||
remoteuser = victorascroft@gmail.com
|
remoteuser = victorascroft@gmail.com
|
||||||
remotepasseval = mailpasswd("victor")
|
remotepasseval = mailpasswd("victor")
|
||||||
realdelete = yes
|
realdelete = yes
|
||||||
|
ssl_versions = tls1_2
|
||||||
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
|
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
|
||||||
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail', '[Gmail]/Trash']
|
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail', '[Gmail]/Trash']
|
||||||
|
|
||||||
[Repository Toradex-Remote]
|
|
||||||
type = IMAP
|
|
||||||
remotehost = outlook.office365.com
|
|
||||||
remoteuser = sanchayan.maity@toradex.com
|
|
||||||
remotepasseval = mailpasswd("toradex")
|
|
||||||
realdelete = yes
|
|
||||||
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
|
|
||||||
folderfilter = lambda folder: folder in ['INBOX', 'Sent']
|
|
||||||
|
|
||||||
postsynchook = notmuch new
|
postsynchook = notmuch new
|
||||||
|
|
Loading…
Reference in a new issue