diff --git a/sendmail/autoreply.pl b/sendmail/autoreply.pl index f1134647c..b076e9ef1 100755 --- a/sendmail/autoreply.pl +++ b/sendmail/autoreply.pl @@ -235,6 +235,12 @@ if (@must_regexp) { } } +# Check if we have a From address +if (!$rheader{'From'}) { + print STDERR "Could not work out From address\n"; + exit 0; + } + # if spamassassin is installed, feed the email to it $spam = &has_command("spamassassin"); if ($spam) {