/[smeserver]/rpms/qpsmtpd/sme9/qpsmtpd-0.96-fix_dmarc_reject.patch
ViewVC logotype

Contents of /rpms/qpsmtpd/sme9/qpsmtpd-0.96-fix_dmarc_reject.patch

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


Revision 1.1 - (show annotations) (download)
Fri May 6 19:58:08 2016 UTC (8 years, 6 months ago) by vip-ire
Branch: MAIN
CVS Tags: qpsmtpd-0_96-5_el6_sme, qpsmtpd-0_96-1_el6_sme, qpsmtpd-0_96-6_el6_sme, qpsmtpd-0_96-8_el6_sme, qpsmtpd-0_96-7_el6_sme, qpsmtpd-0_96-2_el6_sme, qpsmtpd-0_96-4_el6_sme, qpsmtpd-0_96-3_el6_sme, qpsmtpd-0_96-10_el6_sme, qpsmtpd-0_96-11_el6_sme, qpsmtpd-0_96-9_el6_sme, HEAD
Update to 0.96

1 diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.96/docs/hooks.md mezzanine_patched_qpsmtpd-0.96/docs/hooks.md
2 --- qpsmtpd-0.96/docs/hooks.md 2016-02-16 23:52:02.000000000 +0100
3 +++ mezzanine_patched_qpsmtpd-0.96/docs/hooks.md 2016-05-03 21:56:38.216306190 +0200
4 @@ -343,26 +343,20 @@
5
6 The `data_post_headers` hook is called after the client sends the final .\r\n of
7 a message and before the message is processed by `data_post`. This hook is
8 -primarily used by plugins that insert new headers (ex: Received-SPF) and/or
9 +used by plugins that insert new headers (ex: Received-SPF) and/or
10 modify headers such as appending to Authentication-Results (SPF, DKIM, DMARC).
11
12 When it is desirable to have these header modifications evaluated by filtering
13 software (spamassassin, dspam, etc.) running on `data_post`, this hook should be
14 used instead of `data_post`.
15
16 -Allowed return codes are
17 -
18 -- DENY
19 -
20 - Return a hard failure code
21 +Note that you cannot reject in this hook, use the data_post hook instead
22
23 -- DENYSOFT
24 -
25 - Return a soft failure code
26 +Allowed return codes are
27
28 -- DENY\_DISCONNECT / DENYSOFT\_DISCONNECT
29 +- DECLINED
30
31 - as above but with disconnect
32 + Do nothing
33
34 ## hook\_data\_post
35
36 diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.96/plugins/dmarc mezzanine_patched_qpsmtpd-0.96/plugins/dmarc
37 --- qpsmtpd-0.96/plugins/dmarc 2016-02-16 23:52:02.000000000 +0100
38 +++ mezzanine_patched_qpsmtpd-0.96/plugins/dmarc 2016-05-03 21:57:11.943312651 +0200
39 @@ -102,6 +102,7 @@
40 else {
41 $self->{_dmarc} = Mail::DMARC::PurePerl->new();
42 $self->register_hook('data_post_headers', 'check_dmarc');
43 + $self->register_hook('data_post', 'reject_dmarc');
44 };
45 }
46
47 @@ -189,6 +190,13 @@
48 return DECLINED if $self->is_immune;
49
50 $self->adjust_karma(-3);
51 -# at what point do we reject?
52 - return $self->get_reject("failed DMARC policy");
53 + # Add a mark now so the data_post hook can do the real reject
54 + $transaction->notes('reject_dmarc', '1');
55 +}
56 +
57 +sub reject_dmarc {
58 + my ($self, $transaction) = @_;
59 + return $self->get_reject("failed DMARC policy")
60 + if ($transaction->notes('reject_dmarc'));
61 + return DECLINED;
62 }

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