summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-05-21 00:50:39 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-05-21 00:50:39 +0200
commitd3594888000fbc0a8da0dd0978d2de403511e753 (patch)
tree392f64002223439e0d0c05cf2388450a68534191 /src
parent70e572f5458aafd0ff7c555d75cf1abc1a575c47 (diff)
downloadmum-d3594888000fbc0a8da0dd0978d2de403511e753.tar.gz
Add M-Status header
Diffstat (limited to 'src')
-rwxr-xr-xsrc/pop15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/pop b/src/pop
index 8151010..dbdd8c6 100755
--- a/src/pop
+++ b/src/pop
@@ -23,11 +23,9 @@ if (@ARGV != 2) {
my ($mbox, $index, @existing_uids);
if (-e $ARGV[1]) {
open $index, '<', $ARGV[1] or die "Could not open $ARGV[1]: $!";
- {
- local $/ = ''; # paragraph mode
- while (<$index>) {
- push @existing_uids, $1 if /^UID: (.*)$/m;
- }
+ local $/ = ''; # paragraph mode
+ while (<$index>) {
+ push @existing_uids, $1 if /^M-UID: (.*)$/m;
}
close $index;
}
@@ -112,9 +110,10 @@ $from_
MBOX
print $index <<INDEX;
$from_
-UID: $uids{$id}
-Offset: $offset
-Message-Length: $message_length
+M-Offset: $offset
+M-Length: $message_length
+M-Status: 00
+M-UID: $uids{$id}
@msg[0..$j-1]
INDEX