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
     local valid = {
40
     local valid = {
41
         newmail = true,
41
         newmail = true,
42
         rewind = true,
42
         rewind = true,
43
-        cleanup = true
43
+        cleanup = true,
44
+        migrate = true
44
     }
45
     }
45
     if not valid[action] then
46
     if not valid[action] then
46
         error("invalid action: " .. action)
47
         error("invalid action: " .. action)

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

8
     mkusage "newmail" \
8
     mkusage "newmail" \
9
             "rewind" \
9
             "rewind" \
10
             "cleanup" \
10
             "cleanup" \
11
+            "migrate" \
11
          -- "newmail - check for and file new mail" \
12
          -- "newmail - check for and file new mail" \
12
             "rewind - re-add messages from FILTER_FAIL back" \
13
             "rewind - re-add messages from FILTER_FAIL back" \
13
             "       to FILTER_QUEUE" \
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
 mkcmd() {
19
 mkcmd() {
47
         *)  break ;;
49
         *)  break ;;
48
     esac done
50
     esac done
49
     Action="$1"; shift
51
     Action="$1"; shift
50
-    grep -qw "$Action" <<< "newmail|rewind|cleanup" || usage
52
+    grep -qw "$Action" <<< "newmail|rewind|cleanup|migrate" || usage
51
     cmd=$(mkcmd)
53
     cmd=$(mkcmd)
52
     debug -v cmd
54
     debug -v cmd
53
     bash -n <<<"$cmd" || die
55
     bash -n <<<"$cmd" || die