ze-filter  (ze-filter-0.8.0-develop-180218)
ze-callbacklogs.h
Go to the documentation of this file.
1 /*
2  *
3  * ze-filter - Mail Server Filter for sendmail
4  *
5  * Copyright (c) 2001-2018 - Jose-Marcio Martins da Cruz
6  *
7  * Auteur : Jose Marcio Martins da Cruz
8  * jose.marcio.mc@gmail.org
9  *
10  * Historique :
11  * Creation : Mon Nov 15 23:13:14 CET 2004
12  *
13  * This program is free software, but with restricted license :
14  *
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19  *
20  * More details about ze-filter license can be found at ze-filter
21  * web site : http://foss.jose-marcio.org
22  */
23 
24 
25 #ifndef __ZE_CALLBACKLOGS_H
26 
33 #define WARN_MSG_SIZE 0x4000
34 
35 sfsistat do_notify(SMFICTX *, attachment_T *, char *, char *, char *);
36 
37 
38 void read_error_msg(char *buf, int, attachment_T *, char *,
39  char *, char *, char *, CTXPRIV_T *);
40 
41 void log_msg_context(SMFICTX *ctx, char *why);
42 
43 
44 bool add_tag2subject(SMFICTX *, char*);
45 
46 #define LOG_SPAM_CHECK(id, ...) \
47 do { \
48  if (log_level >= 9 && cf_get_int(CF_LOG_LEVEL_ORACLE) >= 2) \
49  { \
50  char sxa[256], sxb[256]; \
51  snprintf(sxa, sizeof(sxa), "%s SPAM CHECK", id); \
52  snprintf(sxb, sizeof(sxb), __VA_ARGS__); \
53  j_syslog(LOG_NOTICE, "%s - %s", sxa, sxb); \
54  } \
55 } while (0)
56 
57 #define LOG_ORACLE(id, ...) \
58 do { \
59  if (log_level >= 9 && cf_get_int(CF_LOG_LEVEL_ORACLE) >= 1) \
60  { \
61  char sxa[256], sxb[256]; \
62  snprintf(sxa, sizeof(sxa), "%s ORACLE", id); \
63  snprintf(sxb, sizeof(sxb), __VA_ARGS__); \
64  j_syslog(LOG_NOTICE, "%s - %s", sxa, sxb); \
65  } \
66 } while (0)
67 
70 bool dump_msg_scores4stats(SMFICTX *ctx);
71 
74 # define __ZE_CALLBACKLOGS_H 1
75 #endif /* __ZE_CALLBACKLOGS_H */
bool add_tag2subject(SMFICTX *, char *)
bool reopen_scores4stats_file()
sfsistat do_notify(SMFICTX *, attachment_T *, char *, char *, char *)
bool dump_msg_scores4stats(SMFICTX *ctx)
void log_msg_context(SMFICTX *ctx, char *why)
void read_error_msg(char *buf, int, attachment_T *, char *, char *, char *, char *, CTXPRIV_T *)
bool open_scores4stats_file()