update and clean
This commit is contained in:
parent
ec2c37c5fd
commit
8cd3675c52
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -11,3 +11,6 @@
|
|||||||
[submodule "conf.d/astroid/plugins/astroid-syntax-highlight"]
|
[submodule "conf.d/astroid/plugins/astroid-syntax-highlight"]
|
||||||
path = conf.d/astroid/plugins/astroid-syntax-highlight
|
path = conf.d/astroid/plugins/astroid-syntax-highlight
|
||||||
url = https://github.com/astroidmail/astroid-syntax-highlight.git
|
url = https://github.com/astroidmail/astroid-syntax-highlight.git
|
||||||
|
[submodule "conf.d/astroid/plugins/astroid-plugin-hls-hsv-tagcolor"]
|
||||||
|
path = conf.d/astroid/plugins/astroid-plugin-hls-hsv-tagcolor
|
||||||
|
url = https://github.com/astroidmail/astroid-plugin-hls-hsv-tagcolor.git
|
||||||
|
@ -4,41 +4,19 @@
|
|||||||
; Last Modified Date: 06.05.2020
|
; Last Modified Date: 06.05.2020
|
||||||
; Last Modified By : Jeff LANCE <email@jefflance.me>
|
; Last Modified By : Jeff LANCE <email@jefflance.me>
|
||||||
|
|
||||||
#[SpamFilter]
|
|
||||||
#spam_tag = scum
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#[BogoFilter]
|
|
||||||
|
|
||||||
|
|
||||||
[KillThreadsFilter]
|
[KillThreadsFilter]
|
||||||
|
|
||||||
|
|
||||||
[ListMailsFilter]
|
[ListMailsFilter]
|
||||||
|
|
||||||
|
|
||||||
[SentMailsFilter]
|
[SentMailsFilter]
|
||||||
sent_tag = sent
|
sent_tag = sent
|
||||||
|
|
||||||
|
|
||||||
[ArchiveSentMailsFilter]
|
[ArchiveSentMailsFilter]
|
||||||
|
sent_tag = sent
|
||||||
|
|
||||||
[Filter.1]
|
|
||||||
message = Tag all messages from work
|
|
||||||
query = 'from:STolsy@ac-creteil.fr OR from:ce.0932047v@ac-creteil.fr'
|
|
||||||
tag = +evariste
|
|
||||||
|
|
||||||
|
|
||||||
[Filter.2]
|
|
||||||
message = Tag all message from @mala.fr addresses
|
|
||||||
query = 'from:games@mala.fr'
|
|
||||||
tag = +MOI
|
|
||||||
|
|
||||||
|
|
||||||
[InboxFilter]
|
[InboxFilter]
|
||||||
|
|
||||||
|
|
||||||
[MailMover]
|
[MailMover]
|
||||||
folders = jeff.lance@mala.fr/archives jeff.lance@mala.fr/drafts jeff.lance@mala.fr/inbox jeff.lance@mala.fr/junk jeff.lance@mala.fr/sent jeff.lance@mala.fr/trash
|
folders = jeff.lance@mala.fr/archives jeff.lance@mala.fr/drafts jeff.lance@mala.fr/inbox jeff.lance@mala.fr/junk jeff.lance@mala.fr/sent jeff.lance@mala.fr/trash
|
||||||
rename = True
|
rename = True
|
||||||
|
@ -37,6 +37,24 @@
|
|||||||
"select_query": ""
|
"select_query": ""
|
||||||
},
|
},
|
||||||
"account2": {
|
"account2": {
|
||||||
|
"name": "Jean-François LANCE",
|
||||||
|
"email": "jean-francois.lance@ac-creteil.fr",
|
||||||
|
"gpgkey": "",
|
||||||
|
"always_gpg_sign": "false",
|
||||||
|
"sendmail": "msmtp -a jean-francois.lance@ac-creteil.fr --read-envelope-from -i -t",
|
||||||
|
"default": "false",
|
||||||
|
"save_sent": "true",
|
||||||
|
"save_sent_to": "\/home\/jeff\/Mail\/jean-francois.lance@ac-creteil.fr\/sent\/cur\/",
|
||||||
|
"additional_sent_tags": "",
|
||||||
|
"save_drafts_to": "\/home\/jeff\/Mail\/jean-francois.lance@ac-creteil.fr\/drafts\/cur\/",
|
||||||
|
"signature_separate": "false",
|
||||||
|
"signature_file": "",
|
||||||
|
"signature_file_markdown": "",
|
||||||
|
"signature_default_on": "true",
|
||||||
|
"signature_attach": "false",
|
||||||
|
"select_query": ""
|
||||||
|
},
|
||||||
|
"account3": {
|
||||||
"name": "Maths LANCE",
|
"name": "Maths LANCE",
|
||||||
"email": "mathslance@gmail.com",
|
"email": "mathslance@gmail.com",
|
||||||
"gpgkey": "",
|
"gpgkey": "",
|
||||||
@ -54,18 +72,17 @@
|
|||||||
"signature_attach": "false",
|
"signature_attach": "false",
|
||||||
"select_query": ""
|
"select_query": ""
|
||||||
},
|
},
|
||||||
"account3": {
|
"account4": {
|
||||||
"name": "Games",
|
"name": "Games",
|
||||||
"email": "games@mala.fr",
|
"email": "games@mala.fr",
|
||||||
"gpgkey": "",
|
"gpgkey": "",
|
||||||
"always_gpg_sign": "false",
|
"always_gpg_sign": "false",
|
||||||
"sendmail": "msmtp -a games@mala.fr --read-envelope-from -i -t",
|
"sendmail": "msmtp -a games@mala.fr --read-envelope-from -i -t",
|
||||||
"default": "true",
|
"default": "false",
|
||||||
"save_sent": "true",
|
"save_sent": "true",
|
||||||
"save_sent_to": "\/home\/jeff\/Mail\/games@mala.fr\/sent\/cur\/",
|
"save_sent_to": "\/home\/jeff\/Mail\/games@mala.fr\/sent\/cur\/",
|
||||||
"additional_sent_tags": "",
|
"additional_sent_tags": "",
|
||||||
"save_drafts_to":
|
"save_drafts_to": "\/home\/jeff\/Mail\/games@mala.fr\/drafts\/cur\/",
|
||||||
"\/home\/jeff\/Mail\/games@mala.fr\/drafts\/cur\/",
|
|
||||||
"signature_separate": "false",
|
"signature_separate": "false",
|
||||||
"signature_file": "",
|
"signature_file": "",
|
||||||
"signature_file_markdown": "",
|
"signature_file_markdown": "",
|
||||||
@ -77,10 +94,11 @@
|
|||||||
"startup": {
|
"startup": {
|
||||||
"queries": {
|
"queries": {
|
||||||
"INBOX": "tag:inbox",
|
"INBOX": "tag:inbox",
|
||||||
"IMPORTANT": "tag:flagged",
|
|
||||||
"Jeff LANCE (MaLa)": "tag:inbox folder:/jeff.lance@mala.fr/",
|
"Jeff LANCE (MaLa)": "tag:inbox folder:/jeff.lance@mala.fr/",
|
||||||
|
"Pro (Creteil)": "tag:inbox folder:/jean-francois.lance@ac-creteil.fr/",
|
||||||
"Maths LANCE (GMail)": "tag:inbox folder:/mathslance@gmail.com/",
|
"Maths LANCE (GMail)": "tag:inbox folder:/mathslance@gmail.com/",
|
||||||
"Games (MaLa)": "tag:inbox folder:/games@mala.fr/"
|
"Games (MaLa)": "tag:inbox folder:/games@mala.fr/",
|
||||||
|
"IMPORTANT": "tag:flagged"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"terminal": {
|
"terminal": {
|
||||||
@ -92,16 +110,16 @@
|
|||||||
"sort_order": "newest",
|
"sort_order": "newest",
|
||||||
"cell": {
|
"cell": {
|
||||||
"font_description": "default",
|
"font_description": "default",
|
||||||
"line_spacing": "5",
|
"line_spacing": "7",
|
||||||
"date_length": "10",
|
"date_length": "15",
|
||||||
"message_count_length": "4",
|
"message_count_length": "4",
|
||||||
"authors_length": "20",
|
"authors_length": "50",
|
||||||
"subject_color": "#807d74",
|
"subject_color": "#807d74",
|
||||||
"subject_color_selected": "#000000",
|
"subject_color_selected": "#000000",
|
||||||
"background_color_selected": "",
|
"background_color_selected": "",
|
||||||
"background_color_marked": "#fff584",
|
"background_color_marked": "#fff584",
|
||||||
"background_color_marked_selected": "#bcb559",
|
"background_color_marked_selected": "#bcb559",
|
||||||
"tags_length": "80",
|
"tags_length": "100",
|
||||||
"tags_upper_color": "#e5e5e5",
|
"tags_upper_color": "#e5e5e5",
|
||||||
"tags_lower_color": "#333333",
|
"tags_lower_color": "#333333",
|
||||||
"tags_alpha": "0.5",
|
"tags_alpha": "0.5",
|
||||||
@ -111,7 +129,7 @@
|
|||||||
"general": {
|
"general": {
|
||||||
"time": {
|
"time": {
|
||||||
"clock_format": "local",
|
"clock_format": "local",
|
||||||
"same_year": "%b %-e",
|
"same_year": "%-e %B",
|
||||||
"diff_year": "%x"
|
"diff_year": "%x"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -138,11 +156,11 @@
|
|||||||
"message_id_user": "",
|
"message_id_user": "",
|
||||||
"user_agent": "default",
|
"user_agent": "default",
|
||||||
"send_delay": "2",
|
"send_delay": "2",
|
||||||
"close_on_success": "false",
|
"close_on_success": "true",
|
||||||
"format_flowed": "false"
|
"format_flowed": "false"
|
||||||
},
|
},
|
||||||
"poll": {
|
"poll": {
|
||||||
"interval": "600",
|
"interval": "-1",
|
||||||
"always_full_refresh": "true"
|
"always_full_refresh": "true"
|
||||||
},
|
},
|
||||||
"attachment": {
|
"attachment": {
|
||||||
@ -150,7 +168,7 @@
|
|||||||
},
|
},
|
||||||
"thread_view": {
|
"thread_view": {
|
||||||
"open_html_part_external": "false",
|
"open_html_part_external": "false",
|
||||||
"preferred_type": "plain",
|
"preferred_type": "html",
|
||||||
"preferred_html_only": "true",
|
"preferred_html_only": "true",
|
||||||
"allow_remote_when_encrypted": "true",
|
"allow_remote_when_encrypted": "true",
|
||||||
"open_external_link": "xdg-open",
|
"open_external_link": "xdg-open",
|
||||||
@ -174,5 +192,14 @@
|
|||||||
"save_history": "true",
|
"save_history": "true",
|
||||||
"history_lines_to_show": "15",
|
"history_lines_to_show": "15",
|
||||||
"history_lines": "1000"
|
"history_lines": "1000"
|
||||||
|
},
|
||||||
|
"plugins": {
|
||||||
|
"hls_hsv_tag_color": {
|
||||||
|
"colorspace" : "hsv",
|
||||||
|
"saturation" : 0.5,
|
||||||
|
"lightness" : 0.7,
|
||||||
|
"value" : 0.9,
|
||||||
|
"alpha" : 0.9
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#
|
#
|
||||||
# $1 = message id
|
# $1 = message id
|
||||||
|
|
||||||
echo "[ASTROID] $(basename $0)"
|
echo "[Begin astroid] $(basename $0) script"
|
||||||
|
|
||||||
# All directory names relative to mail folder's root
|
# All directory names relative to mail folder's root
|
||||||
DIR_INBOX="inbox" # Inbox directory path
|
DIR_INBOX="inbox" # Inbox directory path
|
||||||
@ -27,6 +27,8 @@ notmuch tag -inbox +deleted -- "thread:${TID}" "${MID:+id:$MID}"
|
|||||||
# Move mail with afew
|
# Move mail with afew
|
||||||
afew --move-mails
|
afew --move-mails
|
||||||
|
|
||||||
|
echo "[End astroid] $(basename $0) script"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d17096379505c24e991f4435e920fca3aae61c0d
|
@ -5,101 +5,9 @@
|
|||||||
# Last Modified Date: 07.05.2020
|
# Last Modified Date: 07.05.2020
|
||||||
# Last Modified By : Jeff LANCE <email@jefflance.me>
|
# Last Modified By : Jeff LANCE <email@jefflance.me>
|
||||||
|
|
||||||
# Set some constants
|
|
||||||
MAILDIR=${HOME}/Mail
|
|
||||||
|
|
||||||
echo "[Begin astroid] $(basename $0) script"
|
# we're doing nothing here as the polling is external
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
||||||
function test_connection() {
|
|
||||||
# Check if we have a connection
|
|
||||||
status=1
|
|
||||||
if ! ping -w 1 -W 1 -c 1 mail.google.com; then
|
|
||||||
status=0
|
|
||||||
fi
|
|
||||||
echo ${status}
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_maildir() {
|
|
||||||
# Check if ${MAILDIR} exists
|
|
||||||
status=1
|
|
||||||
if [ ! -d ${MAILDIR} ]; then
|
|
||||||
status=0
|
|
||||||
fi
|
|
||||||
echo ${status}
|
|
||||||
}
|
|
||||||
|
|
||||||
function deal_with_spam() {
|
|
||||||
echo "Dealing with old spam"
|
|
||||||
notmuch tag --remove-all +deleted -spam \
|
|
||||||
-- tag:spam folder:"/junk/" date:..7d
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function purge_trash() {
|
|
||||||
echo "Purging trash"
|
|
||||||
notmuch search --output=files --format=text0 \
|
|
||||||
-- tag:deleted date:...7d \
|
|
||||||
folder:"/trash/" | xargs -0 --no-run-if-empty rm
|
|
||||||
}
|
|
||||||
|
|
||||||
function sync_mail() {
|
|
||||||
# Sync new mail.
|
|
||||||
echo "Syncing mails !"
|
|
||||||
mbsync -a
|
|
||||||
}
|
|
||||||
|
|
||||||
function tag_new() {
|
|
||||||
notmuch tag "$1 tag:inbox and $2"
|
|
||||||
}
|
|
||||||
|
|
||||||
function sync_db() {
|
|
||||||
# Import new mail into the notmuch database.
|
|
||||||
echo "Update database"
|
|
||||||
NEW_MAIL=false
|
|
||||||
if ! (notmuch new | grep "No new mail."); then
|
|
||||||
NEW_MAIL=true
|
|
||||||
|
|
||||||
## Tag test mail
|
|
||||||
#tag_new "+test" "from:email@jefflance.me and subject:TEST"
|
|
||||||
|
|
||||||
## Tag all mail from
|
|
||||||
#tag_new "+evariste" "from:ce.0932047v@ac-creteil.fr"
|
|
||||||
|
|
||||||
## We've finished processing incoming mail
|
|
||||||
#tag_new "-inbox" "tag:test"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $NEW_MAIL = true ]; then
|
|
||||||
notify-send \
|
|
||||||
-i /usr/share/notify-osd/icons/hicolor/scalable/status/notification-message-email.svg -c Mail 'New mail.' 'You received new mails.'
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function refresh() {
|
|
||||||
# Refresh the display of astroid
|
|
||||||
revision=$(notmuch count --lastmod | cut -f3)
|
|
||||||
echo "Refresh window"
|
|
||||||
astroid --refresh ${revision}
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ test_connection ]; then
|
|
||||||
if [ test_maildir ]; then
|
|
||||||
# deal_with_spam
|
|
||||||
purge_trash
|
|
||||||
# sync_mail
|
|
||||||
# sync_db
|
|
||||||
# refresh
|
|
||||||
else
|
|
||||||
echo "[ASTROID]: no maildir"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "[ASTROID]: no connection"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# We stop polling
|
|
||||||
# astroid --stop-polling
|
|
||||||
|
|
||||||
echo "[End astroid] $(basename $0) script"
|
|
||||||
|
|
||||||
# vim:ft=sh
|
# vim:ft=sh
|
||||||
|
@ -329,6 +329,47 @@
|
|||||||
"none": "gandi.net",
|
"none": "gandi.net",
|
||||||
"none": "[SPAM] folder:\/inbox\/",
|
"none": "[SPAM] folder:\/inbox\/",
|
||||||
"none": "[SPAM]",
|
"none": "[SPAM]",
|
||||||
"none": "Evariste Galois"
|
"none": "Evariste Galois",
|
||||||
|
"none": "tag:new",
|
||||||
|
"none": "tag:new",
|
||||||
|
"none": "tag:sent",
|
||||||
|
"none": "tag:sent folder:\/games@mala.fr\/",
|
||||||
|
"none": "tag:sent folder:\/jeff.lance@mala.fr\/",
|
||||||
|
"none": "MOI",
|
||||||
|
"none": "from:games@mala.fr",
|
||||||
|
"none": "tag:new",
|
||||||
|
"none": "tag:new",
|
||||||
|
"none": "tag:new",
|
||||||
|
"none": "tag:moi",
|
||||||
|
"none": "tag:archive",
|
||||||
|
"none": "tag:amazon",
|
||||||
|
"none": "tag:amazon",
|
||||||
|
"none": "tag:ovh",
|
||||||
|
"none": "tag:ovh",
|
||||||
|
"none": "tag:deleted",
|
||||||
|
"none": "tag:deleted",
|
||||||
|
"none": "tag:archive",
|
||||||
|
"none": "tag:new",
|
||||||
|
"none": "tag:moi",
|
||||||
|
"none": "subject:test 1",
|
||||||
|
"none": "subject:test 1 to:games@mala.fr",
|
||||||
|
"none": "subject:test 1 folder:games@mala.fr",
|
||||||
|
"none": "subject:test 1 folder:\/games@mala.fr\/",
|
||||||
|
"none": "subject:test 1 folder:\/games@mala.fr\/",
|
||||||
|
"none": "tag:new folder:\/games@mala.fr\/",
|
||||||
|
"none": "tag:new folder:games@mala.fr",
|
||||||
|
"none": "tag:new",
|
||||||
|
"none": "tag:new",
|
||||||
|
"none": "tag:sent folder:games@mala.fr",
|
||||||
|
"none": "from:jeff.lance@mala.fr folder:games@mala.fr",
|
||||||
|
"none": "from:jeff.lance@mala.fr",
|
||||||
|
"none": "tag:sent",
|
||||||
|
"none": "tag:sent",
|
||||||
|
"none": "tag:sent",
|
||||||
|
"none": "tag:sent",
|
||||||
|
"none": "tag:sent",
|
||||||
|
"none": "tag:sent",
|
||||||
|
"none": "tag:to-me",
|
||||||
|
"none": "Kinguin"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"username": "games@mala.fr",
|
"username": "games@mala.fr",
|
||||||
"password": "",
|
"password": "",
|
||||||
"passwordCmd": "secret-tool lookup email games@mala.fr",
|
"passwordCmd": "secret-tool lookup email games@mala.fr service imap",
|
||||||
"onNewMail": "mbsync -V games@mala.fr-inbox",
|
"onNewMail": "mbsync -V games@mala.fr-inbox",
|
||||||
"onNewMailPost": "notmuch new",
|
"onNewMailPost": "notmuch new",
|
||||||
"boxes": [
|
"boxes": [
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"username": "jlance",
|
"username": "jlance",
|
||||||
"password": "",
|
"password": "",
|
||||||
"passwordCmd": "secret-tool lookup email jean-francois.lance@ac-creteil.fr",
|
"passwordCmd": "secret-tool lookup email jean-francois.lance@ac-creteil.fr service imap",
|
||||||
"onNewMail": "mbsync -V jean-francois.lance@ac-creteil.fr-inbox",
|
"onNewMail": "mbsync -V jean-francois.lance@ac-creteil.fr-inbox",
|
||||||
"onNewMailPost": "notmuch new",
|
"onNewMailPost": "notmuch new",
|
||||||
"boxes": [
|
"boxes": [
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
},
|
},
|
||||||
"username": "jeff.lance@mala.fr",
|
"username": "jeff.lance@mala.fr",
|
||||||
"password": "",
|
"password": "",
|
||||||
"passwordCmd": "secret-tool lookup email jeff.lance@mala.fr",
|
"passwordCmd": "secret-tool lookup email jeff.lance@mala.fr service imap",
|
||||||
"onNewMail": "mbsync -V jeff.lance@mala.fr-inbox",
|
"onNewMail": "mbsync -V jeff.lance@mala.fr-inbox",
|
||||||
"onNewMailPost": "notmuch new",
|
"onNewMailPost": "notmuch new",
|
||||||
"boxes": [
|
"boxes": [
|
||||||
|
@ -2,25 +2,67 @@
|
|||||||
# File : post-new
|
# File : post-new
|
||||||
# Author : Jeff LANCE <email@jefflance.me>
|
# Author : Jeff LANCE <email@jefflance.me>
|
||||||
# Date : 10.02.2015
|
# Date : 10.02.2015
|
||||||
# Last Modified Date: 26.02.2021
|
# Last Modified Date: 01.03.2021
|
||||||
# Last Modified By : Jeff LANCE <email@jefflance.me>
|
# Last Modified By : Jeff LANCE <email@jefflance.me>
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
ASTROID_BIN=$(which astroid)
|
ASTROID_BIN=$(which astroid)
|
||||||
|
NOTMUCH_BIN=$(which notmuch)
|
||||||
|
NOTIFY_BIN=$(which notify-send)
|
||||||
|
|
||||||
echo "[Begin notmuch]: $(basename $0)"
|
|
||||||
|
|
||||||
echo "[----- notmuch]: local treatment"
|
function notify() {
|
||||||
notmuch tag --input=${HOME}/Mail/.notmuch/tagupdate
|
# count new mails and display a message
|
||||||
|
newcount=$(${NOTMUCH_BIN} count tag:new)
|
||||||
|
summary="Tu as reçu ${newcount} new message"
|
||||||
|
|
||||||
echo "[----- notmuch]: afew treatment"
|
# come on, who here doesn't actually hate "you have 1 new message(s)"?
|
||||||
|
if [ $newcount -gt 1 ]; then
|
||||||
|
summary="${summary}s"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $newcount -gt 0 ]; then
|
||||||
|
detail="$(${NOTMUCH_BIN} search --output=summary --format=json tag:new \
|
||||||
|
| sed -e 's/.*authors": "//;s/|[^"]*"/"/;s/", "subject": "/ : /;s/".*//')"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ${newcount} -gt 0 ]; then
|
||||||
|
${NOTIFY_BIN} \
|
||||||
|
-i /usr/share/notify-osd/icons/hicolor/scalable/status/notification-message-email.svg \
|
||||||
|
-c Mail "${summary}." "${detail}" -t 10000
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function refresh_ui() {
|
||||||
|
# refresh astroid ui
|
||||||
|
${ASTROID_BIN} --refresh 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# some additional tags
|
||||||
|
${NOTMUCH_BIN} tag --input=${HOME}/Mail/.notmuch/tagupdate
|
||||||
|
|
||||||
|
|
||||||
|
if [ "x${DISPLAY}" != "x" ]; then
|
||||||
|
logger -t notmuch "post-new: notify"
|
||||||
|
notify
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# run afew on mew mails and make moves
|
||||||
afew --tag --new
|
afew --tag --new
|
||||||
afew --move-mails
|
afew --move-mails
|
||||||
|
|
||||||
echo "[End notmuch]: $(basename $0)"
|
|
||||||
|
|
||||||
if [ "x${DISPLAY}" != "x" ]; then
|
if [ "x${DISPLAY}" != "x" ]; then
|
||||||
logger -t notmuch "Astroid polling stop requested during post-new hook"
|
logger -t notmuch "post-new: refresh_ui"
|
||||||
$ASTROID_BIN --stop-polling 2>&1 >/dev/null
|
refresh_ui
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
||||||
# vim:ft=sh
|
# vim:ft=sh
|
||||||
|
@ -2,20 +2,19 @@
|
|||||||
# File : pre-new
|
# File : pre-new
|
||||||
# Author : Jeff LANCE <email@jefflance.me>
|
# Author : Jeff LANCE <email@jefflance.me>
|
||||||
# Date : 04.05.2020
|
# Date : 04.05.2020
|
||||||
# Last Modified Date: 26.02.2021
|
# Last Modified Date: 01.03.2021
|
||||||
# Last Modified By : Jeff LANCE <email@jefflance.me>
|
# Last Modified By : Jeff LANCE <email@jefflance.me>
|
||||||
|
|
||||||
|
|
||||||
ASTROID_BIN=$(which astroid)
|
ASTROID_BIN=$(which astroid)
|
||||||
|
|
||||||
echo "[Begin notmuch]: $(basename $0) script"
|
|
||||||
|
|
||||||
if [ "x${DISPLAY}" != "x" ]; then
|
# purging trash
|
||||||
logger -t notmuch "Astroid polling start requested during pre-new hook";
|
notmuch search --output=files --format=text0 \
|
||||||
$ASTROID_BIN --start-polling 2>&1 >/dev/null
|
-- tag:deleted date:...7d | xargs -0 --no-run-if-empty rm
|
||||||
fi
|
|
||||||
|
|
||||||
echo "[End notmuch]: $(basename $0) script"
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|
||||||
# vim:ft=sh
|
# vim:ft=sh
|
||||||
|
@ -28,9 +28,10 @@ function s:config_mail()
|
|||||||
return [
|
return [
|
||||||
\ { 'line': 'afew', 'cmd': 'edit ${HOME}/.config/afew/' },
|
\ { 'line': 'afew', 'cmd': 'edit ${HOME}/.config/afew/' },
|
||||||
\ { 'line': 'astroid', 'cmd': 'edit ${HOME}/.config/astroid/' },
|
\ { 'line': 'astroid', 'cmd': 'edit ${HOME}/.config/astroid/' },
|
||||||
|
\ { 'line': 'imapnotify', 'cmd': 'edit ${HOME}/.config/imapnotify' },
|
||||||
\ { 'line': 'mbsync', 'cmd': 'edit ${HOME}/.mbsyncrc' },
|
\ { 'line': 'mbsync', 'cmd': 'edit ${HOME}/.mbsyncrc' },
|
||||||
\ { 'line': 'notmuch config', 'cmd': 'edit ${HOME}/.notmuch-config' },
|
\ { 'line': 'notmuch config', 'cmd': 'edit ${HOME}/.notmuch-config' },
|
||||||
\ { 'line': 'notmuch hooks', 'cmd': 'edit ${HOME}/Mail/.notmuch/hooks/' },
|
\ { 'line': 'notmuch dir', 'cmd': 'edit ${HOME}/Mail/.notmuch' },
|
||||||
\ ]
|
\ ]
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ IMAPAccount jeff.lance@mala.fr
|
|||||||
# Address to connect to
|
# Address to connect to
|
||||||
Host ssl0.ovh.net
|
Host ssl0.ovh.net
|
||||||
User jeff.lance@mala.fr
|
User jeff.lance@mala.fr
|
||||||
PassCmd "secret-tool lookup email jeff.lance@mala.fr"
|
PassCmd "secret-tool lookup email jeff.lance@mala.fr service imap"
|
||||||
# Use SSL
|
# Use SSL
|
||||||
# SSLType IMAPS
|
# SSLType IMAPS
|
||||||
SSLType None
|
SSLType None
|
||||||
@ -117,7 +117,7 @@ IMAPAccount games@mala.fr
|
|||||||
# Address to connect to
|
# Address to connect to
|
||||||
Host ssl0.ovh.net
|
Host ssl0.ovh.net
|
||||||
User games@mala.fr
|
User games@mala.fr
|
||||||
PassCmd "secret-tool lookup email games@mala.fr"
|
PassCmd "secret-tool lookup email games@mala.fr service imap"
|
||||||
# Use SSL
|
# Use SSL
|
||||||
# SSLType IMAPS
|
# SSLType IMAPS
|
||||||
SSLType None
|
SSLType None
|
||||||
@ -178,24 +178,12 @@ SyncState *
|
|||||||
Expunge Both
|
Expunge Both
|
||||||
|
|
||||||
|
|
||||||
Channel games@mala.fr-archives
|
|
||||||
Master :games@mala.fr-remote:"Archives"
|
|
||||||
Slave :games@mala.fr-local:archives
|
|
||||||
Pattern *
|
|
||||||
Create Slave
|
|
||||||
MaxMessages 500
|
|
||||||
Sync New Delete Push
|
|
||||||
SyncState *
|
|
||||||
Expunge Both
|
|
||||||
|
|
||||||
|
|
||||||
Group games@mala.fr
|
Group games@mala.fr
|
||||||
Channel games@mala.fr-inbox
|
Channel games@mala.fr-inbox
|
||||||
Channel games@mala.fr-sent
|
Channel games@mala.fr-sent
|
||||||
Channel games@mala.fr-trash
|
Channel games@mala.fr-trash
|
||||||
Channel games@mala.fr-drafts
|
Channel games@mala.fr-drafts
|
||||||
Channel games@mala.fr-junk
|
Channel games@mala.fr-junk
|
||||||
Channel games@mala.fr-archives
|
|
||||||
|
|
||||||
|
|
||||||
# jean-francois.lance@ac-creteil.fr
|
# jean-francois.lance@ac-creteil.fr
|
||||||
@ -220,32 +208,35 @@ MaildirStore jean-francois.lance@ac-creteil.fr-local
|
|||||||
SubFolders Verbatim
|
SubFolders Verbatim
|
||||||
# The trailing "/" is important
|
# The trailing "/" is important
|
||||||
Path ~/Mail/jean-francois.lance@ac-creteil.fr/
|
Path ~/Mail/jean-francois.lance@ac-creteil.fr/
|
||||||
Inbox ~/Mail/jean-francois.lance@ac-creteil.fr/INBOX
|
Inbox ~/Mail/jean-francois.lance@ac-creteil.fr/inbox
|
||||||
|
|
||||||
Channel jean-francois.lance@ac-creteil.fr-inbox
|
Channel jean-francois.lance@ac-creteil.fr-inbox
|
||||||
Master :jean-francois.lance@ac-creteil.fr-remote:
|
Master :jean-francois.lance@ac-creteil.fr-remote:
|
||||||
Slave :jean-francois.lance@ac-creteil.fr-local:
|
Slave :jean-francois.lance@ac-creteil.fr-local:
|
||||||
Patterns "INBOX"
|
Patterns "INBOX"
|
||||||
|
Sync PullNew PullDelete Push
|
||||||
|
SyncState *
|
||||||
Expunge Both
|
Expunge Both
|
||||||
|
|
||||||
Channel jean-francois.lance@ac-creteil.fr-sent
|
Channel jean-francois.lance@ac-creteil.fr-sent
|
||||||
Master :jean-francois.lance@ac-creteil.fr-remote:"Sent"
|
Master :jean-francois.lance@ac-creteil.fr-remote:"Sent"
|
||||||
Slave :jean-francois.lance@ac-creteil.fr-local:SENT
|
Slave :jean-francois.lance@ac-creteil.fr-local:sent
|
||||||
|
Sync PullNew PullDelete Push
|
||||||
|
SyncState *
|
||||||
Expunge Both
|
Expunge Both
|
||||||
|
|
||||||
Channel jean-francois.lance@ac-creteil.fr-trash
|
Channel jean-francois.lance@ac-creteil.fr-trash
|
||||||
Master :jean-francois.lance@ac-creteil.fr-remote:"Trash"
|
Master :jean-francois.lance@ac-creteil.fr-remote:"Trash"
|
||||||
Slave :jean-francois.lance@ac-creteil.fr-local:TRASH
|
Slave :jean-francois.lance@ac-creteil.fr-local:trash
|
||||||
|
Sync PullNew PullDelete Push
|
||||||
|
SyncState *
|
||||||
Expunge Both
|
Expunge Both
|
||||||
|
|
||||||
Channel jean-francois.lance@ac-creteil.fr-drafts
|
Channel jean-francois.lance@ac-creteil.fr-drafts
|
||||||
Master :jean-francois.lance@ac-creteil.fr-remote:"Drafts"
|
Master :jean-francois.lance@ac-creteil.fr-remote:"Drafts"
|
||||||
Slave :jean-francois.lance@ac-creteil.fr-local:DRAFTS
|
Slave :jean-francois.lance@ac-creteil.fr-local:drafts
|
||||||
Expunge Both
|
Sync PullNew PullDelete Push
|
||||||
|
SyncState *
|
||||||
Channel jean-francois.lance@ac-creteil.fr-spams
|
|
||||||
Master :jean-francois.lance@ac-creteil.fr-remote:"Pourriel"
|
|
||||||
Slave :jean-francois.lance@ac-creteil.fr-local:SPAMS
|
|
||||||
Expunge Both
|
Expunge Both
|
||||||
|
|
||||||
Group jean-francois.lance@ac-creteil.fr
|
Group jean-francois.lance@ac-creteil.fr
|
||||||
@ -253,7 +244,6 @@ Channel jean-francois.lance@ac-creteil.fr-inbox
|
|||||||
Channel jean-francois.lance@ac-creteil.fr-sent
|
Channel jean-francois.lance@ac-creteil.fr-sent
|
||||||
Channel jean-francois.lance@ac-creteil.fr-trash
|
Channel jean-francois.lance@ac-creteil.fr-trash
|
||||||
Channel jean-francois.lance@ac-creteil.fr-drafts
|
Channel jean-francois.lance@ac-creteil.fr-drafts
|
||||||
Channel jean-francois.lance@ac-creteil.fr-spams
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
33
conf/msmtprc
33
conf/msmtprc
@ -17,6 +17,17 @@ passwordeval "echo $(secret-tool lookup service smtp user jeff.lance@mala.fr)"
|
|||||||
auto_from off
|
auto_from off
|
||||||
from jeff.lance@mala.fr
|
from jeff.lance@mala.fr
|
||||||
|
|
||||||
|
account games@mala.fr
|
||||||
|
host ssl0.ovh.net
|
||||||
|
port 465
|
||||||
|
auth on
|
||||||
|
tls on
|
||||||
|
tls_starttls off
|
||||||
|
user games@mala.fr
|
||||||
|
passwordeval "echo $(secret-tool lookup service smtp user games@mala.fr)"
|
||||||
|
auto_from off
|
||||||
|
from games@mala.fr
|
||||||
|
|
||||||
# GMail
|
# GMail
|
||||||
account mathslance@gmail.com
|
account mathslance@gmail.com
|
||||||
host imap.gmail.com
|
host imap.gmail.com
|
||||||
@ -29,17 +40,17 @@ passwordeval "echo $(secret-tool lookup service smtp user mathslance@gmail.com)
|
|||||||
auto_from off
|
auto_from off
|
||||||
from mathslance@gmail.com
|
from mathslance@gmail.com
|
||||||
|
|
||||||
# # Ac-Montpellier
|
# Ac-creteil
|
||||||
# account montpellier
|
account creteil
|
||||||
# host smtp.ac-montpellier.fr
|
host smtp-ext.ac-montpellier.fr
|
||||||
# port 587
|
port 465
|
||||||
# auth plain
|
auth plain
|
||||||
# tls on
|
tls on
|
||||||
# tls_starttls on
|
tls_starttls on
|
||||||
# user jlance
|
user jlance
|
||||||
# passwordeval "echo $(secret-tool lookup service smtp user jlance)"
|
passwordeval "echo $(secret-tool lookup service smtp user jlance)"
|
||||||
# auto_from off
|
auto_from off
|
||||||
# from jean-francois.lance@ac-montpellier.fr
|
from jean-francois.lance@ac-montpellier.fr
|
||||||
|
|
||||||
# Set a default account
|
# Set a default account
|
||||||
account default : jeff.lance@mala.fr
|
account default : jeff.lance@mala.fr
|
||||||
|
@ -10,7 +10,7 @@ path=/home/jeff/Mail
|
|||||||
[user]
|
[user]
|
||||||
name=Jeff LANCE
|
name=Jeff LANCE
|
||||||
primary_email=jeff.lance@mala.fr
|
primary_email=jeff.lance@mala.fr
|
||||||
# other_email=mathslance@gmail.com
|
other_email=jean-francois.lance@ac-creteil.fr;games@mala.fr;mathslance@gmail.com
|
||||||
|
|
||||||
[new]
|
[new]
|
||||||
tags=new;
|
tags=new;
|
||||||
|
Loading…
Reference in New Issue
Block a user