浏览代码

Merge 43eceb5536 into 7129fa0597

pull/999/merge
Jonáš Dujava 3 个月前
committed by GitHub
父节点
当前提交
557cc6726b
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. +4
    -3
      bin/mailsync

+ 4
- 3
bin/mailsync 查看文件

@@ -70,9 +70,10 @@ syncandnotify() {
echo "$newcount new mail for $2."
[ -z "$MAILSYNC_MUTE" ] &&
for file in $new; do
# Extract and decode subject and sender from mail.
subject="$(sed -n "/^Subject:/ s|Subject: *|| p" "$file" |
perl -CS -MEncode -ne 'print decode("MIME-Header", $_)')"
# Extract and decode subject and sender from mail.
subject=$(awk '/^Subject: / && ++n == 1,/^.*: / && ++i == 2' "$file" | head -n-1 |
perl -CS -MEncode -ne 'print decode("MIME-Header", $_)' |
sed 's/^Subject: //' | tr -d '\n\t')
from="$(sed -n "/^From:/ s|From: *|| p" "$file" |
perl -CS -MEncode -ne 'print decode("MIME-Header", $_)')"
from="${from% *}" ; from="${from%\"}" ; from="${from#\"}"


正在加载...
取消
保存