Skip to content

Commit

Permalink
mail-prepender.sh only 1st Return-Path is special
Browse files Browse the repository at this point in the history
If the first line had Return-Path, the second line is never special.
  • Loading branch information
oh2fih committed Jan 1, 2024
1 parent fbc59c3 commit 55a611a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions bin/mail-prepender.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,18 @@ read -r line
if [[ "$line" =~ ^(From|Return-Path:)\ .* ]]; then
echo "$line"
firstLine=""
if [[ "$line" =~ ^From\ .* ]]; then
read -r line
if [[ "$line" =~ ^Return-Path:\ .* ]]; then
echo "$line"
secondLine=""
else
secondLine="$line"
fi
fi
else
firstLine="$line"
fi
read -r line
if [[ "$line" =~ ^Return-Path:\ .* ]]; then
echo "$line"
secondLine=""
else
read -r line
secondLine="$line"
fi

Expand Down

0 comments on commit 55a611a

Please sign in to comment.