annotate src/dccifd.h @ 407:29d54e7028f6 stable-6-0-54

document dmarc vs dnsbl dkim/spf; switch to . rather than " " for dkim impossible signer
author Carl Byington <carl@five-ten-sg.com>
date Thu, 30 Mar 2017 10:26:30 -0700
parents 82886d4dd71f
children 5209e92b4885
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
196
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
1 /*
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
2
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
3 Copyright (c) 2007 Carl Byington - 510 Software Group, released under
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
4 the GPL version 3 or any later version at your choice available at
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
5 http://www.gnu.org/licenses/gpl-3.0.txt
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
6
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
7 */
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
8
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
9 #ifndef _DCCIFD_H
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
10 #define _DCCIFD_H
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
11
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
12 extern "C" {
214
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
13 #include <libmilter/mfapi.h>
196
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
14 }
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
15
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
16 #ifdef HAVE_CDEFS_H
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
17 #include <sys/cdefs.h>
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
18 #endif
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
19
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
20 #include <list>
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
21
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
22 using namespace std;
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
23
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
24 class mlfiPriv;
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
25
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
26 class DccInterface {
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
27 public:
214
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
28 DccInterface(const char *port_, mlfiPriv *priv_, int ip, const char *helo_, const char *from);
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
29 ~DccInterface();
196
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
30
214
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
31 void mlfi_envrcpt(SMFICTX *ctx, const char *envrcpt, bool grey);
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
32 void mlfi_header(SMFICTX *ctx, const char *headerf, const char *headerv);
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
33 void mlfi_eoh();
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
34 void mlfi_body(const u_char *bodyp, size_t bodylen);
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
35 void mlfi_eom(bool &grey, int &bulk);
196
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
36
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
37 private:
214
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
38 void my_disconnect();
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
39 void Connect();
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
40 size_t my_write(const char *buf, size_t len);
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
41 size_t my_read(char *buf, size_t len);
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
42 void output(const char *buffer, size_t size);
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
43 void output(const char *buffer);
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
44 void output(string buffer);
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
45 void close_output();
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
46 void input();
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
47 const char *getmacro(SMFICTX *ctx, const char *macro, const char *def);
196
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
48
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
49 public:
214
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
50 bool err; // socket write error
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
51 bool first_recipient; // have we not seen any recipients?
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
52 bool first_header; // have we not seen any headers?
196
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
53
214
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
54 // connection back to main dnsbl priv structure for logging
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
55 mlfiPriv *priv;
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
56 int ip4; // ip4 address of smtp client
196
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
57
214
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
58 // strings owned by main dnsbl
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
59 const char *helo; // client helo value
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
60 const char *envfrom; // envelope from value for this message
196
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
61
214
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
62 // Process handling variables
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
63 int dccifd_socket;
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
64 const char *dccifd_port;
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
65 string dccifd_output; // to dccifd socket
82886d4dd71f Fixes to compile on Fedora 9 and for const correctness.
Carl Byington <carl@five-ten-sg.com>
parents: 196
diff changeset
66 string dccifd_input; // from dccifd socket
196
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
67 };
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
68
ff6d14d75b1e add missing files to cvs
carl
parents:
diff changeset
69 #endif