aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2025-01-12 09:48:11 +0800
committerHsieh Chin Fan <pham@topo.tw>2025-01-12 09:48:18 +0800
commitf19e3f5f4b05d83c751477f823a6b1544bf5b7b3 (patch)
treea5b5e059a2f764728ce471b363819413fc973749 /bin
parentac6ecd6b3399309b3e1baf68a4aa7782487925f6 (diff)
Update
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mail/deliver.sh29
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 MAIL 81 MAIL
82 } 82 }
83elif [[ "$FROM" =~ notifications@github.com || "$RETURN_PATH" =~ noreply@github.com ]]; then 83elif [[ "${FROM}${RETURN_PATH}" =~ notifications@github.com|noreply@github.com ]]; then
84 mailbox=DEV/github 84 mailbox=DEV/github
85elif [[ "$SUBJECT" =~ 帳單|轉帳|對帳|付款|發票|消費|繳費|收據|費用|Invoice|Billing ]]; then 85elif [[ "${SUBJECT}" =~ 帳單|轉帳|對帳|付款|發票|消費|繳費|收據|費用|Invoice|Billing ]]; then
86 mailbox=pay 86 mailbox=pay
87elif [[ "$SUBJECT" =~ 未讀|unread ]]; then 87elif [[ "${TO}" =~ dmarc@topo.tw ]]; then
88 mailbox=update
89elif [[ "$TO" =~ dmarc@topo.tw ]]; then
90 mailbox=DEV/dmarc 88 mailbox=DEV/dmarc
91elif [[ "$LIST_ID" =~ ^'Open Street Map Taiwan' ]]; then 89elif [[ "${LIST_ID}" =~ ^'Open Street Map Taiwan' ]]; then
92 mailbox=FOSS/osm 90 mailbox=FOSS/osm
93elif [[ "$TO" =~ talk-ja@openstreetmap.org ]]; then 91elif [[ "${TO}" =~ talk-ja@openstreetmap.org ]]; then
94 mailbox=LIST/talk-ja 92 mailbox=LIST/talk-ja
95elif [[ "$LIST_ID" =~ ^~rjarry/aerc-discuss ]]; then 93elif [[ "${LIST_ID}" =~ ^~rjarry/aerc-discuss ]]; then
96 mailbox=LIST/aerc 94 mailbox=LIST/aerc
97elif [[ "$LIST_ID" =~ '<mutt-users.mutt.org>' ]]; then 95elif [[ "${LIST_ID}" =~ '<mutt-users.mutt.org>' ]]; then
98 mailbox=LIST/mutt 96 mailbox=LIST/mutt
99elif [[ -n "${LIST_ID}" || "$SUBJECT" =~ 電子報|newsletter|快訊 ]]; then 97elif [[ -n "${LIST_ID}" || "${SUBJECT}" =~ 電子報|newsletter|快訊 ]]; then
100 mailbox=news 98 mailbox=news
101elif [[ "$SUBJECT" =~ login|verify|sign-in|密碼|安全性警示|登入 ]]; then 99elif [[ "${SUBJECT}" =~ login|verify|sign-in|密碼|安全性警示|登入 ]]; then
102 mailbox=login 100 mailbox=login
103elif [[ "$TO" = cloudflare@topo.tw ]]; then 101elif [[ "${TO}" = cloudflare@topo.tw ]]; then
104 mailbox=SRV/cloudflare 102 mailbox=SRV/cloudflare
105elif [[ "$SUBJECT" =~ summary ]]; then 103elif [[ "${SUBJECT}" =~ 未讀|快訊|更新|核對表|unread|summary ]]; then
106 mailbox=update 104 mailbox=update
107elif [[ "${SUBJECT}${FROM}" =~ eDM ]]; then 105elif [[ "${SUBJECT}${FROM}" =~ eDM|願望清單 ]]; then
108 mailbox=MISC/promote 106 mailbox=MISC/promote
107# This is for greenpeace
108elif [[ ${TO} =~ tienling.chou@topo.tw ]]; then
109 mailbox=update
109fi 110fi
110 111
111# deliver mail to mailbox 112# deliver mail to mailbox