aboutsummaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2025-01-12 11:10:24 +0800
committerHsieh Chin Fan <pham@topo.tw>2025-01-12 11:10:24 +0800
commite3e0ff126bc5338d45390f435e91d83ffd653a7c (patch)
treeb0a953b4cf74c0e69851cc5aabc80d91bec98ee1 /bin
parentf19e3f5f4b05d83c751477f823a6b1544bf5b7b3 (diff)
Update
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mail/deliver.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/mail/deliver.sh b/bin/mail/deliver.sh
index d50f2cc..e6385af 100755
--- a/bin/mail/deliver.sh
+++ b/bin/mail/deliver.sh
@@ -16,7 +16,7 @@ if [ -z $log ]; then
16fi 16fi
17 17
18exec 2>>$log 18exec 2>>$log
19shopt -s nocasematch 19shopt -s nocasematch extglob
20 20
21# update index for dovecot 21# update index for dovecot
22trap 'doveadm force-resync ${mailbox:-/}' EXIT 22trap 'doveadm force-resync ${mailbox:-/}' EXIT
@@ -52,7 +52,10 @@ print_mail() {
52 52
53# save each field of header into vars 53# save each field of header into vars
54# TODO Use GNU MailUtils to save header 54# TODO Use GNU MailUtils to save header
55while IFS=': ' read field value; do 55while read line; do
56 [[ "${line}" =~ ^" " ]] && ${field}+=" ${line##*( )}" && continue
57
58 IFS=': ' read field value <<<"${line}"
56 field="${field^^}" 59 field="${field^^}"
57 field="${field//-/_}" 60 field="${field//-/_}"
58 declare ${field}="${value}" 61 declare ${field}="${value}"