source: npl/mailserver/dspam/dspam-3.10.2/src/dspam.h @ c5c522c

gcc484ntopperl-5.22
Last change on this file since c5c522c was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/* $Id: dspam.h,v 1.40 2011/06/28 00:13:48 sbajic Exp $ */
2
3/*
4 DSPAM
5 COPYRIGHT (C) 2002-2012 DSPAM PROJECT
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Affero General Public License as
9 published by the Free Software Foundation, either version 3 of the
10 License, or (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU Affero General Public License for more details.
16
17 You should have received a copy of the GNU Affero General Public License
18 along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20*/
21
22#include <sys/types.h>
23#ifndef _WIN32
24#include <pwd.h>
25#endif
26#include "libdspam.h"
27#include "buffer.h"
28#include "pref.h"
29#include "read_config.h"
30#include "daemon.h"
31
32#ifdef HAVE_CONFIG_H
33#include <auto-config.h>
34#endif
35
36#include "agent_shared.h"
37
38#ifndef _DSPAM_H
39#  define _DSPAM_H
40
41int deliver_message (AGENT_CTX *ATX, const char *message,
42    const char *mailer_args, const char *username, FILE *out, int result);
43int process_message (AGENT_CTX *ATX, buffer *message, const char *username,
44     char **result_string);
45int inoculate_user  (AGENT_CTX *ATX, const char *username,
46    struct _ds_spam_signature *SIG, const char *message);
47int user_classify   (AGENT_CTX *ATX, const char *username,
48     struct _ds_spam_signature *SIG, const char *message);
49int send_notice     (AGENT_CTX *ATX, const char *filename,
50    const char *mailer_args, const char *username);
51int write_web_stats (AGENT_CTX *ATX, const char *username, const char *group,
52    struct _ds_spam_totals *totals);
53int ensure_confident_result (DSPAM_CTX *CTX, AGENT_CTX *ATX, int result);
54int quarantine_message      (AGENT_CTX *ATX, const char *message,
55    const char *username);
56int log_events         (DSPAM_CTX *CTX, AGENT_CTX *ATX);
57int retrain_message    (DSPAM_CTX *CTX, AGENT_CTX *ATX);
58int tag_message        (AGENT_CTX *ATX, ds_message_t message);
59int process_users      (AGENT_CTX *ATX, buffer *message);
60int find_signature     (DSPAM_CTX *CTX, AGENT_CTX *ATX);
61int add_xdspam_headers (DSPAM_CTX *CTX, AGENT_CTX *ATX);
62int embed_signature    (DSPAM_CTX *CTX, AGENT_CTX *ATX);
63int embed_msgtag       (DSPAM_CTX *CTX, AGENT_CTX *ATX);
64int embed_signed       (DSPAM_CTX *CTX, AGENT_CTX *ATX);
65int tracksource        (DSPAM_CTX *CTX);
66#ifdef CLAMAV
67int has_virus          (buffer *message);
68int feed_clam          (int port, buffer *message);
69#endif
70int is_blacklisted     (DSPAM_CTX *CTX, AGENT_CTX *ATX);
71int is_blocklisted     (DSPAM_CTX *CTX, AGENT_CTX *ATX);
72int do_notifications   (DSPAM_CTX *CTX, AGENT_CTX *ATX);
73DSPAM_CTX *ctx_init    (AGENT_CTX *ATX, const char *username);
74buffer *read_stdin     (AGENT_CTX *ATX);
75agent_pref_t load_aggregated_prefs (AGENT_CTX *ATX, const char *username);
76
77#ifdef DAEMON
78int daemon_start       (AGENT_CTX *ATX);
79#endif
80
81#define DSM_DAEMON      0xFE
82
83typedef struct agent_result {
84  int exitcode;
85  int classification;
86  char text[256];
87} *agent_result_t;
88
89#define ERC_SUCCESS             0x00
90#define ERC_PROCESS             -0x01
91#define ERC_DELIVERY            -0x02
92#define ERC_PERMANENT_DELIVERY  -0x03
93
94#endif /* _DSPAM_H */
95
Note: See TracBrowser for help on using the repository browser.