Created
September 23, 2025 19:52
-
-
Save jogerj/1069e4189f05f5c2a3cadb4f2b0bec10 to your computer and use it in GitHub Desktop.
Files incoming messages into subfolders of Inbox by YYYY-MM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require ["date", "fileinto", "variables"]; | |
| if date :matches "date" "year" "*" { | |
| set "year" "${1}"; | |
| } | |
| if date :matches "date" "month" "*" { | |
| if string :matches "${1}" "?" { | |
| set "month" "0${1}"; | |
| } else { | |
| set "month" "${1}"; | |
| } | |
| } | |
| fileinto "INBOX.${year}-${month}"; | |
| stop; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment