comparison src/spamass.h @ 167:9b129ed78d7d stable-6-0-6

actually use spamassassin result, allow build without spam assassin, only call it if some recipient needs it.
author carl
date Mon, 27 Aug 2007 20:49:19 -0700
parents 97d7da45fe2a
children 6bac960af6b4
comparison
equal deleted inserted replaced
166:7161d8451fcf 167:9b129ed78d7d
19 #include <sys/cdefs.h> 19 #include <sys/cdefs.h>
20 #endif 20 #endif
21 21
22 #include <list> 22 #include <list>
23 23
24 extern char *spamc;
25 extern char *spamc_empty;
24 using namespace std; 26 using namespace std;
25 27
26 class mlfiPriv; 28 class mlfiPriv;
27 29
28 class SpamAssassin { 30 class SpamAssassin {
29 public: 31 public:
30 SpamAssassin(); 32 SpamAssassin(mlfiPriv *priv_, int ip, char *helo_, char *from, char *qid);
31 ~SpamAssassin(); 33 ~SpamAssassin();
32 34
33 void mlfi_connect(mlfiPriv *priv_, int ip);
34 void mlfi_helo(char *helohost);
35 void mlfi_envfrom(char *from, char *qid);
36 void mlfi_envrcpt(SMFICTX *ctx, char *envrcpt); 35 void mlfi_envrcpt(SMFICTX *ctx, char *envrcpt);
37 void mlfi_header(char* headerf, char* headerv); 36 void mlfi_header(char* headerf, char* headerv);
38 void mlfi_eoh(); 37 void mlfi_eoh();
39 void mlfi_body(u_char *bodyp, size_t bodylen); 38 void mlfi_body(u_char *bodyp, size_t bodylen);
40 int mlfi_eom(); 39 int mlfi_eom();
56 bool running; // running implies (connected and pid) 55 bool running; // running implies (connected and pid)
57 bool first_recipient; // have we seen any recipients? 56 bool first_recipient; // have we seen any recipients?
58 57
59 // connection back to main dnsbl priv structure for logging 58 // connection back to main dnsbl priv structure for logging
60 mlfiPriv *priv; 59 mlfiPriv *priv;
60 int ip4; // ip4 address of smtp client
61 61
62 // strings owned by main dnsbl 62 // strings owned by main dnsbl
63 char *helo; // client helo value
64 char *envfrom; // envelope from value for this message
63 char *queueid; // the sendmail queue id for this message 65 char *queueid; // the sendmail queue id for this message
64 char *envfrom; // envelope from value for this message
65 char *helo; // client helo value
66 int ip4; // ip4 address of smtp client
67 66
68 // Process handling variables 67 // Process handling variables
69 pid_t pid; 68 pid_t pid;
70 int pipe_io[2][2]; 69 int pipe_io[2][2];
71 string spamc_output; 70 string spamc_output;