From 60e424689d8dc1afbdef2e663901ecab756736f4 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Tue, 27 Feb 2024 19:31:40 -0800 Subject: [PATCH] Handle case where we can't figure out the from https://github.com/webmin/usermin/issues/109 --- sendmail/autoreply.pl | 6 ++++++ 1 file changed, 6 insertions(+) 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) {