1 |
stephdl |
1.1 |
From 24d09fa4a9b3e062696257d8b37b17706eed0e2b Mon Sep 17 00:00:00 2001 |
2 |
|
|
From: Charlie Brady <charlieb-qpsmtpd@budge.apana.org.au> |
3 |
|
|
Date: Mon, 8 Nov 2010 16:42:43 -0500 |
4 |
|
|
Subject: Patch: FATAL PLUGIN ERROR [check_basicheaders]: ... |
5 |
|
|
|
6 |
|
|
check_basicheaders fails if there are no headers at all: |
7 |
|
|
|
8 |
|
|
http://bugs.contribs.org/show_bug.cgi?id=6345 |
9 |
|
|
--- |
10 |
|
|
plugins/check_basicheaders | 5 +++-- |
11 |
|
|
1 files changed, 3 insertions(+), 2 deletions(-) |
12 |
|
|
|
13 |
|
|
diff --git a/plugins/check_basicheaders b/plugins/check_basicheaders |
14 |
|
|
index f96bbe6..17bdbb4 100644 |
15 |
|
|
--- a/plugins/check_basicheaders |
16 |
|
|
+++ b/plugins/check_basicheaders |
17 |
|
|
@@ -46,10 +46,11 @@ sub hook_data_post { |
18 |
|
|
return (DENY, "You have to send some data first") |
19 |
|
|
if $transaction->data_size == 0; |
20 |
|
|
|
21 |
|
|
+ my $header = $transaction->header; |
22 |
|
|
return (DENY, "Mail with no From header not accepted here") |
23 |
|
|
- unless $transaction->header->get('From'); |
24 |
|
|
+ unless $header && $header->get('From'); |
25 |
|
|
|
26 |
|
|
- my $date = $transaction->header->get('Date'); |
27 |
|
|
+ my $date = $header->get('Date'); |
28 |
|
|
|
29 |
|
|
return (DENY, "Mail with no Date header not accepted here") |
30 |
|
|
unless $date; |
31 |
|
|
-- |
32 |
|
|
1.7.2.2 |
33 |
|
|
|