diff options
Diffstat (limited to 'bin/mail/deliver.sh')
-rwxr-xr-x | bin/mail/deliver.sh | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/bin/mail/deliver.sh b/bin/mail/deliver.sh index d0ab6b8..d50f2cc 100755 --- a/bin/mail/deliver.sh +++ b/bin/mail/deliver.sh | |||
@@ -80,32 +80,33 @@ if [[ "$SENDER" = pham@topo.tw && -n $CHAT_VERSION ]]; then | |||
80 | $(sed 1d <<<"$body") | 80 | $(sed 1d <<<"$body") |
81 | 81 | ||
82 | } | 82 | } |
83 | elif [[ "$FROM" =~ notifications@github.com || "$RETURN_PATH" =~ noreply@github.com ]]; then | 83 | elif [[ "${FROM}${RETURN_PATH}" =~ notifications@github.com|noreply@github.com ]]; then |
84 | mailbox=DEV/github | 84 | mailbox=DEV/github |
85 | elif [[ "$SUBJECT" =~ 帳單|轉帳|對帳|付款|發票|消費|繳費|收據|費用|Invoice|Billing ]]; then | 85 | elif [[ "${SUBJECT}" =~ 帳單|轉帳|對帳|付款|發票|消費|繳費|收據|費用|Invoice|Billing ]]; then |
86 | mailbox=pay | 86 | mailbox=pay |
87 | elif [[ "$SUBJECT" =~ 未讀|unread ]]; then | 87 | elif [[ "${TO}" =~ dmarc@topo.tw ]]; then |
88 | mailbox=update | ||
89 | elif [[ "$TO" =~ dmarc@topo.tw ]]; then | ||
90 | mailbox=DEV/dmarc | 88 | mailbox=DEV/dmarc |
91 | elif [[ "$LIST_ID" =~ ^'Open Street Map Taiwan' ]]; then | 89 | elif [[ "${LIST_ID}" =~ ^'Open Street Map Taiwan' ]]; then |
92 | mailbox=FOSS/osm | 90 | mailbox=FOSS/osm |
93 | elif [[ "$TO" =~ talk-ja@openstreetmap.org ]]; then | 91 | elif [[ "${TO}" =~ talk-ja@openstreetmap.org ]]; then |
94 | mailbox=LIST/talk-ja | 92 | mailbox=LIST/talk-ja |
95 | elif [[ "$LIST_ID" =~ ^~rjarry/aerc-discuss ]]; then | 93 | elif [[ "${LIST_ID}" =~ ^~rjarry/aerc-discuss ]]; then |
96 | mailbox=LIST/aerc | 94 | mailbox=LIST/aerc |
97 | elif [[ "$LIST_ID" =~ '<mutt-users.mutt.org>' ]]; then | 95 | elif [[ "${LIST_ID}" =~ '<mutt-users.mutt.org>' ]]; then |
98 | mailbox=LIST/mutt | 96 | mailbox=LIST/mutt |
99 | elif [[ -n "${LIST_ID}" || "$SUBJECT" =~ 電子報|newsletter|快訊 ]]; then | 97 | elif [[ -n "${LIST_ID}" || "${SUBJECT}" =~ 電子報|newsletter|快訊 ]]; then |
100 | mailbox=news | 98 | mailbox=news |
101 | elif [[ "$SUBJECT" =~ login|verify|sign-in|密碼|安全性警示|登入 ]]; then | 99 | elif [[ "${SUBJECT}" =~ login|verify|sign-in|密碼|安全性警示|登入 ]]; then |
102 | mailbox=login | 100 | mailbox=login |
103 | elif [[ "$TO" = cloudflare@topo.tw ]]; then | 101 | elif [[ "${TO}" = cloudflare@topo.tw ]]; then |
104 | mailbox=SRV/cloudflare | 102 | mailbox=SRV/cloudflare |
105 | elif [[ "$SUBJECT" =~ summary ]]; then | 103 | elif [[ "${SUBJECT}" =~ 未讀|快訊|更新|核對表|unread|summary ]]; then |
106 | mailbox=update | 104 | mailbox=update |
107 | elif [[ "${SUBJECT}${FROM}" =~ eDM ]]; then | 105 | elif [[ "${SUBJECT}${FROM}" =~ eDM|願望清單 ]]; then |
108 | mailbox=MISC/promote | 106 | mailbox=MISC/promote |
107 | # This is for greenpeace | ||
108 | elif [[ ${TO} =~ tienling.chou@topo.tw ]]; then | ||
109 | mailbox=update | ||
109 | fi | 110 | fi |
110 | 111 | ||
111 | # deliver mail to mailbox | 112 | # deliver mail to mailbox |