Browse Source

Add "migrate" action ot imapdomo

Alois Mahdal 8 years ago
parent
commit
754b3ef8d7
2 changed files with 6 additions and 3 deletions
  1. 2
    1
      dotfiles/imapdomo/common.lua
  2. 4
    2
      dotfiles/imapdomo/utils/imapdomo

+ 2
- 1
dotfiles/imapdomo/common.lua View File

@@ -40,7 +40,8 @@ function handle(action, basepaths)
40 40
     local valid = {
41 41
         newmail = true,
42 42
         rewind = true,
43
-        cleanup = true
43
+        cleanup = true,
44
+        migrate = true
44 45
     }
45 46
     if not valid[action] then
46 47
         error("invalid action: " .. action)

+ 4
- 2
dotfiles/imapdomo/utils/imapdomo View File

@@ -8,10 +8,12 @@ usage() {
8 8
     mkusage "newmail" \
9 9
             "rewind" \
10 10
             "cleanup" \
11
+            "migrate" \
11 12
          -- "newmail - check for and file new mail" \
12 13
             "rewind - re-add messages from FILTER_FAIL back" \
13 14
             "       to FILTER_QUEUE" \
14
-            "cleanup - delete or archive old messages"
15
+            "cleanup - delete or archive old messages" \
16
+            "migrate - move mail between mailboxes"
15 17
 }
16 18
 
17 19
 mkcmd() {
@@ -47,7 +49,7 @@ main() {
47 49
         *)  break ;;
48 50
     esac done
49 51
     Action="$1"; shift
50
-    grep -qw "$Action" <<< "newmail|rewind|cleanup" || usage
52
+    grep -qw "$Action" <<< "newmail|rewind|cleanup|migrate" || usage
51 53
     cmd=$(mkcmd)
52 54
     debug -v cmd
53 55
     bash -n <<<"$cmd" || die