File: dspam.h

package info (click to toggle)
dspam 3.10.1+dfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,656 kB
  • sloc: ansic: 26,034; sh: 12,546; perl: 5,469; makefile: 690; sql: 379
file content (95 lines) | stat: -rw-r--r-- 3,278 bytes parent folder | download
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* $Id: dspam.h,v 1.40 2011/06/28 00:13:48 sbajic Exp $ */

/*
 DSPAM
 COPYRIGHT (C) 2002-2011 DSPAM PROJECT

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU Affero General Public License as
 published by the Free Software Foundation, either version 3 of the
 License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Affero General Public License for more details.

 You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.

*/

#include <sys/types.h>
#ifndef _WIN32
#include <pwd.h>
#endif
#include "libdspam.h"
#include "buffer.h"
#include "pref.h"
#include "read_config.h"
#include "daemon.h"

#ifdef HAVE_CONFIG_H
#include <auto-config.h>
#endif

#include "agent_shared.h"

#ifndef _DSPAM_H
#  define _DSPAM_H

int deliver_message (AGENT_CTX *ATX, const char *message, 
    const char *mailer_args, const char *username, FILE *out, int result);
int process_message (AGENT_CTX *ATX, buffer *message, const char *username,
     char **result_string);
int inoculate_user  (AGENT_CTX *ATX, const char *username, 
    struct _ds_spam_signature *SIG, const char *message);
int user_classify   (AGENT_CTX *ATX, const char *username,
     struct _ds_spam_signature *SIG, const char *message);
int send_notice     (AGENT_CTX *ATX, const char *filename, 
    const char *mailer_args, const char *username);
int write_web_stats (AGENT_CTX *ATX, const char *username, const char *group, 
    struct _ds_spam_totals *totals);
int ensure_confident_result (DSPAM_CTX *CTX, AGENT_CTX *ATX, int result);
int quarantine_message      (AGENT_CTX *ATX, const char *message, 
    const char *username);
int log_events         (DSPAM_CTX *CTX, AGENT_CTX *ATX);
int retrain_message    (DSPAM_CTX *CTX, AGENT_CTX *ATX);
int tag_message        (AGENT_CTX *ATX, ds_message_t message);
int process_users      (AGENT_CTX *ATX, buffer *message);
int find_signature     (DSPAM_CTX *CTX, AGENT_CTX *ATX);
int add_xdspam_headers (DSPAM_CTX *CTX, AGENT_CTX *ATX);
int embed_signature    (DSPAM_CTX *CTX, AGENT_CTX *ATX);
int embed_msgtag       (DSPAM_CTX *CTX, AGENT_CTX *ATX);
int embed_signed       (DSPAM_CTX *CTX, AGENT_CTX *ATX);
int tracksource        (DSPAM_CTX *CTX);
#ifdef CLAMAV
int has_virus          (buffer *message);
int feed_clam          (int port, buffer *message);
#endif
int is_blacklisted     (DSPAM_CTX *CTX, AGENT_CTX *ATX);
int is_blocklisted     (DSPAM_CTX *CTX, AGENT_CTX *ATX);
int do_notifications   (DSPAM_CTX *CTX, AGENT_CTX *ATX);
DSPAM_CTX *ctx_init    (AGENT_CTX *ATX, const char *username);
buffer *read_stdin     (AGENT_CTX *ATX);
agent_pref_t load_aggregated_prefs (AGENT_CTX *ATX, const char *username);

#ifdef DAEMON
int daemon_start       (AGENT_CTX *ATX);
#endif

#define DSM_DAEMON	0xFE

typedef struct agent_result {
  int exitcode;
  int classification;
  char text[256];
} *agent_result_t; 

#define ERC_SUCCESS		0x00
#define ERC_PROCESS		-0x01
#define ERC_DELIVERY		-0x02
#define ERC_PERMANENT_DELIVERY	-0x03

#endif /* _DSPAM_H */