diff --git a/astroid/poll.sh b/astroid/poll.sh index 33ee715..ef8d198 100755 --- a/astroid/poll.sh +++ b/astroid/poll.sh @@ -21,6 +21,10 @@ sync=`date +%s` echo "[DEBUG] Sync notmuch database with new mails" notmuch new +# Inbox (first time) +echo "[DEBUG] Tag mails in in INBOX folder" +notmuch tag +inbox -- path:INBOX/** + # Move selectedly tagged mails to folders if they are only in INBOX echo "[DEBUG] Move tagged mails in INBOX to folders (move-tag.sh)" bash $CURDIR/scripts/move-tag.sh ${var_conn} @@ -35,7 +39,7 @@ notmuch new echo "[DEBUG] Tag mails in offline ARCHIVE folder" notmuch tag +archive -- path:ARCHIVE/** -# Inbox +# Inbox (2nd time) echo "[DEBUG] Tag mails in in INBOX folder" notmuch tag +inbox -- path:INBOX/**