diff options
-rwxr-xr-x | bin/extract-attachment | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/extract-attachment b/bin/extract-attachment index 0cce7a1..1411270 100755 --- a/bin/extract-attachment +++ b/bin/extract-attachment @@ -63,6 +63,8 @@ for end in ${borders}; do t s@^Content-Type: application/zip; name="\([^"]\+\.zip\)"$@\1@ t + s@^Content-Type: application/gzip; \([^;]\+; \)*name="\([^"]\+\.gz\)"$@\1@ + t d ' \ | tr -d '"/' \ @@ -75,7 +77,7 @@ for end in ${borders}; do ) if printf '%s\n' "${filtered_cnt}" \ - | grep -qx '^Content-Transfer-Encoding: \(base\|BASE\)64\s*$' \ + | grep -qx '^Content-Transfer-Encoding: [Bb][Aa][Ss][Ee]64\s*$' \ && [ -n "${file_name}" ]; then decode=true break |