Jonáš Dujava преди 3 месеца
committed by GitHub
родител
ревизия
557cc6726b
No known key found for this signature in database 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#\"}"


Зареждане…
Отказ
Запис