Skip to content

Instantly share code, notes, and snippets.

@neingeist
Created January 16, 2012 08:20
Show Gist options
  • Save neingeist/1619725 to your computer and use it in GitHub Desktop.
Save neingeist/1619725 to your computer and use it in GitHub Desktop.
maildrop .mailfilter recipe to add task to taskwarrior via email
#----------------------------------------------------------------------
# add a task to taskwarrior
#----------------------------------------------------------------------
if (/^From:.*VALIDSENDER@EXAMPLE.COM/ && /^To:.*taskwarrior@/)
{
# save a copy
cc "$MAILDIR/.task/"
# extract subject and add task
xfilter "reformail -x Subject:"
/[[:alnum:][:blank:][:punct:]]*/
log "add task $MATCH"
`task add +frommail due:today "$MATCH"`
exit
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment