summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--email_in.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/email_in.pl b/email_in.pl
index 81637ebc4..12be24471 100644
--- a/email_in.pl
+++ b/email_in.pl
@@ -287,6 +287,8 @@ sub html_strip {
$var =~ s/\>/>/g;
$var =~ s/\"/\"/g;
$var =~ s/@/@/g;
+ # Also remove undesired newlines and consecutive spaces.
+ $var =~ s/[\n\s]+/ /gms;
return $var;
}
@@ -312,7 +314,7 @@ sub die_handler {
my $reply = reply(to => $input_email, top_post => 1, body => "$msg\n");
MessageToMTA($reply->as_string);
}
- print STDERR $msg;
+ print STDERR "$msg\n";
# We exit with a successful value, because we don't want the MTA
# to *also* send a failure notice.
exit;