summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsplit-mailman-mails-and-discard-and-save5
1 files changed, 4 insertions, 1 deletions
diff --git a/split-mailman-mails-and-discard-and-save b/split-mailman-mails-and-discard-and-save
index c7eb2c1..6ef6c53 100755
--- a/split-mailman-mails-and-discard-and-save
+++ b/split-mailman-mails-and-discard-and-save
@@ -240,8 +240,11 @@ def process_mail(filename)
# rewrite Delivered-To to X-OLD-Delivered-To to avoid mail loop warnings.
m = message.to_s.split(/\n/)
new_m = []
- while m.size > 0 and (line = m.shift) != ""
+ while true
+ break if m.size == 0
+ line = m.shift
new_m << line.gsub(/^Delivered-To:/, 'X-OLD-Delivered-To:')
+ break if line == ""
end
new_m.concat m
store_in_maildir(OUTBOX_HUMANS, m.join("\n"))