140 #define CLEANUP_FLAG_INRCPT (1<<16)
141 #define CLEANUP_FLAG_WARN_SEEN (1<<17)
142 #define CLEANUP_FLAG_END_SEEN (1<<18)
178 #define CLEANUP_CANON_FLAG_ENV_FROM (1<<0)
179 #define CLEANUP_CANON_FLAG_ENV_RCPT (1<<1)
180 #define CLEANUP_CANON_FLAG_HDR_FROM (1<<2)
181 #define CLEANUP_CANON_FLAG_HDR_RCPT (1<<3)
186 #define CLEANUP_MASQ_FLAG_ENV_FROM (1<<0)
187 #define CLEANUP_MASQ_FLAG_ENV_RCPT (1<<1)
188 #define CLEANUP_MASQ_FLAG_HDR_FROM (1<<2)
189 #define CLEANUP_MASQ_FLAG_HDR_RCPT (1<<3)
226 #define CLEANUP_RECORD(s, t, b, l) ((s)->action((s), (t), (b), (l)))
236 #define CLEANUP_OUT_BUF(s, t, b) \
237 cleanup_out((s), (t), vstring_str((b)), VSTRING_LEN((b)))
239 #define CLEANUP_OUT_OK(s) \
240 (!((s)->errs & (s)->err_mask) && !((s)->flags & CLEANUP_FLAG_DISCARD))
250 extern void cleanup_message(CLEANUP_STATE *,
int,
const char *, ssize_t);
300 #define NO_DSN_ORCPT ((char *) 0)
301 #define NO_DSN_NOTIFY DSN_NOTIFY_NEVER
302 #define DEF_DSN_NOTIFY (0)
304 #define cleanup_addr_bcc(state, addr) \
305 cleanup_addr_bcc_dsn((state), (addr), NO_DSN_ORCPT, NO_DSN_NOTIFY)
315 #define CLEANUP_MSG_STATS(stats, state) \
316 MSG_STATS_INIT1(stats, incoming_arrival, state->arrival_time)
327 #define CLEANUP_MILTER_OK(s) \
328 (((s)->flags & CLEANUP_FLAG_MILTER) != 0 \
329 && (s)->errs == 0 && ((s)->flags & CLEANUP_FLAG_DISCARD) == 0)
355 #define HFROM_FORMAT_CODE_STD 0
356 #define HFROM_FORMAT_CODE_OBS 1
struct CLEANUP_STATE CLEANUP_STATE
VSTRING * milter_ext_rcpt
MAPS * cleanup_send_bcc_maps
void cleanup_milter_inspect(CLEANUP_STATE *, MILTERS *)
int cleanup_masquerade_external(CLEANUP_STATE *, VSTRING *, ARGV *)
struct CLEANUP_REGION CLEANUP_REGION
VSTRING * cleanup_bounce_path
void cleanup_out_format(CLEANUP_STATE *state, int type, const char *fmt,...)
void cleanup_extracted(CLEANUP_STATE *, int, const char *, ssize_t)
int cleanup_rewrite_tree(const char *, TOK822 *)
MAPS * cleanup_rcpt_bcc_maps
void cleanup_envelope(CLEANUP_STATE *, int, const char *, ssize_t)
int cleanup_map11_internal(CLEANUP_STATE *, VSTRING *, MAPS *, int)
VSTRING * cleanup_trace_path
MAPS * cleanup_virt_alias_maps
ARGV * cleanup_map1n_internal(CLEANUP_STATE *, const char *, MAPS *, int)
MAPS * cleanup_body_checks
off_t cleanup_addr_sender(CLEANUP_STATE *, const char *)
VSTRING * milter_err_text
void cleanup_milter_emul_mail(CLEANUP_STATE *, MILTERS *, const char *)
void cleanup_state_free(CLEANUP_STATE *)
MAPS * cleanup_rcpt_canon_maps
CLEANUP_REGION * cleanup_region_return(CLEANUP_STATE *, CLEANUP_REGION *)
off_t append_rcpt_pt_target
HBC_CHECKS * milter_hbc_checks
void cleanup_post_jail(char *, char **)
void cleanup_region_close(CLEANUP_STATE *, CLEANUP_REGION *)
void cleanup_message(CLEANUP_STATE *, int, const char *, ssize_t)
int cleanup_comm_canon_flags
int cleanup_map11_external(CLEANUP_STATE *, VSTRING *, MAPS *, int)
CLEANUP_STATE * cleanup_open(VSTREAM *)
CLEANUP_REGION * cleanup_region_open(CLEANUP_STATE *, ssize_t)
struct timeval arrival_time
ARGV * cleanup_masq_domains
int cleanup_body_edit_write(CLEANUP_STATE *, int, VSTRING *)
void cleanup_body_edit_free(CLEANUP_STATE *)
void PRINTFLIKE(3, 4) cleanup_out_format(CLEANUP_STATE *
STRING_LIST * cleanup_masq_exceptions
const CONFIG_TIME_TABLE cleanup_time_table[]
int cleanup_ext_prop_mask
int cleanup_body_edit_start(CLEANUP_STATE *)
MAPS * cleanup_nesthdr_checks
off_t append_meta_pt_offset
int cleanup_rcpt_canon_flags
const CONFIG_INT_TABLE cleanup_int_table[]
void cleanup_region_init(CLEANUP_STATE *)
int cleanup_map11_tree(CLEANUP_STATE *, TOK822 *, MAPS *, int)
VSTRING * cleanup_reject_chars
const CONFIG_BOOL_TABLE cleanup_bool_table[]
int cleanup_flush(CLEANUP_STATE *)
VSTRING * milter_hbc_reply
off_t append_rcpt_pt_offset
void cleanup_milter_emul_rcpt(CLEANUP_STATE *, MILTERS *, const char *)
const char * reverse_name
off_t append_hdr_pt_offset
VSTRING * milter_ext_from
int cleanup_body_edit_finish(CLEANUP_STATE *)
char * hdr_rewrite_context
MAPS * cleanup_mimehdr_checks
int cleanup_bounce(CLEANUP_STATE *)
void cleanup_final(CLEANUP_STATE *)
struct CLEANUP_REGION * curr_body_region
const CONFIG_STR_TABLE cleanup_str_table[]
void cleanup_region_done(CLEANUP_STATE *)
int cleanup_send_canon_flags
void(* action)(struct CLEANUP_STATE *, int, const char *, ssize_t)
void cleanup_free(CLEANUP_STATE *)
CLEANUP_STATE * cleanup_state_alloc(VSTREAM *)
struct CLEANUP_REGION * body_regions
MAPS * cleanup_comm_canon_maps
void cleanup_milter_receive(CLEANUP_STATE *, int)
MAPS * cleanup_header_checks
off_t append_meta_pt_target
int cleanup_masquerade_internal(CLEANUP_STATE *, VSTRING *, ARGV *)
void const char void cleanup_out_header(CLEANUP_STATE *, VSTRING *)
int cleanup_masquerade_tree(CLEANUP_STATE *, TOK822 *, ARGV *)
MAPS * cleanup_send_canon_maps
void cleanup_addr_bcc_dsn(CLEANUP_STATE *, const char *, const char *, int)
void cleanup_out(CLEANUP_STATE *, int, const char *, ssize_t)
struct CLEANUP_REGION * free_regions
off_t append_hdr_pt_target
void cleanup_milter_emul_data(CLEANUP_STATE *, MILTERS *)
void cleanup_control(CLEANUP_STATE *, int)
void cleanup_out_string(CLEANUP_STATE *, int, const char *)
MILTERS * cleanup_milters
void cleanup_out_recipient(CLEANUP_STATE *, const char *, int, const char *, const char *)
struct CLEANUP_REGION * next
VSTRING * cleanup_strip_chars
int cleanup_rewrite_internal(const char *, VSTRING *, const char *)
int cleanup_rewrite_external(const char *, VSTRING *, const char *)
void cleanup_addr_recipient(CLEANUP_STATE *, const char *)
void cleanup_pre_jail(char *, char **)