/[smeserver]/rpms/qpsmtpd/sme7/0038-Patch-FATAL-PLUGIN-ERROR-check_basicheaders.patch
ViewVC logotype

Contents of /rpms/qpsmtpd/sme7/0038-Patch-FATAL-PLUGIN-ERROR-check_basicheaders.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Jul 19 04:22:58 2012 UTC (12 years, 3 months ago) by wellsi
Branch: MAIN
CVS Tags: qpsmtpd-0_83-0_9_el4_sme, qpsmtpd-0_83-0_10_el4_sme, HEAD
Fix fatal errors when mail has no headers [SME: 6386]

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

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed