1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
Index: dk-filter/dk-filter.c
===================================================================
RCS file: /cvs/dk-filter/dk-filter.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -r1.158 -r1.159
--- dk-filter/dk-filter.c 19 May 2006 21:42:05 -0000 1.158
+++ dk-filter/dk-filter.c 26 Jun 2006 19:41:23 -0000 1.159
@@ -1625,6 +1625,8 @@
}
#endif /* _FFR_REQUIRED_HEADERS */
+ msgsigned = (dkf_findheader(dfc, DK_SIGNHEADER, 0) != NULL);
+
/* find the Sender: or From: header */
memset(addr, '\0', sizeof addr);
from = dkf_findheader(dfc, "Sender", 0);
@@ -1639,7 +1641,8 @@
dfc->mctx_jobid);
}
- dfc->mctx_addheader = TRUE;
+ if (msgsigned)
+ dfc->mctx_addheader = TRUE;
dfc->mctx_headeronly = TRUE;
dfc->mctx_status = DKF_STATUS_BADFORMAT;
return SMFIS_CONTINUE;
@@ -1669,7 +1672,6 @@
originok = FALSE;
/* is it a domain we sign for? */
- msgsigned = (dkf_findheader(dfc, DK_SIGNHEADER, 0) != NULL);
if (!msgsigned && domains != NULL && dfc->mctx_domain != NULL)
{
int n;
Index: libdk/dk.c
===================================================================
RCS file: /cvs/libdk/dk.c,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -r1.168 -r1.169
--- libdk/dk.c 6 Jun 2006 23:22:45 -0000 1.168
+++ libdk/dk.c 26 Jun 2006 19:40:00 -0000 1.169
@@ -1890,8 +1890,6 @@
else
hdr = sender;
- /* if we found a signature but the sender doesn't match it, say so */
-
/* if verifying and no from/sender header was found, short-circuit */
if (hdr == NULL && dk->dk_mode == DK_MODE_VERIFY)
{
@@ -1924,6 +1922,7 @@
return DK_STAT_OK;
}
+ /* if we found a signature but the sender doesn't match it, say so */
if (hdr != NULL)
{
int status;
@@ -2418,7 +2417,7 @@
int status;
/* no sender header was found below the signature */
- if (dk->dk_skipbody)
+ if (dk->dk_skipbody && dk->dk_processing)
return DK_STAT_SYNTAX;
if (dk->dk_key == NULL)
|