Skip to content

Commit

Permalink
Performance fix (#222)
Browse files Browse the repository at this point in the history
Fixes Issue #221
  • Loading branch information
shawniverson committed Sep 4, 2018
1 parent ddc1e55 commit 5083b4e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions common/usr/sbin/MSMilter
Expand Up @@ -330,11 +330,8 @@ sub eom_callback
# Write beginning of second received header
$queuehandle->print($buffer2);

# Add header info up to this point
while (${$message_ref} =~ /(.*)\n?/g) {
my $line = $1;
$queuehandle->print($line . "\n");
}
# Write rest of message to disk in single write
$queuehandle->print(${$message_ref});

$queuehandle->flush();
MailScanner::Lock::unlockclose($queuehandle);
Expand Down

0 comments on commit 5083b4e

Please sign in to comment.